/* ──────────────────────────────────────────────────────
   Base
   ──────────────────────────────────────────────────── */

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

:root {
    /* palette */
    --bg:           #FBFAF6;
    --bg-elev:      #FFFFFF;
    --text:         #1A1A1F;
    --text-muted:   #6B6B73;
    --text-faint:   #9C9CA3;
    --navy:         #182B49;
    --navy-light:   #2C4470;
    --link:         #2B5C8E;
    --accent:       #B8860B;
    --border:       #E5E2D8;
    --border-soft:  #EFECE3;

    /* type */
    --serif: 'Newsreader', 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* layout */
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(24, 43, 73, 0.05);
    --shadow:    0 6px 20px rgba(24, 43, 73, 0.07);
    --max-w:     920px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection {
    background: rgba(24, 43, 73, 0.15);
}

/* ──────────────────────────────────────────────────────
   Navigation
   ──────────────────────────────────────────────────── */

nav {
    background: rgba(251, 250, 246, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-name {
    color: var(--navy);
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    letter-spacing: 0.005em;
    transition: opacity 0.2s;
}

.nav-name:hover {
    opacity: 0.75;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    padding: 4px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--navy);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}

nav ul li a:hover {
    color: var(--navy);
}

nav ul li a.nav-active {
    color: var(--navy);
}

nav ul li a.nav-active::after {
    transform: scaleX(1);
}

/* ──────────────────────────────────────────────────────
   Page wrappers
   ──────────────────────────────────────────────────── */

.about-main,
.page-main {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 5rem 2.5rem 4rem;
}

.about-main {
    max-width: 1080px;
}

/* ──────────────────────────────────────────────────────
   About
   ──────────────────────────────────────────────────── */

.about-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3.25rem;
    align-items: start;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: sticky;
    top: 96px;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    padding-left: 0.25rem;
}

.sidebar-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: color 0.2s, transform 0.2s;
}

.sidebar-links a:hover {
    color: var(--navy);
    transform: translateX(2px);
}

.sidebar-links i {
    width: 16px;
    text-align: center;
    color: var(--navy);
    font-size: 0.95rem;
}

.about-content {
    padding-top: 0.25rem;
}

.about-content h1 {
    font-family: var(--serif);
    font-size: 2.85rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -0.015em;
}

.position {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.2rem;
    line-height: 1.45;
}

.institution {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.advisor {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.advisor a,
.bio a,
.timeline-body a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid rgba(43, 92, 142, 0.3);
    transition: border-color 0.2s;
}

.advisor a:hover,
.bio a:hover,
.timeline-body a:hover {
    border-color: var(--link);
}

.bio {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1.15rem;
    line-height: 1.75;
}

/* ──────────────────────────────────────────────────────
   Section titles
   ──────────────────────────────────────────────────── */

.section-title {
    font-family: var(--serif);
    font-size: 2.1rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 2rem;
    letter-spacing: -0.015em;
    line-height: 1.1;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 36px;
    height: 3px;
    background: var(--navy);
    border-radius: 2px;
}

.section-subtitle {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--navy);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.005em;
}

/* ──────────────────────────────────────────────────────
   Research
   ──────────────────────────────────────────────────── */

.page-main section p {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1.15rem;
    line-height: 1.75;
}

.research-list {
    list-style: none;
    margin-top: 1rem;
    display: grid;
    gap: 0.9rem;
}

.research-list li {
    font-size: 0.975rem;
    color: var(--text);
    padding: 1.1rem 1.35rem;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--navy);
    border-radius: var(--radius);
    line-height: 1.6;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-left-color 0.2s ease;
}

.research-list li:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
    border-left-color: var(--link);
}

.research-list li strong {
    color: var(--navy);
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 1rem;
}

/* publications */
.publications {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    counter-reset: pub;
}

.publications li {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
    padding-left: 2.25rem;
    position: relative;
    counter-increment: pub;
}

.publications li::before {
    content: counter(pub);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.publications .pub-title {
    color: var(--text);
    font-weight: 500;
}

.publications .pub-venue {
    color: var(--text-muted);
    font-style: italic;
}

.publications .pub-status {
    color: var(--text-faint);
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.4rem;
    padding: 0.1rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-elev);
    white-space: nowrap;
    display: inline-block;
    line-height: 1.4;
    vertical-align: middle;
}

.publications .pub-status-accepted {
    color: #1F6B3E;
    background: #E8F4ED;
    border-color: #BCDDC8;
}

.publications a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid rgba(43, 92, 142, 0.3);
    transition: border-color 0.2s;
}

.publications a:hover {
    border-color: var(--link);
}

/* ──────────────────────────────────────────────────────
   Timeline
   ──────────────────────────────────────────────────── */

.timeline {
    position: relative;
    padding-top: 0.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 162px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2.75rem;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 158px;
    top: 10px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--navy);
    transition: background 0.2s, transform 0.2s;
}

.timeline-item:hover::before {
    background: var(--navy);
    transform: scale(1.1);
}

.timeline-date {
    color: var(--navy);
    font-family: var(--sans);
    font-size: 0.825rem;
    font-weight: 600;
    padding-top: 0.1rem;
    white-space: nowrap;
    text-align: right;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.timeline-body {
    color: var(--text);
    font-size: 0.975rem;
    line-height: 1.65;
    padding-top: 0;
}

.timeline-body strong {
    color: var(--navy);
    font-weight: 600;
}

.timeline-body em {
    color: var(--text-muted);
}

/* ──────────────────────────────────────────────────────
   Footer
   ──────────────────────────────────────────────────── */

footer {
    padding: 2rem 2.5rem 2.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-faint);
    border-top: 1px solid var(--border-soft);
    margin-top: 2rem;
}

footer p {
    margin: 0;
}

/* ──────────────────────────────────────────────────────
   Responsive
   ──────────────────────────────────────────────────── */

@media (max-width: 760px) {
    .nav-inner {
        padding: 0 1.25rem;
        height: 56px;
    }

    nav ul {
        gap: 1.25rem;
    }

    nav ul li a {
        font-size: 0.825rem;
    }

    .about-main,
    .page-main {
        padding: 3rem 1.5rem 3rem;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-sidebar {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        padding-left: 0;
    }

    .profile-photo {
        width: 110px;
        height: 110px;
        margin-bottom: 0;
    }

    .sidebar-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        padding-left: 0;
    }

    .sidebar-links a {
        font-size: 0.825rem;
    }

    .about-content h1 {
        font-size: 2.25rem;
    }

    /* Section */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1.2rem;
        margin-top: 2.25rem;
    }

    /* Timeline collapses to single column on mobile */
    .timeline::before {
        left: 5px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding-left: 2rem;
        padding-bottom: 1.75rem;
    }

    .timeline-item::before {
        left: 1px;
        top: 8px;
    }

    .timeline-date {
        text-align: left;
        font-size: 0.75rem;
    }

    .timeline-body {
        font-size: 0.95rem;
    }

    .publications li {
        font-size: 0.9rem;
    }
}

@media (max-width: 420px) {
    .about-sidebar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
}
