@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Syne:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #0f0f0f;
    --paper: #f5f1eb;
    --navy: #0d1b2a;
    --gold: #b8860b;
    --gold-light: #d4a935;
    --muted: #6b6560;
    --accent-bg: #e8e3da;
    --card-bg: #eeebe4;
    --border: rgba(15,15,15,0.12);
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 60px;
    background: rgba(245,241,235,0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: padding var(--transition);
}
nav.scrolled { padding: 13px 60px; }

.nav-name {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-links a {
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 1px;
    background: var(--gold);
    transition: width 0.35s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ── SECTIONS ── */
section { display: none; padding-top: 90px; min-height: 100vh; }
section.active { display: block; }

/* ── SHARED PAGE HEADER ── */
.page-header { padding: 50px 70px 40px; border-bottom: 1px solid var(--border); }

.section-label {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-label::before {
    content: '';
    display: inline-block;
    width: 30px; height: 1px;
    background: var(--gold);
}

.page-title {
    font-size: clamp(36px, 4vw, 60px);
    font-weight: 300;
    line-height: 1.05;
    color: var(--navy);
}
.page-title em { font-style: italic; color: var(--gold); }

/* ══════════════════ HOME ══════════════════ */
#home { padding: 0; }

.home-hero {
    display: grid;
    grid-template-columns: 1fr 3.5fr;
    min-height: 100vh;
}

.hero-left {
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 50px 60px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.hero-photo-wrap {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
    background: #1a3350;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(212,169,53,0.35), 0 0 0 6px rgba(212,169,53,0.1);
}
.hero-photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(212,169,53,0.25);
    pointer-events: none;
}
.hero-photo-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(25%) contrast(1.06);
    transition: filter 0.6s;
}
.hero-photo-wrap:hover img { filter: grayscale(0%) contrast(1); }

.photo-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a3350, #0d1b2a);
    color: rgba(212,169,53,0.4);
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-quote {
    color: rgba(245,241,235,0.5);
    font-style: italic;
    font-size: 15px;
    line-height: 1.85;
    margin-bottom: 6px;
}
.hero-quote-attr {
    color: var(--gold-light);
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-links {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.hero-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(245,241,235,0.65);
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s;
}
.hero-links a:hover { color: var(--gold-light); }

.link-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    transition: transform 0.3s;
}
.hero-links a:hover .link-dot { transform: scale(1.7); }

.hero-right { padding: 120px 70px 80px 80px; }

.hero-name {
    font-size: clamp(42px, 5vw, 66px);
    font-weight: 300;
    line-height: 1.05;
    color: var(--navy);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.hero-name em { font-style: italic; font-weight: 300; color: var(--gold); }

.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 48px;
}

.divider {
    width: 55px; height: 1px;
    background: var(--gold);
    margin-bottom: 40px;
}

.bio-text {
    font-size: 19px;
    line-height: 1.9;
    color: #2a2520;
    margin-bottom: 28px;
}

.edu-section { margin-top: 60px; }
.edu-section h2 {
    font-size: 26px;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 14px;
}
.edu-section h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 36px; height: 1px;
    background: var(--gold);
}

.edu-items { display: flex; flex-direction: column; gap: 12px; }

.edu-item {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px 22px;
    background: var(--card-bg);
    border-left: 2px solid transparent;
    transition: border-color 0.3s, background 0.3s;
}
.edu-item:hover { border-left-color: var(--gold); background: var(--accent-bg); }

.edu-badge {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--navy);
    margin-top: 7px;
}
.edu-inst {
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}
.edu-degree { font-size: 16px; color: var(--muted); font-style: italic; }
.edu-loc {
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--gold);
    text-transform: uppercase;
    margin-top: 4px;
}

/* ══════════════════ RESEARCH ══════════════════ */
#research { padding-top: 90px; }

.research-tabs {
    display: flex;
    padding: 0 70px;
    border-bottom: 1px solid var(--border);
    background: var(--paper);
    position: sticky;
    top: 66px;
    z-index: 50;
    overflow-x: auto;
}

.rtab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 16px 22px;
    cursor: pointer;
    color: var(--muted);
    transition: color 0.25s, border-color 0.25s;
    white-space: nowrap;
}
.rtab:hover { color: var(--ink); }
.rtab.active { color: var(--navy); border-bottom-color: var(--gold); }

.rtab-content { display: none; padding: 54px 70px 80px; }
.rtab-content.active { display: block; }

/* Loading state for async tabs */
.pub-loading {
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 40px 0;
}

