:root {
    --bg: #f4f6fb;
    --bg-strong: #0b1220;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: #eef2fb;
    --text: #101828;
    --text-strong: #0b1220;
    --text-muted: #475467;
    --text-inverse: #f8fafc;
    --border: rgba(15, 23, 42, 0.08);
    --accent: #7c6bfc;
    --accent-strong: #5b4ee5;
    --accent-soft: rgba(124, 107, 252, 0.12);
    --shadow: 0 24px 50px rgba(15, 23, 42, 0.07);
    --shadow-strong: 0 30px 70px rgba(4, 10, 21, 0.26);
    --radius: 20px;
    --container: 1120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

section[id] {
    scroll-margin-top: 5.5rem;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

.reveal-delay-1 {
    transition-delay: 0.08s;
}

.reveal-delay-2 {
    transition-delay: 0.16s;
}

.reveal-delay-3 {
    transition-delay: 0.24s;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 18, 32, 0.82);
    backdrop-filter: blur(20px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.5rem;
}

.brand {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-inverse);
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    position: relative;
    color: rgba(248, 250, 252, 0.66);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
    color: var(--text-inverse);
}

.nav a.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.header-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.header-cta {
    min-height: 2.35rem;
    padding: 0.58rem 1.08rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
    font-size: 0.85rem;
}

.header-cta:hover {
    background: rgba(255, 255, 255, 0.15);
}

.button {
    min-height: 2.85rem;
    padding: 0.85rem 1.28rem;
    border: 1px solid transparent;
    background: var(--accent);
    color: var(--text-inverse);
    font-size: 0.95rem;
    box-shadow: 0 14px 28px rgba(91, 78, 229, 0.2);
}

.button:hover {
    transform: translateY(-1px);
    background: var(--accent-strong);
}

.button-secondary {
    border-color: rgba(255, 255, 255, 0.22);
    background: transparent;
    box-shadow: none;
}

.button-secondary:hover {
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.08);
}

.button-light {
    border-color: rgba(255, 255, 255, 0.28);
}

.hero {
    position: relative;
    min-height: calc(100svh - 4.5rem);
    overflow: clip;
}

.hero-media,
.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media img {
    object-fit: cover;
    object-position: center 42%;
}

.hero-overlay {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100svh - 4.5rem);
    padding: clamp(2.3rem, 4.2vw, 3.4rem) 0;
    background:
        linear-gradient(170deg, rgba(7, 11, 20, 0.92), rgba(7, 11, 20, 0.76), rgba(30, 40, 68, 0.6)),
        linear-gradient(180deg, rgba(124, 107, 252, 0.14), transparent 42%);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero-content {
    max-width: 690px;
    color: var(--text-inverse);
}

