:root {
    --page-width: 1060px;
    --content-width: 920px;
    --ink: #172033;
    --muted: #5c687b;
    --soft: #8792a5;
    --line: #dfe5ed;
    --paper: #ffffff;
    --wash: #f5f8f9;
    --teal: #087f8c;
    --teal-dark: #075e68;
    --amber: #c77716;
    --shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
    --transition: 180ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    color: var(--ink);
    background: #eef2f4;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: break-word;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #f0ae4e;
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    z-index: 20;
    top: 0.75rem;
    left: 1rem;
    padding: 0.65rem 0.9rem;
    border-radius: 5px;
    color: #fff;
    background: var(--ink);
    transform: translateY(-180%);
    transition: transform var(--transition);
}

.skip-link:focus {
    transform: translateY(0);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

.container {
    width: min(var(--content-width), calc(100% - 48px));
    margin: 0 auto;
}

.narrow-container {
    width: min(780px, calc(100% - 48px));
}

.navbar {
    position: fixed;
    z-index: 10;
    top: 0;
    width: 100%;
    border-bottom: 1px solid transparent;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    border-color: var(--line);
    box-shadow: 0 4px 18px rgba(23, 32, 51, 0.06);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(var(--page-width), calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
}

.nav-logo {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: 0;
}

.nav-logo span {
    margin-left: 0.35rem;
    color: var(--soft);
    font-size: 0.88rem;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    gap: 1.65rem;
    list-style: none;
}

.nav-link {
    position: relative;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    background: var(--teal);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
}

.nav-link:hover {
    color: var(--teal-dark);
}

.nav-link.active {
    color: var(--teal-dark);
}

.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hamburger {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    cursor: pointer;
}

.bar {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
    transition: transform var(--transition), opacity var(--transition);
}

main {
    width: min(var(--page-width), calc(100% - 32px));
    margin: 72px auto 0;
    overflow: visible;
    background: var(--paper);
    box-shadow: 0 20px 60px rgba(23, 32, 51, 0.08);
}

.hero {
    padding: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 4rem;
    align-items: center;
    width: min(var(--content-width), calc(100% - 48px));
    margin: 0 auto;
    min-height: 0;
    padding: 4.8rem 0 3.5rem;
}

.hero-text,
.hero-image,
.pub-content {
    min-width: 0;
}

.eyebrow {
    margin-bottom: 0.8rem;
    color: var(--teal);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(2.8rem, 5.8vw, 4.5rem);
    font-weight: 780;
    letter-spacing: 0;
    line-height: 1.02;
    overflow-wrap: break-word;
}

.hero h1 span {
    display: block;
    margin-top: 0.5rem;
    color: var(--teal);
    font-size: 0.38em;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
}

.subtitle {
    max-width: 560px;
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
}

.hero-summary {
    max-width: 570px;
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: var(--teal);
}

.btn-primary:hover {
    background: var(--teal-dark);
}

.btn-secondary {
    color: var(--teal-dark);
    border-color: #9ac8cc;
    background: transparent;
}

.btn-secondary:hover {
    border-color: var(--teal);
    background: #e9f4f5;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-self: center;
}

.portrait-frame {
    position: relative;
    width: min(220px, 100%);
    padding: 10px 10px 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.1);
    transform: none;
}

.profile-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.08;
    object-fit: cover;
    filter: saturate(0.92);
}

.portrait-caption {
    position: absolute;
    right: 10px;
    bottom: 12px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.25;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a36a;
    box-shadow: 0 0 0 4px #e6f5ed;
}

.section {
    padding: 4.5rem 0;
    scroll-margin-top: 72px;
}

.section-muted {
    background: var(--wash);
    border-top: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
}

.section-heading {
    margin-bottom: 1.55rem;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 3.3vw, 2.45rem);
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1.1;
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 2.6rem;
    align-items: start;
}

.about-text {
    min-width: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.about-text p + p {
    margin-top: 1.25rem;
}

.about-text strong {
    color: var(--ink);
}

.skill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.5rem;
}

