:root {
    --navy: #0b1f33;
    --navy-light: #173852;
    --blue: #1261a0;
    --teal: #008f98;
    --light-blue: #eaf4f8;
    --background: #f7f9fb;
    --white: #ffffff;
    --text: #243342;
    --muted: #607080;
    --border: #d9e4ea;
    --shadow: 0 12px 35px rgba(11, 31, 51, 0.09);
    --maximum-width: 1150px;
    --header-height: 78px;
}

/* Basic reset */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

/* Prevent sticky navigation from covering headings */

#home,
#about,
#expertise,
#research,
#experience,
#teaching,
#publications,
#contact {
    scroll-margin-top: 95px;
}

/* Navigation */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 3px 15px rgba(11, 31, 51, 0.04);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    max-width: var(--maximum-width);
    min-height: var(--header-height);
    margin: auto;
    padding: 0 30px;
}

.logo {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: var(--white);
    background: var(--navy);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.logo:hover {
    background: var(--teal);
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.nav-links a {
    color: var(--navy);
    font-size: 0.89rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--teal);
}

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) auto;
    align-items: center;
    gap: 80px;
    max-width: var(--maximum-width);
    min-height: calc(100vh - var(--header-height));
    margin: auto;
    padding: 90px 30px;
}

.hero-content {
    min-width: 0;
}

.eyebrow,
.section-number,
.project-type,
.publication-year,
.teaching-date {
    color: var(--teal);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 12px 0 0;
    color: var(--navy);
    font-size: clamp(3.4rem, 7.2vw, 6.3rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero h2 {
    margin: 22px 0;
    color: var(--blue);
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    font-weight: 500;
    line-height: 1.25;
}

.hero-description {
    max-width: 750px;
    margin-bottom: 18px;
    font-size: 1.12rem;
}

.availability {
    max-width: 760px;
    color: var(--muted);
    font-weight: 700;
}

.hero-buttons,
.contact-links,
.publication-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 21px;
    border: 2px solid var(--blue);
    border-radius: 7px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.button.primary {
    color: var(--white);
    background: var(--blue);
}

.button.secondary {
    color: var(--blue);
    background: transparent;
}

.button:hover,
.button:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.button.primary:hover,
.button.primary:focus {
    background: var(--navy);
    border-color: var(--navy);
}

.button.secondary:hover,
.button.secondary:focus {
    color: var(--white);
    background: var(--blue);
}

.monogram {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 245px;
    height: 245px;
    color: var(--white);
    background: linear-gradient(145deg, var(--navy), var(--teal));
    border: 12px solid var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    font-size: 4.2rem;
    font-weight: 700;
}

/* General sections */

.section {
    max-width: var(--maximum-width);
    margin: auto;
    padding: 90px 30px;
}

.alternate {
    max-width: none;
    padding-right: max(30px, calc((100% - 1090px) / 2));
    padding-left: max(30px, calc((100% - 1090px) / 2));
    background: var(--light-blue);
}

.section-heading {
    margin-bottom: 42px;
}

.section-heading h2,
.award-section h2,
.contact-section h2 {
    margin: 5px 0;
    color: var(--navy);
    font-size: clamp(2.15rem, 5vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.section-introduction {
    max-width: 720px;
    margin-top: 15px;
    color: var(--muted);
    font-size: 1.05rem;
}

/* About section */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    align-items: start;
    gap: 55px;
}

.about-text p:first-child {
    margin-top: 0;
}

.about-text p {
    font-size: 1.03rem;
}

.details-card {
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.detail {
    display: grid;
    gap: 2px;
    margin-bottom: 20px;
}

.detail:last-child {
    margin-bottom: 0;
}

.detail strong {
    color: var(--navy);
}

.detail span {
    color: var(--text);
}

/* Expertise cards */

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.card {
    padding: 29px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 11px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 1.14rem;
}

.card p {
    margin: 0;
}

/* Research cards */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;
    padding: 31px;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 4px solid var(--teal);
    border-radius: 11px;
    box-shadow: var(--shadow);
}

.project-card h3 {
    margin: 5px 0 12px;
    color: var(--navy);
    font-size: 1.2rem;
    line-height: 1.35;
}

.project-card > p:not(.project-type):not(.project-tags) {
    flex-grow: 1;
}

.project-tags {
    margin: 15px 0 0;
    color: var(--blue);
    font-size: 0.85rem;
    font-weight: 700;
}

/* Experience timeline */

.timeline {
    border-left: 3px solid var(--teal);
}

.timeline-item {
    position: relative;
    padding: 0 0 52px 39px;
}

.timeline-item:last-child {
    padding-bottom: 5px;
}

.timeline-item::before {
    position: absolute;
    top: 6px;
    left: -10px;
    width: 17px;
    height: 17px;
    background: var(--teal);
    border: 3px solid var(--light-blue);
    border-radius: 50%;
    content: "";
}

.date {
    margin: 0 0 4px;
    color: var(--teal);
    font-weight: 700;
}

.timeline-item h3 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: 1.25rem;
}

.organization {
    margin: 0 0 8px;
    color: var(--blue);
    font-weight: 700;
}

.degree-detail {
    margin: 0 0 15px;
    color: var(--muted);
    font-weight: 600;
}

.timeline-item ul {
    padding-left: 21px;
}

.timeline-item li {
    margin-bottom: 7px;
}

.thesis {
    margin-top: 17px;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-left: 3px solid var(--blue);
}

/* Teaching section */

.teaching-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.teaching-card {
    padding: 29px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 11px;
    box-shadow: var(--shadow);
}

.teaching-card h3 {
    margin: 5px 0 13px;
    color: var(--navy);
}

.teaching-card p:last-child {
    margin-bottom: 0;
}

/* Publications */

.publication-group + .publication-group {
    margin-top: 50px;
}

.group-title {
    margin-bottom: 20px;
    color: var(--navy);
    font-size: 1.35rem;
}

.publication-list {
    display: grid;
    gap: 22px;
}

.publication-list article {
    padding: 27px 30px;
    background: var(--white);
    border-left: 4px solid var(--blue);
    box-shadow: var(--shadow);
}

.publication-list article h3 {
    margin: 6px 0 15px;
    color: var(--navy);
    font-size: 1.12rem;
    line-height: 1.45;
}

.publication-list article p {
    margin: 7px 0;
}

.publication-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.publication-list.compact article {
    height: 100%;
}

.publication-actions {
    margin-top: 35px;
}

/* Award */

.award-section {
    max-width: 1090px;
    margin: 60px auto 90px;
    padding: 52px 55px;
    color: var(--white);
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 13px;
    box-shadow: var(--shadow);
}

.award-section h2 {
    color: var(--white);
}

.award-section p:last-child {
    max-width: 850px;
    margin-bottom: 0;
    font-size: 1.05rem;
}

/* Contact */

.contact-section {
    max-width: 1090px;
    margin: 40px auto 90px;
    padding: 55px;
    text-align: center;
    background: var(--light-blue);
    border-radius: 13px;
}

.contact-section > p:not(.section-number) {
    max-width: 840px;
    margin-right: auto;
    margin-left: auto;
    font-size: 1.05rem;
}

.contact-links {
    justify-content: center;
}

.cv-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 26px;
}

.cv-links a {
    color: var(--blue);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.cv-links a:hover,
.cv-links a:focus {
    text-decoration: underline;
}

/* Footer */

footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 25px max(30px, calc((100% - 1090px) / 2));
    color: #c8d7e4;
    background: var(--navy);
    font-size: 0.9rem;
}

footer p {
    margin: 0;
}

/* Keyboard accessibility */

a:focus-visible {
    outline: 3px solid #f0b429;
    outline-offset: 4px;
}

/* Tablet */

@media (max-width: 1050px) {

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 0.82rem;
    }

    .hero {
        gap: 45px;
    }

    .monogram {
        width: 195px;
        height: 195px;
        font-size: 3.3rem;
    }
}