.hero-eyebrow,
.section-eyebrow,
.kicker,
.timeline-company,
.tech-category-label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-eyebrow {
    color: rgba(248, 250, 252, 0.62);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(3.35rem, 8vw, 5.7rem);
    line-height: 0.94;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-role {
    margin-top: 1rem;
    font-size: clamp(1.04rem, 2vw, 1.22rem);
    color: rgba(248, 250, 252, 0.74);
}

.hero-headline {
    margin-top: 1.75rem;
    max-width: 17ch;
    font-size: clamp(1.65rem, 3.5vw, 2.75rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.hero-summary {
    margin-top: 1.15rem;
    max-width: 58ch;
    color: rgba(248, 250, 252, 0.72);
    font-size: 1.04rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.85rem;
}

.hero-side {
    display: grid;
    gap: 0.95rem;
    align-self: center;
    justify-self: center;
    width: min(100%, 320px);
}

.headshot-card,
.panel,
.timeline-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.headshot-card {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: var(--shadow-strong);
}

.headshot-card img {
    width: 100%;
    aspect-ratio: 4 / 4.7;
    border-radius: calc(var(--radius) - 4px);
    object-fit: cover;
    object-position: center 24%;
}

.section {
    padding: clamp(3rem, 5.6vw, 4.65rem) 0;
}

.section-muted {
    background: linear-gradient(180deg, rgba(227, 232, 244, 0.58), rgba(244, 246, 251, 0.16));
}

.section-dark {
    background: linear-gradient(180deg, #0d1525, #111b2f);
    color: var(--text-inverse);
}

.section-heading {
    max-width: 720px;
}

.section-heading + .panel {
    margin-top: 0;
}

.section-eyebrow {
    color: var(--accent-strong);
    margin-bottom: 0.9rem;
}

.section-heading h2 {
    color: var(--text-strong);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.section-heading .intro {
    margin-top: 0.95rem;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.section-dark .section-eyebrow {
    color: var(--accent);
}

.section-dark .section-heading h2 {
    color: var(--text-inverse);
}

.section-dark .section-heading .intro {
    color: rgba(248, 250, 252, 0.65);
}

.compact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: end;
}

.panel {
    padding: clamp(1.35rem, 3vw, 2rem);
}

.about-copy p {
    color: var(--text-muted);
    font-size: 1.04rem;
    line-height: 1.85;
}

.timeline-card h3,
.principle-list h3 {
    color: var(--text-strong);
    letter-spacing: -0.02em;
}

.experience-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
    gap: clamp(1.75rem, 5vw, 4rem);
    align-items: start;
}

.sticky-heading {
    position: sticky;
    top: 6.5rem;
}

.timeline {
    position: relative;
    display: grid;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 155px;
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(124, 107, 252, 0.14));
}

.timeline-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 2rem;
    padding: 1.1rem 0;
}

.timeline-marker {
    position: relative;
    text-align: right;
    padding-right: 1.35rem;
}

.timeline-marker::after {
    content: "";
    position: absolute;
    top: 0.36rem;
    right: -5px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline-period {
    color: var(--accent-strong);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.45;
}

.timeline-card {
    padding: 1.45rem;
}

.timeline-company {
    color: var(--text-muted);
    margin-bottom: 0.42rem;
}

.timeline-card h3 {
    font-size: 1.16rem;
}

.timeline-list {
    list-style: none;
    margin-top: 1rem;
    padding: 0;
}

.timeline-list li {
    position: relative;
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.68;
}

.timeline-list li + li {
    margin-top: 0.58rem;
}

.timeline-list li::before {
    content: "";
    position: absolute;
    top: 0.65rem;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.education-card {
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.education-card .intro strong {
    color: var(--text-strong);
    font-weight: 900;
}

.education-meta,
.education-note {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.education-meta {
    margin-top: 1rem;
}

.education-note {
    margin-top: 0.35rem;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.principle-list {
    display: grid;
    gap: 1.1rem;
}

.principle-list > div + div {
    padding-top: 1.1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.principle-list h3 {
    font-size: 1.08rem;
}

.principle-list p {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.tech-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
    gap: clamp(1.75rem, 5vw, 4rem);
    align-items: start;
}

.tech-categories {
    display: grid;
    gap: 1.6rem;
}

.tech-category-label {
    margin-bottom: 0.7rem;
    color: rgba(248, 250, 252, 0.48);
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-pill {
    padding: 0.65rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
    font-size: 0.9rem;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.tech-pill:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
}

.contact-section {
    padding: 2rem 0 1rem;
}

.contact-note {
    max-width: 720px;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.75;
}

.contact-note a {
    color: var(--accent-strong);
    font-weight: 800;
}

.site-footer {
    padding: 0 0 2.4rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.5rem;
    padding-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.18s ease;
}

.footer-links a:hover {
    color: var(--text-strong);
}

@media (max-width: 980px) {
    .hero-layout,
    .compact-grid,
    .experience-layout,
    .split-grid,
    .tech-layout {
        grid-template-columns: 1fr;
    }

    .hero-side {
        margin-bottom: 0;
    }

    .sticky-heading {
        position: static;
    }

}

@media (max-width: 780px) {
    .header-inner {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.82rem 0;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 0.7rem;
    }

    .hero-overlay {
        min-height: auto;
        padding: 2.75rem 0 3.15rem;
    }

    .hero-side {
        grid-template-columns: 1fr;
    }

    .headshot-card {
        max-width: 310px;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.85rem 0;
    }

    .timeline-marker {
        text-align: left;
        padding-right: 0;
    }

    .timeline-marker::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 1.25rem));
    }

    .hero-actions,
    .footer-inner,
    .footer-links {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }

    .header-cta {
        display: none;
    }

    .section {
        padding: 2.8rem 0;
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