.skill-row span {
    padding: 0.28rem 0.6rem;
    border: 1px solid #b9dfe1;
    border-radius: 999px;
    color: var(--teal-dark);
    background: #f3fbfb;
    font-size: 0.76rem;
    font-weight: 700;
}

.education-panel {
    padding: 1.15rem 0 1.15rem 1.3rem;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 2px solid var(--teal);
    background: #fbfcfd;
}

.panel-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.4rem;
    color: var(--teal-dark);
}

.panel-heading h3 {
    font-size: 1.02rem;
}

.education-item + .education-item {
    margin-top: 1.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.item-topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink);
    font-size: 0.94rem;
}

.item-topline strong {
    min-width: 0;
    overflow-wrap: break-word;
}

.item-topline span {
    color: var(--soft);
    font-size: 0.8rem;
    white-space: nowrap;
}

.education-item p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.education-item small {
    display: block;
    margin-top: 0.2rem;
    color: var(--soft);
    font-size: 0.8rem;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.research-card {
    min-height: 0;
    padding: 1.35rem 1.2rem 1.4rem;
    border: 1px solid var(--line);
    border-top: 3px solid #a6cfd1;
    border-radius: 5px;
    background: #fbfcfd;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.research-card:hover {
    border-color: #94c9cd;
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.research-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
    place-items: center;
    border-radius: 50%;
    color: var(--teal-dark);
    background: #e7f3f4;
}

.research-card h3 {
    margin-bottom: 0.65rem;
    font-size: 1.05rem;
    line-height: 1.25;
}

.research-card p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.publication-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 1.1rem;
    min-width: 0;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.publication-item:last-child {
    border-bottom: 1px solid var(--line);
}

.featured-publication {
    padding: 1.15rem;
    border: 1px solid #c5dfe0;
    border-left: 4px solid var(--teal);
    background: #f7fbfb;
}

.featured-publication + .publication-item {
    margin-top: 0.25rem;
}

.pub-year {
    color: var(--amber);
    font-size: 1rem;
    font-weight: 800;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
    color: var(--soft);
    font-size: 0.78rem;
    font-weight: 650;
}

.status-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    color: var(--teal-dark);
    background: #e0f0f1;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-badge.accepted {
    color: #8a560d;
    background: #fff1d8;
}

.pub-content h3 {
    max-width: 850px;
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.pub-authors {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.pub-description {
    max-width: 850px;
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.87rem;
}

.pub-description strong {
    color: var(--teal-dark);
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.15rem;
    margin-top: 1rem;
}

.pub-links a,
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--teal-dark);
    font-size: 0.86rem;
    font-weight: 750;
}

