/* --------------------------------------- */
/* ----- Basic Setup ----- */
/* --------------------------------------- */

@font-face {
    font-family: 'Hk Grotesk';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/HKGrotesk-Regular.woff') format('woff');
}

@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/Jost-Regular.ttf') format('woff');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

:root {
    color-scheme: light dark;

    --font-size-small: 1.8rem;
    --font-size-normal: 2.2rem;
    --font-size-medium: 2.8rem;
    --font-size-medium-1: 3.6rem;
    --font-size-large: 5.5rem;
    --font-size-huge: 7.5rem;
    --font-stack: 'Hk Grotesk', sans-serif;

    --line-height-normal: 1.7;
    --line-height-small: 1.2;

    /* Color tokens (dark theme defaults). The names map to roles: */
    /*   --black     = page background                              */
    /*   --white     = headings / strong text / hover-fill          */
    /*   --white-1   = body text                                    */
    /*   --pink      = accent                                       */
    --black: #000;
    --pink: #ff3258;
    --white: #f0e9f2;
    --white-1: #e5e5e6da;
    --border-color: rgb(36, 35, 35);
    --logo-filter: invert(100%) grayscale(100%) opacity(.8);


    --container-max-width: 1180px;
    --container-normal-width: 800px;
    --container-medium-width: 700px;
    --container-small-width: 500px;

    --gutter-huge: 12rem;
    --gutter-medium: 6rem;
    --gutter-normal: 3rem;
    --gutter-small-1: 2.5rem;
    --gutter-small: 2rem;

    --border-light: 1px solid var(--border-color);
}

/* Light theme — auto-applied when the OS is set to light mode */
@media (prefers-color-scheme: light) {
    :root {
        --black: #f5f3f0;        /* page background */
        --white: #1a1a1a;        /* headings / strong text */
        --white-1: #2a2627;      /* body text */
        --border-color: rgb(220, 220, 220);
        --logo-filter: grayscale(100%) opacity(.7);
    }
}

html {
    font-size: 62.5%; /* (16/10)*100 = 62.5% => 1rem = 10px */
    box-sizing: border-box;
    scroll-behavior: smooth;
}

@media(max-width: 1000px) {
    html {
        font-size: 52%;
    }
}

body {
    font-size: var(--font-size-small);
    font-family: var(--font-stack);
    font-weight: 400;
    color: var(--white-1);
    line-height: var(--line-height-normal);
    background: var(--black);
    overflow-x: hidden;
}

.row {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

@media(max-width: 1340px) {
    .row {
        max-width: 1100px;
    }
}

@media(max-width: 1240px) {
    .row {
        padding: 0 var(--gutter-medium);
    }
}

@media(max-width: 600px) {
    .row {
        padding: 0 var(--gutter-normal);
    }
}

@media(max-width: 600px) {
    .row {
        padding: 0 var(--gutter-small);
    }
}

section {
    padding: var(--gutter-huge) 0;
    border-bottom: var(--border-light);
}

img {
    object-fit: contain;
    max-width: 100%;
}

/* --------------------------------------- */
/* ----- Headlines and Paragraphs ----- */
/* --------------------------------------- */

h1,
h2,
h3 {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    line-height: var(--line-height-small);
    color: var(--white);
}

.heading-primary {
    line-height: 1;
    font-size: var(--font-size-huge);
    font-weight: 400;
}

@media(max-width: 900px) {
    .heading-primary {
        font-size: 6.5rem;
    }
}

h2 {
    font-size: var(--font-size-large);
    margin-bottom: var(--gutter-medium);
}

h2::after {
    content: '';
    display: block;
    height: 2px;
    width: 10rem;
    background: var(--pink);
    margin: var(--gutter-small) 0;
}

h3 {
    font-size: var(--font-size-medium-1);
    margin-bottom: var(--gutter-small);
}

@media(max-width: 500px) {
    .heading-primary {
        font-size: var(--font-size-large);
    }

    h2 {
        font-size: var(--font-size-medium-1);
    }

    h3 {
        font-size: var(--font-size-medium);
    }
}

p {
    margin: var(--gutter-small-1) 0;
}

@media(max-width: 900px) {
    p { 
        max-width: var(--container-small-width);
    }
}

/* --------------------------------------- */
/* ----- Buttons and Links ----- */
/* --------------------------------------- */

a {
    color: var(--white);
    font-weight: 400;
    font-family: 'Jost', sans-serif;
    transition: all .2s;
    outline: 2px solid transparent;
}

::-moz-focus-inner {
    border: 0;
}

button:focus,
a:focus {
    outline: 2px solid var(--pink);
}

body:not(.user-is-tabbing) button:focus,
body:not(.user-is-tabbing) a:focus {
    outline: none;
}

.link:hover {
    color: var(--pink);
}

.btn {
    position: relative;
    display: inline-block;
    padding: 1rem 4.2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid  var(--pink);
    font-weight: 400;
}

.btn:focus {
    outline: none;
}

.btn::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.btn:hover::after,
.btn:focus::after {
    right: 0;
    background: var(--pink);
}

.btn--pink {
    background: var(--pink);
    transition: all 0.2s;
}

.btn--pink::after {
    display: none;
}

.btn--pink:hover,
.btn--pink:focus {
    background: transparent;
}

.header__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.header__social-links {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    margin-top: 3.5rem;
    padding: 0;
}

.header__social-icon {
    height: 4rem;
    transition: opacity 0.2s;
}

.header__social-icon--invert {
    filter: brightness(0) invert(1);
}

.header__social-icon:hover {
    opacity: 0.7;
}

.link__text {
    position: relative;
    display: inline-block;
    padding: .6rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--pink);
}