.honors-list { display: flex; flex-direction: column; gap: 18px; }
.honor-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 22px 26px;
    background: var(--card-bg);
    border-left: 2px solid transparent;
    transition: border-color 0.3s, background 0.3s;
}
.honor-item:hover { border-left-color: var(--gold); background: var(--accent-bg); }
.honor-star { color: var(--gold); font-size: 20px; flex-shrink: 0; line-height: 1.4; }
.honor-text { font-size: 17px; line-height: 1.7; color: #2a2520; }
.honor-text b { color: var(--navy); }

.grant-list { display: flex; flex-direction: column; gap: 16px; }
.grant-item {
    padding: 24px 28px;
    background: var(--card-bg);
    border-left: 2px solid transparent;
    transition: border-color 0.3s, background 0.3s;
}
.grant-item:hover { border-left-color: var(--gold); background: var(--accent-bg); }
.grant-num {
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.grant-title { font-size: 17px; font-weight: 500; color: var(--navy); line-height: 1.4; margin-bottom: 6px; }
.grant-meta { font-size: 15px; color: var(--muted); font-style: italic; }
.grant-role {
    display: inline-block;
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--navy);
    color: rgba(245,241,235,0.85);
    padding: 3px 10px;
    margin-bottom: 10px;
}

.pub-list { display: flex; flex-direction: column; }
.pub-item {
    padding: 26px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 18px;
    align-items: start;
}
.pub-idx {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--gold);
    padding-top: 4px;
    text-align: right;
}
.pub-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: 6px;
}
.pub-authors { font-size: 15px; color: #3d3830; line-height: 1.6; margin-bottom: 4px; }
.pub-authors b { color: var(--navy); }
.pub-venue { font-size: 14px; color: var(--muted); font-style: italic; }

/* ══════════════════ PROJECTS ══════════════════ */
#projects { padding: 90px 0 0; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2px;
    margin-top: 2px;
}

.project-card {
    background: var(--card-bg);
    padding: 44px 48px;
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 3px;
    background: var(--gold);
    transition: width 0.45s ease;
}
.project-card:hover { background: var(--accent-bg); }
.project-card:hover::before { width: 100%; }

.project-number {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 16px;
}
.project-title {
    font-size: 21px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--navy);
    margin-bottom: 22px;
}
.project-points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.project-points li {
    font-size: 15px;
    line-height: 1.65;
    color: #3d3830;
    padding-left: 18px;
    position: relative;
}
.project-points li::before { content: '—'; position: absolute; left: 0; color: var(--gold); }

/* ══════════════════ POSITIONS ══════════════════ */
#positions { padding: 90px 0 0; }

.positions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin-top: 2px;
}

.pos-card {
    background: var(--card-bg);
    padding: 44px 48px;
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
}
.pos-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 3px;
    background: var(--gold);
    transition: width 0.45s ease;
}
.pos-card:hover { background: var(--accent-bg); }
.pos-card:hover::before { width: 100%; }

.pos-card.full-width {
    grid-column: 1 / -1;
    background: var(--navy);
    color: rgba(245,241,235,0.85);
}
.pos-card.full-width:hover { background: #162437; }
.pos-card.full-width::before { background: var(--gold-light); }

.pos-card.intro-card {
    grid-column: 1 / -1;
    background: var(--accent-bg);
}

.pos-card-label {
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 14px;
}
.pos-card-title {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--navy);
    margin-bottom: 22px;
}
.pos-card.full-width .pos-card-title { color: rgba(245,241,235,0.95); }

.pos-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pos-list li {
    font-size: 16px;
    line-height: 1.6;
    color: #3d3830;
    padding-left: 18px;
    position: relative;
}
.pos-list li::before { content: '—'; position: absolute; left: 0; color: var(--gold); }
.pos-card.full-width .pos-list li { color: rgba(245,241,235,0.7); }

.apply-docs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.apply-doc-tag {
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 5px 14px;
    border: 1px solid rgba(212,169,53,0.3);
    color: rgba(245,241,235,0.6);
}
.apply-email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-light);
    text-decoration: none;
    border: 1px solid rgba(212,169,53,0.35);
    padding: 12px 22px;
    transition: background 0.3s, color 0.3s;
}
.apply-email:hover { background: rgba(212,169,53,0.12); color: #fff; }

/* ══════════════════ FOOTER ══════════════════ */
footer {
    background: var(--navy);
    color: rgba(245,241,235,0.4);
    text-align: center;
    padding: 22px;
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    letter-spacing: 0.12em;
}

/* ══════════════════ ANIMATIONS ══════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.08s; opacity: 0; }
.delay-2 { animation-delay: 0.20s; opacity: 0; }
.delay-3 { animation-delay: 0.34s; opacity: 0; }
.delay-4 { animation-delay: 0.48s; opacity: 0; }

/* ══════════════════ MOBILE ══════════════════ */
@media (max-width: 900px) {
    nav { padding: 16px 22px; }
    nav.scrolled { padding: 11px 22px; }
    .nav-links { gap: 14px; }
    .nav-name { display: none; }

    .home-hero { grid-template-columns: 1fr; }
    .hero-left {
        position: relative; height: auto;
        padding: 90px 24px 36px;
        flex-direction: row; flex-wrap: wrap;
        align-items: flex-start; gap: 20px;
    }
    .hero-photo-wrap { width: 100px; height: 100px; margin-bottom: 0; }
    .hero-left-text { flex: 1; min-width: 140px; }
    .hero-links { flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
    .hero-right { padding: 36px 24px 60px; }
    .hero-name { font-size: 34px; }

    .page-header { padding: 36px 24px 28px; }
    .research-tabs { padding: 0 24px; top: 56px; }
    .rtab { padding: 14px 12px; font-size: 10px; }
    .rtab-content { padding: 36px 24px 60px; }

    .projects-grid { grid-template-columns: 1fr; }
    .project-card { padding: 30px 26px; }

    .positions-grid { grid-template-columns: 1fr; }
    .pos-card { padding: 30px 26px; }
    .pos-card.full-width { grid-column: 1; }
    .pos-card.intro-card { grid-column: 1; }
}
