/* ── Self-hosted Inter font ── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('assets/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0304, U+0308, U+0310, U+0323, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Variables ── */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-border: #e5e7eb;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 820px;
}

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

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Typography ── */
h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
h2 {
    font-weight: 400;
    font-style: italic;
    color: var(--color-text);
    font-size: 18px;
    margin: 10px 0 0 0;
    line-height: 1.5;
    opacity: 0.8;
}
h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 32px 0 16px 0;
}
h3:first-of-type { margin-top: 0; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--color-accent-hover); }

p { color: var(--color-text-muted); }

/* ── Hero ── */
#hero { padding: 56px 0 32px; }

.hero-row {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero-photo { flex-shrink: 0; }

.headshot {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.hero-text { flex: 1; }

.hero-linkedin {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 8px;
    color: var(--color-text-muted);
    position: relative;
    top: -2px;
}
.hero-linkedin:hover { color: var(--color-accent); }

.hero-divider {
    width: 48px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
    margin: 16px 0;
}

.current-role {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* ── Sections ── */
section { padding: 36px 0; }
section.alt { background: var(--color-bg-alt); }

.section-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.section-link {
    font-size: 14px;
    font-weight: 500;
}

.section-intro {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    max-width: 100%;
    line-height: 1.6;
}

/* ── Bio ── */
.bio-text {
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 16px;
}
.bio-text:last-of-type { margin-bottom: 0; }

/* ── Stats Strip ── */
.stats-strip {
    display: flex;
    gap: 0;
    margin-top: 28px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-bg);
}
.stat {
    flex: 1;
    padding: 20px 16px;
    text-align: center;
    border-right: 1px solid var(--color-border);
}
.stat:last-child { border-right: none; }
.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.stat-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
    line-height: 1.3;
}

/* ── Timeline ── */
.timeline { position: relative; }

.entry {
    display: grid;
    grid-template-columns: 95px 56px 1fr;
    padding-bottom: 20px;
}
.entry:last-child { padding-bottom: 0; }

.timespan {
    font-size: 13px;
    color: #999;
    text-align: right;
    padding-right: 12px;
    padding-top: 2px;
    white-space: nowrap;
}

.ico {
    position: relative;
    border-left: 2px solid #c5c8cd;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}

.ico img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    margin-left: 6px;
}

.entry-dot {
    position: absolute;
    top: 6px;
    left: -7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b0b4ba;
    border: 2px solid var(--color-bg);
}
.alt .entry-dot {
    border-color: var(--color-bg-alt);
}

.desc { padding-left: 16px; }

.entry-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}
.entry-title a { color: var(--color-text); }
.entry-title a:hover { color: var(--color-accent); }

.entry-subtitle {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 14px;
}

.entry-role {
    font-size: 14px;
    color: var(--color-accent);
    font-weight: 500;
    margin: 2px 0 4px;
}

.entry-detail {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.entry-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.entry-pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-accent);
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 4px;
    padding: 1px 8px;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.entry-pill:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--color-accent);
    color: var(--color-accent-hover);
}

.entry-advisors {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}
.entry-advisors a {
    color: var(--color-text);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    transition: color 0.2s, border-color 0.2s;
}
.entry-advisors a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.entry-years-mobile { display: none; }