/* Mobile */

@media (max-width: 800px) {

    :root {
        --header-height: auto;
    }

    .navbar {
        align-items: flex-start;
        min-height: auto;
        padding: 13px 20px 10px;
    }

    .logo {
        width: 42px;
        height: 42px;
    }

    .nav-links {
        justify-content: flex-start;
        gap: 18px;
        max-width: calc(100vw - 92px);
        padding: 10px 2px 8px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .nav-links a {
        font-size: 0.82rem;
    }

    #home,
    #about,
    #expertise,
    #research,
    #experience,
    #teaching,
    #publications,
    #contact {
        scroll-margin-top: 85px;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 65px 22px 75px;
    }

    .monogram {
        grid-row: 1;
        width: 135px;
        height: 135px;
        border-width: 8px;
        font-size: 2.5rem;
    }

    .hero h1 {
        font-size: clamp(3.2rem, 16vw, 5rem);
    }

    .about-grid,
    .card-grid,
    .project-grid,
    .teaching-grid,
    .publication-list.compact {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 68px 22px;
    }

    .alternate {
        padding-right: 22px;
        padding-left: 22px;
    }

    .about-grid {
        gap: 30px;
    }

    .award-section,
    .contact-section {
        margin-right: 20px;
        margin-left: 20px;
        padding: 38px 25px;
    }

    footer {
        display: block;
        padding: 27px 22px;
        text-align: center;
    }

    footer p + p {
        margin-top: 7px;
    }
}

/* Small phones */

@media (max-width: 480px) {

    body {
        font-size: 15px;
    }

    .hero-buttons,
    .contact-links,
    .publication-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .hero h1 {
        font-size: 3.25rem;
    }

    .section-heading h2,
    .award-section h2,
    .contact-section h2 {
        font-size: 2.1rem;
    }

    .card,
    .project-card,
    .teaching-card,
    .publication-list article,
    .details-card {
        padding: 23px;
    }

    .timeline-item {
        padding-left: 31px;
    }

    .cv-links {
        display: grid;
        gap: 12px;
    }
}