.link__text::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.link__text:focus {
    outline: none;
}

.link__text:hover::after,
.link__text:focus:after {
    right: 0;
    background: var(--pink);
}

.link__text span {
    padding-left: 1rem;
    font-family: sans-serif;
}

/* ----- Back to Top ----- */

.back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5.5rem;
    width: 5.5rem;
    background-color: var(--pink);
    border-radius: 50%;
    z-index: 10;
    visibility: hidden;
    transition: all .4s;
}

.back-to-top__image {
    height: 70%;
}

@media(max-width: 900px) {
    .back-to-top {
        right: 2rem;
    }
}

@media(max-width: 500px) {
    .back-to-top {
        right: 1rem;
    }
}

/* --------------------------------------- */
/* ----- Navigation ----- */
/* --------------------------------------- */

.nav {
    display: flex;
    justify-content: flex-end;
    padding: var(--gutter-normal) 0;
}

.nav__items {
    display: flex;
    list-style: none;
}

.nav__item:not(:last-child) {
    margin-right: var(--gutter-medium);
}

@media(max-width: 500px) {
    .nav {
        justify-content: center;
    }
}

@media(max-width: 400px) {
    .nav__item:not(:last-child) {
        margin-right: var(--gutter-normal);
    }
}

@media(max-width: 300px) {
    .nav {
        font-size: var(--font-size-small);
    }
}

.nav__link {
    position: relative;
    display: inline-block;
    padding: 1rem 0;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 100%;
    display: inline-block;
    height: 1rem;
    background: var(--white);
    transition: all 0.25s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.nav__link:hover {
    color: var(--pink);
}

.nav__link:hover::after {
    right: 0;
    height: 2px;
    background: var(--pink);
}

/* --------------------------------------- */
/* ----- Header ----- */
/* --------------------------------------- */

.header {
    background:
        linear-gradient(to bottom,
            transparent 0%,
            transparent 65%,
            var(--black) 100%
        ),
        url('./images/header.svg');
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-size: var(--font-size-normal);
}

.header__text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.header__text p {
    margin: 1.5rem 0 3.5rem;
    max-width: var(--container-medium-width);
    font-family: 'Jost', sans-serif;
    font-size: var(--font-size-small);
    line-height: 1.6;
}

@media(max-width: 500px) {
    .header {
        text-align: center;
    }

    .header__text p {
        transform: scale(.8);
    }
}

/* --------------------------------------- */
/* ----- Split Panel ----- */
/* --------------------------------------- */

.split-panel {
    display: flex;
    border: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.split-panel__nav {
    list-style: none;
    flex: 0 0 32%;
    border-right: var(--border-light);
    overflow-y: auto;
    max-height: 56rem;
}

.split-panel__nav-item {
    padding: 1.2rem 1.6rem;
    cursor: pointer;
    border-bottom: var(--border-light);
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s;
}

.split-panel__nav-item:last-child {
    border-bottom: none;
}

.split-panel__nav-item:hover {
    background: rgba(255, 50, 88, .05);
    border-left-color: rgba(255, 50, 88, .4);
}

.split-panel__nav-item.is-active {
    border-left-color: var(--pink);
    background: rgba(255, 50, 88, .08);
}

.split-panel__nav-title {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 1.5rem;
    color: var(--white);
    line-height: 1.45;
    margin-bottom: .3rem;
}

.split-panel__nav-meta {
    display: block;
    font-size: 1.3rem;
    opacity: .6;
}

.split-panel__body {
    flex: 1;
    overflow-y: auto;
    max-height: 56rem;
}

.split-panel__pane {
    display: none;
    padding: 2.4rem 3rem;
    overflow: hidden;
}

.split-panel__pane.is-active {
    display: block;
}

.split-panel__pane-title {
    font-size: 1.9rem;
    margin-bottom: 1.4rem;
    line-height: 1.4;
}

.split-panel__pane p {
    margin: 0 0 1.2rem;
    font-size: 1.6rem;
    max-width: none;
}

.item__gallery {
    display: flex;
    gap: 1.2rem;
    margin-top: 2rem;
}

.item__gallery-img {
    flex: 1;
    max-width: 50%;
    max-height: 26rem;
    border-radius: 4px;
    object-fit: contain;
    background: rgba(128,128,128,.06);
}

#proj-3 .item__gallery-img,
#proj-7 .item__gallery-img,
#pub-0 .item__gallery-img,
#pub-1 .item__gallery-img,
#pub-2 .item__gallery-img,
#pub-3 .item__gallery-img,
#pub-4 .item__gallery-img,
#pub-5 .item__gallery-img,
#pub-7 .item__gallery-img,
#pub-9 .item__gallery-img {
    flex: 0 1 calc((100% - 2.4rem) / 3);
    max-width: calc((100% - 2.4rem) / 3);
    min-width: 0;
}

.item__gallery-img:only-child {
    max-width: 100%;
}

.item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    list-style: none;
    margin: 0 0 1.4rem;
}

