:root {
    --color-bg-dark: #0f172a;
    --color-bg-darker: #020617;
    --color-bg-light: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text-light: #f1f5f9;
    --color-text-dark: #1e293b;
    --color-text-muted: #64748b;
    --color-accent: #000000;
    --color-accent-hover: #334155;
    --color-accent-light: #f1f5f9;
    --color-border: #e2e8f0;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 72rem;
    --nav-height: 4rem;
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-dark);
    background: var(--color-bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin: 0 0 1rem;
}

a {
    color: var(--color-text-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration-thickness: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

main {
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============ NAV ============ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-brand:hover {
    color: #fff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-links a:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
    display: none;
    appearance: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.3rem;
    padding: 0.5rem;
}

.nav-toggle-label:hover {
    color: #f1f5f9;
}

/* ============ HERO ============ */
.timeline-hero {
    padding: 4rem 0 2.5rem;
    background: var(--color-bg-light);
    color: var(--color-text-dark);
}

.timeline-hero-content {
    position: relative;
}

.timeline-hero-top {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.timeline-hero-intro {
    flex: 1;
}

.timeline-hero-greeting {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.timeline-hero-name {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.hero-at-lines {
    list-style: none;
    margin: 0.75rem 0 0.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hero-at-lines li {
    font-size: 1rem;
    color: var(--color-text-dark);
    line-height: 1.5;
}

.hero-at-lines a {
    color: var(--color-text-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hero-at-lines a:hover {
    color: var(--color-accent);
}

.hero-at {
    color: var(--color-text-dark);
    font-weight: 700;
    margin-right: 0.15rem;
    font-size: 1rem;
}

.timeline-hero-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.hero-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: none;
    text-decoration: none;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.hero-social-btn:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: var(--color-accent-light);
}

.hero-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    object-fit: cover;
}

.timeline-hero-avatar {
    flex-shrink: 0;
}

/* ============ TIMELINE / ENTRIES ============ */
.entries-section {
    padding: 0 0 4rem;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.entry-collapsible {
    border-bottom: 1px solid var(--color-border);
}

.entry-trigger {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background: none;
    border: none;
    padding: 1.25rem 0;
    transition: background-color 0.15s ease;
}

.entry-trigger:hover {
    background-color: rgba(15, 23, 42, 0.03);
}

.entry-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text-dark);
    line-height: 1.3;
}

.entry-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    text-align: right;
}

.entry-summary {
    margin: 0.3rem 0 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.entry-links {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
}

.entry-body {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.entry-text {
    flex: 1;
    min-width: 0;
}

.entry-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    min-width: 5rem;
}

.entry-thumb {
    width: 5rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.4rem;
    opacity: 0.85;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.entry-thumb--contain {
    object-fit: contain;
}

.entry-thumb--text {
    width: 5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.entry-detail {
    padding-bottom: 1.25rem;
    display: none;
    font-size: 0.975rem;
}

.entry-collapsible.open > .entry-detail {
    display: block;
}

.entry-collapsible.open .entry-thumb {
    display: none;
}

.timeline-toggle-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
    cursor: pointer;
}

.timeline-illustration {
    max-width: 100%;
    max-height: 22rem;
    object-fit: contain;
    border-radius: 0.75rem;
    margin: 1.5rem auto 1.5rem 0;
    display: block;
}

.timeline-bullets {
    margin: 0.25rem 0 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.timeline-bullets li {
    margin-bottom: 0.35rem;
    line-height: 1.55;
    display: list-item;
}

.timeline-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.btn-ghost:hover {
    color: var(--color-text-dark);
    background: var(--color-accent-light);
}

/* Berkeley "show more" toggle */
.berkeley-more {
    display: none;
}

.berkeley-more.visible {
    display: block;
}

/* Lucide icon sizing */
.icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm {
    width: 0.75rem;
    height: 0.75rem;
}

.icon-lg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        gap: 0.25rem;
    }

    .nav-links a {
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    .timeline-hero {
        padding: 2.5rem 0 1.5rem;
    }

    .timeline-hero-top {
        flex-direction: column-reverse;
        text-align: center;
    }

    .timeline-hero-name {
        font-size: 2.25rem;
    }

    .hero-avatar {
        width: 110px;
        height: 110px;
    }

    .timeline-hero-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .timeline-hero-name {
        font-size: 1.75rem;
    }
}

@media (max-width: 40rem) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ============ PRINT ============ */
@media print {
    .site-nav, .timeline-controls {
        display: none !important;
    }

    body {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        color: #000;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