.pub-links a:hover,
.project-link:hover {
    color: var(--amber);
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.experience-item {
    position: relative;
    padding: 1rem 1.1rem 1rem 1.3rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    border-radius: 4px;
    background: var(--paper);
    box-shadow: none;
}

.experience-item::before {
    position: absolute;
    top: 1.35rem;
    left: -7px;
    width: 7px;
    height: 7px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 1px var(--teal);
    content: "";
}

.exp-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.exp-header h3 {
    min-width: 0;
    font-size: 1.22rem;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.exp-role {
    margin-top: 0.25rem;
    color: var(--teal-dark);
    font-size: 0.9rem;
    font-weight: 650;
}

.exp-date {
    color: var(--soft);
    font-size: 0.84rem;
    white-space: nowrap;
}

.experience-item ul {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding-left: 1.1rem;
}

.experience-item li {
    padding-left: 0.3rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.experience-item li::marker {
    color: var(--amber);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1.05rem;
    border: 1px solid var(--line);
    border-top: 3px solid #a6cfd1;
    border-radius: 5px;
    background: #fbfcfd;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.project-card:hover {
    border-color: #94c9cd;
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.project-header > div {
    min-width: 0;
}

.project-header > i {
    color: var(--teal);
    font-size: 1.2rem;
}

.project-kicker {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--amber);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-card h3 {
    font-size: 1.14rem;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.project-card p {
    flex: 1;
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.8rem 0;
}

.project-tech span {
    padding: 0.24rem 0.5rem;
    border-radius: 4px;
    color: var(--muted);
    background: var(--wash);
    font-size: 0.72rem;
    font-weight: 650;
}

.project-note {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--soft);
    font-size: 0.84rem;
    font-weight: 650;
}

.honors-list {
    border-top: 1px solid var(--line);
}

.honor-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: baseline;
    padding: 0.78rem 0;
    border-bottom: 1px solid var(--line);
}

.honor-item > span {
    color: var(--amber);
    font-size: 0.8rem;
    font-weight: 800;
}

.honor-item strong {
    font-size: 0.94rem;
}

.honor-item small {
    color: var(--soft);
    font-size: 0.78rem;
}

.contact-section {
    color: #fff;
    margin: 0.9rem;
    padding: 2rem 0;
    border-radius: 7px;
    background: var(--ink);
}

.contact-section a:focus-visible,
.contact-section button:focus-visible {
    outline-color: #f8c16d;
}

.contact-section .eyebrow {
    color: #83d2d4;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 2.8rem;
    align-items: end;
}

.contact-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0;
    line-height: 1.02;
}

.contact-content h2 span {
    color: #83d2d4;
}

.contact-copy {
    max-width: 560px;
    margin-top: 1.2rem;
    color: #b8c2d0;
}

.contact-details {
    padding-left: 2rem;
    border-left: 1px solid #415066;
}

.contact-link,
.location-line {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #e3e9f1;
    font-size: 0.94rem;
}

.contact-link:hover {
    color: #83d2d4;
}

.location-line {
    margin-top: 0.85rem;
    color: #aeb9c8;
}

.contact-link i,
.location-line i {
    width: 18px;
    color: #83d2d4;
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.6rem;
}

.social-icons a {
    display: grid;
    width: 40px;
    height: 40px;
    border: 1px solid #415066;
    border-radius: 6px;
    color: #c7d1df;
    place-items: center;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.social-icons a:hover {
    border-color: #83d2d4;
    color: var(--ink);
    background: #83d2d4;
}

.footer {
    width: min(var(--page-width), calc(100% - 32px));
    margin: 1rem auto 1.5rem;
    padding: 0.9rem 0;
    border-radius: 7px;
    color: #9ca9ba;
    background: #111827;
    font-size: 0.78rem;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 900px) {
    main {
        width: min(100% - 24px, 760px);
    }

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 200px;
        gap: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 0;
    }
}

@media (max-width: 720px) {
    .container,
    .narrow-container {
        width: min(100% - 32px, 560px);
    }

    .nav-container {
        width: calc(100% - 32px);
        min-height: 64px;
    }

    .nav-menu {
        position: absolute;
        top: 64px;
        right: 16px;
        left: 16px;
        display: none;
        padding: 0.6rem;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--paper);
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: grid;
        gap: 0;
    }

    .nav-link {
        display: block;
        padding: 0.7rem 0.8rem;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        color: var(--teal-dark);
        background: #e9f4f5;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .hero {
        padding-top: 3.5rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column-reverse;
        align-items: stretch;
        min-height: auto;
        gap: 2.5rem;
        width: min(100% - 32px, 560px);
        padding-top: 0;
        padding-bottom: 3rem;
    }

    .hero-image {
        justify-content: flex-start;
    }

    .portrait-frame {
        width: min(280px, 80%);
        margin-left: 0.4rem;
    }

    .hero h1 {
        font-size: clamp(2.65rem, 12vw, 3.7rem);
    }

    .subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 3.75rem 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .education-panel {
        padding-left: 1rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

    .research-card {
        min-height: auto;
    }

    .publication-item {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .featured-publication {
        padding: 1.2rem;
    }

    .exp-header {
        flex-direction: column;
        gap: 0.4rem;
    }

    .exp-date {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-details {
        padding-top: 1.5rem;
        padding-left: 0;
        border-top: 1px solid #415066;
        border-left: 0;
    }

    .contact-section {
        margin: 0.75rem;
    }

    .honor-item {
        grid-template-columns: 48px 1fr;
        gap: 0.65rem;
    }

    .honor-item small {
        grid-column: 2;
    }

    .footer {
        width: calc(100% - 24px);
    }
}