.item__tags li {
    font-size: 1.3rem;
    padding: .3rem .9rem;
    border: 1px solid var(--pink);
    border-radius: 2px;
    opacity: .85;
}

/* Publication pane */
.pub-pane__title {
    font-family: 'Jost', sans-serif;
    font-size: 1.8rem;
    color: var(--white);
    line-height: 1.5;
    margin: 0 0 1.2rem;
}

.pub-pane__authors {
    font-size: 1.5rem;
    font-family: 'Jost', sans-serif;
    margin: 0 0 .5rem;
    max-width: none;
}

.pub-pane__authors strong {
    color: var(--white);
    font-weight: 400;
}

.pub-pane__venue {
    font-size: 1.4rem;
    opacity: .75;
    margin: 0 0 1.2rem;
    max-width: none;
}

.pub-pane__summary {
    font-size: 1.55rem;
    line-height: 1.65;
    margin: 1.6rem 0;
    max-width: none;
}

.pub-pane__highlights-title {
    font-family: 'Jost', sans-serif;
    font-size: 1.3rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin: 1.6rem 0 .8rem;
}

.pub-pane__highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 1.8rem;
}

.pub-pane__highlights li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: .6rem;
    font-size: 1.45rem;
    line-height: 1.5;
    max-width: none;
}

.pub-pane__highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: .8rem;
    height: 1px;
    background: var(--pink);
}

.publication__doi {
    font-size: 1.4rem;
    color: var(--pink);
    text-decoration: none;
    border-bottom: none;
    opacity: .9;
}

.publication__doi:hover {
    opacity: 1;
    text-decoration: underline;
}

.publications__more,
.work__more {
    margin-top: var(--gutter-medium);
    text-align: right;
}

@media(max-width: 768px) {
    .split-panel {
        flex-direction: column;
    }

    .split-panel__nav {
        flex: none;
        max-height: 22rem;
        border-right: none;
        border-bottom: var(--border-light);
    }

    .split-panel__body {
        max-height: none;
    }

    .item__gallery {
        flex-direction: column;
    }

    .item__gallery-img {
        max-width: 100%;
        max-height: none;
    }

    #proj-3 .item__gallery-img,
    #proj-7 .item__gallery-img,
    #pub-0 .item__gallery-img,
    #pub-1 .item__gallery-img,
    #pub-2 .item__gallery-img,
    #pub-3 .item__gallery-img,
    #pub-4 .item__gallery-img,
    #pub-5 .item__gallery-img,
    #pub-7 .item__gallery-img,
    #pub-9 .item__gallery-img {
        flex: 1;
        max-width: 100%;
    }
}

@media(max-width: 600px) {
    .publications__more,
    .work__more {
        text-align: left;
    }
}


/* --------------------------------------- */
/* ----- Education & Experience ----- */
/* --------------------------------------- */