/* ── Talks Grid ── */
.talks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.talk-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: border-color 0.2s, transform 0.2s;
    display: block;
    color: var(--color-text);
}
a.talk-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    color: var(--color-text);
}
.talk-thumb {
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    position: relative;
    padding: 12px;
    line-height: 1.3;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.play-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.talk-info {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Photo Grid (Mountains) ── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

a.photo-card { color: inherit; text-decoration: none; }
.photo-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.photo-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.photo-placeholder {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.photo-caption {
    padding: 10px 12px;
    font-size: 14px;
    flex: 1;
    color: var(--color-text);
    font-weight: 500;
    background: var(--color-bg);
}
.photo-detail {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* ── Publications ── */
.pub {
    display: block;
    font-size: 14px;
    border-left: 4px solid #c5c8cd;
    padding: 4px 0 4px 14px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
a.pub { color: inherit; }
.pub:hover { border-left-color: var(--color-accent); }
.pub-title { color: var(--color-text); font-weight: 500; }
.pub-venue { color: var(--color-accent); }
.pub-authors { display: block; color: var(--color-text-muted); margin-top: 2px; }

.patent-list {
    list-style: none;
    padding: 0;
}
.patent-list li {
    font-size: 14px;
    color: var(--color-text);
    padding: 6px 0;
    border-bottom: 1px solid #c5c8cd;
}
.patent-list li:last-child { border-bottom: none; }
.patent-id {
    font-size: 12px;
    color: var(--color-text-muted);
    font-family: monospace;
}

/* ── Advisory Grid ── */
.advisory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
a.advisory-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--color-bg);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    min-height: 100px;
    font-weight: 500;
    text-align: center;
    border: 1px solid var(--color-border);
    transition: border-color 0.2s;
    color: var(--color-text);
}
a.advisory-item:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.advisory-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}
.acquired {
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: -2px;
    line-height: 1.2;
}

/* ── Press ── */
.press-list {
    list-style: none;
    padding: 0;
}
.press-list li {
    border-bottom: 1px solid var(--color-border);
}
.press-list li:last-child { border-bottom: none; }
.press-list a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 14px 0;
    color: var(--color-text);
    transition: color 0.15s;
    font-size: 14px;
}
.press-list a:hover { color: var(--color-accent); }
.press-pub {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    min-width: 120px;
    flex-shrink: 0;
}
.press-year {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Beyond Work ── */
.beyond-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.beyond-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s;
    background: var(--color-bg);
}
.beyond-item:hover { border-color: var(--color-accent); }
.beyond-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    padding-top: 1px;
}

/* ── Footer ── */
footer {
    padding: 24px 0;
    border-top: 1px solid var(--color-border);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}
.footer-name:hover { color: var(--color-accent); }
.footer-loc {
    font-size: 13px;
    color: var(--color-text-muted);
}
.footer-linkedin {
    display: flex;
    color: var(--color-text-muted);
    transition: color 0.2s;
}
.footer-linkedin:hover { color: var(--color-accent); }


/* ── Responsive ── */
@media (max-width: 768px) {
    h1 { font-size: 28px; }
    .section-title { font-size: 24px; }

    .hero-row {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    .headshot { width: 130px; height: 130px; }
    .hero-divider { margin: 16px auto; }
    .footer-content { flex-direction: column; gap: 8px; text-align: center; }

    /* Stats strip */
    .stats-strip {
        flex-wrap: wrap;
    }
    .stat {
        flex: 1 1 33%;
        min-width: 0;
    }
    .stat-number { font-size: 20px; }
    .stat-label { font-size: 10px; }

    /* Mobile timeline */
    .entry {
        grid-template-columns: 40px 1fr;
    }
    .timespan { display: none; }
    .ico { justify-content: flex-start; }
    .ico img {
        width: 24px;
        height: 24px;
        margin-left: 8px;
    }
    .entry-dot {
        left: -7px;
        top: 4px;
        width: 10px;
        height: 10px;
    }
    .desc { padding-left: 10px; }
    .entry-years-mobile {
        display: inline;
        font-size: 12px;
        color: var(--color-text-muted);
        font-weight: 400;
    }

    /* Grids */
    .talks-grid { grid-template-columns: repeat(2, 1fr); }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .advisory-grid { grid-template-columns: repeat(2, 1fr); }

    /* Press */
    .press-list a {
        flex-wrap: wrap;
        gap: 4px;
    }
    .press-pub { min-width: auto; }

}

/* Hide mobile-only year spans on desktop — must precede media queries so they can override */

/* ── Photo Mosaic ── */
.mosaic {
    width: 100%;
}
.mosaic-row {
    display: flex;
    gap: 4px;
    height: 280px;
}
.mosaic-item {
    flex: 1;
    overflow: hidden;
}
.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 768px) {
    .mosaic-row {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .mosaic-row {
        flex-wrap: wrap;
        height: auto;
    }
    .mosaic-item {
        flex: 1 1 48%;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .stats-strip { flex-direction: column; }
    .stat { border-right: none; border-bottom: 1px solid var(--color-border); }
    .stat:last-child { border-bottom: none; }

    .talks-grid { grid-template-columns: repeat(2, 1fr); }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .advisory-grid { grid-template-columns: repeat(2, 1fr); }
}