.education__timeline {
    display: flex;
    flex-direction: column;
    gap: var(--gutter-medium);
    max-width: 80rem;
}

.education__item {
    border-left: 3px solid var(--pink);
    padding-left: 2rem;
}

.education__date {
    display: block;
    font-size: 1.4rem;
    color: var(--pink);
    margin-bottom: 0.4rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.education__role {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
}

.education__place {
    font-size: 1.5rem;
    opacity: 0.8;
    margin: 0 0 0.4rem;
}

.education__note {
    font-size: 1.4rem;
    opacity: 0.7;
    margin: 0;
}

/* --------------------------------------- */
/* ----- Skills ----- */
/* --------------------------------------- */

.skills__intro {
    max-width: var(--container-max-width);
    font-size: 1.7rem;
    margin-bottom: var(--gutter-medium);
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 2.4rem;
    margin-bottom: var(--gutter-medium);
}

.skills__card {
    border: var(--border-light);
    border-radius: 4px;
    padding: 2.4rem;
    background: rgba(128, 128, 128, .04);
}

.skills__card-title {
    font-family: 'Jost', sans-serif;
    font-size: 1.7rem;
    color: var(--white);
    margin: 0 0 1.4rem;
    line-height: 1.3;
}

.skills__card .item__tags {
    margin: 0;
}

.skills__card-note {
    margin: 1.4rem 0 0;
    font-size: 1.4rem;
    opacity: .8;
    max-width: none;
    line-height: 1.5;
}

.skills__block {
    margin-top: var(--gutter-medium);
    max-width: var(--container-normal-width);
}

.skills__block h3 {
    font-size: var(--font-size-medium);
    margin-bottom: var(--gutter-small);
}

.skills__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills__list li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    line-height: 1.6;
}

.skills__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: .8rem;
    height: 1px;
    background: var(--pink);
}

.skills__list strong,
.skills__block strong {
    color: var(--white);
    font-weight: 400;
}

/* --------------------------------------- */
/* ----- About ----- */
/* --------------------------------------- */

.about__content {
    display: flex;
    flex-direction: column;
}

.about__top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--gutter-medium);
}

.about__photo-container {
    flex: 0 0 52rem;
    max-width: 52rem;
}

.about__photo {
    width: 100%;
    display: block;
}

.about__text {
    flex: 1;
    padding-top: 6rem;
}

.about__tags {
    margin-top: var(--gutter-normal);
}

@media(max-width: 900px) {
    .about__top {
        flex-direction: column;
    }

    .about__photo-container {
        flex: none;
        max-width: 100%;
    }
}

.about__beyond {
    margin-top: var(--gutter-medium);
    padding-top: var(--gutter-normal);
    border-top: var(--border-light);
    max-width: var(--container-max-width);
}

.about__beyond h3 {
    font-size: var(--font-size-medium);
    margin-bottom: var(--gutter-small);
}

.hobby-icon {
    width: 1.3em;
    height: 1.3em;
    vertical-align: middle;
    display: inline-block;
    margin: 0 0.1em;
}

/* --------------------------------------- */
/* ----- Contact ----- */
/* --------------------------------------- */

.contact__info {
    max-width: var(--container-medium-width);
}

.contact__links {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-top: 2rem;
}

.contact__link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: var(--font-size-small);
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.contact__link:hover {
    color: var(--pink);
}

.contact__link-icon {
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
}

/* --------------------------------------- */
/* ----- Footer ----- */
/* --------------------------------------- */

.footer {
    text-align: center;
    padding: var(--gutter-medium) 0 var(--gutter-normal);
}

.footer__social-links {
    display: flex;
    justify-content: center;
    padding: var(--gutter-normal) 0;
    list-style: none;
}

.footer__social-link-item:not(:last-of-type) {
    margin-right: var(--gutter-small);
}

.footer__social-image {
    height: 4rem;
}

.footer__social-link-item--text {
    display: flex;
    align-items: center;
}

.footer__social-text {
    font-family: 'Jost', sans-serif;
    font-size: var(--font-size-small);
    text-decoration: none;
    color: inherit;
    padding: .6rem 1rem;
    border: 1px solid var(--pink);
    transition: all .2s;
}

.footer__social-text:hover {
    color: var(--pink);
}

.footer__github-buttons {
    display: flex;
    justify-content: center;
}

.footer__github-buttons iframe {
    height: 2.5rem;
    width: 84px;
    transform: translateY(3px);
}

@media(max-width: 500px) {
    .footer {
        padding: var(--gutter-medium) 0;
    } 
}
