:root {
    --bg-light: #ffffff;
    --bg-dark: #000000;
    --bg-grad1: #111111;
    --bg-grad2: #222222;
    --bg-grad3: #333333;
    --bg-grad4: #444444;
    --ink: #1d1d1f;
    --ink-soft: #afafaf;
    --ink-light: #f0f0f0;
    --ink-blue: #000080;
    --line: rgba(0, 0, 0, 0.08);
    --line-dark: rgba(255, 255, 255, 0.12);
    --accent: #0071e3;
    --accent-ink: #ffffff;
    --radius: 18px;
    --ease: cubic-bezier(.16,1,.3,1);
    --maxw: 1120px;
    --font-display: -apple-system, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-body: -apple-system, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin:0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    font-size: 17px;
    line-height: 1.5;
    background-color: var(--bg-dark);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }

.section-inner, .nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 32px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-links {
    display:flex;
    gap: 28px;
    margin-left: 8px;
    font-size: 16px;
    color: var(--ink-soft);
    font-weight: bolder;
}
.nav-links a { transition: color .2s ease; }
.nav-links a:hover { color: var(--ink-light); }
.nav-cta {
    margin-left: auto;
    font-size: 13px;
    background: var(--ink);
    color: #fff;
    padding: 7px 16px;
    border-radius: 980px;
    transition: background .2s ease;
}
.nav-cta:hover { background: var(--accent); }
.nav-toggle { display: none; }

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 8px 32px 20px;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,0.95);
}
.nav-mobile a {
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
}

/* ============ Hero ============ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 140px 32px 80px;
    max-width: var(--maxw);
    margin: 0 auto;
    position: relative;
}
.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 18px;
}
.hero-title {
    font-size: clamp(44px, 7vw, 92px);
    line-height: 1.02;
    font-weight: 600;
    max-width: 950px;
}
.hero-title .line {
    display: block;
    overflow: hidden;
    color: white;
}
.hero-title .line > * { display: inline-block; }
.hero-title em {
    font-style: normal;
    color: var(--accent);
}
.hero-sub {
    margin-top: 28px;
    max-width: 520px;
    font-size: 19px;
    color: var(--ink-soft);
}
.hero-actions {
    margin-top: 40px;
    display:flex;
    gap: 16px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    transition: transform .25s var(--ease), background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background:#0060c0; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ============ Section shell ============ */
.section { padding: 140px 0; }
.section-title {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 600;
    max-width: 640px;
    margin-top: 8px;
}
.section-grad-1 {
    background: var(--bg-grad1);
    color: #f5f5f7;
}
.section-grad-2 {
    background: var(--bg-grad2);
    color: #f5f5f7;
}
.section-grad-3 {
    background: var(--bg-grad3);
    color: #f5f5f7;
}
.section-grad-4 {
    background: var(--bg-grad4);
    color: #f5f5f7;
}
.section-dark .eyebrow { color: #64a9ff; }

.project-grid {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.project-card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    background: #fff;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
    transform-style: preserve-3d;
    will-change: transform;
}
.project-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.project-media {
    aspect-ratio: 16/10;
    background: linear-gradient(155deg, color-mix(in srgb, var(--tint) 18%, white), color-mix(in srgb, var(--tint) 4%, white));
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-glyph {
    font-size: 56px;
    color: var(--tint);
    opacity: 0.85;
}
.project-body { padding: 26px 26px 30px; }
.project-body h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--ink-blue);
    margin-bottom: 10px;
}
.project-body p {
    font-size: 14.5px;
    color: var(--ink);
    margin: 0 0 18px;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.tag-list li {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 980px;
    background: #f5f5f7;
    color: var(--ink);
}
.project-links { display:flex; gap: 18px; }
.project-links a {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

/* ============ Timeline ============ */
.timeline { margin-top: 64px; }
.timeline-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 32px 0;
    border-top: 1px solid var(--line-dark);
}
.timeline-row:last-child { border-bottom: 1px solid var(--line-dark); }
.timeline-date {
    font-size: 13px;
    color: #98989d;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.timeline-content h3 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 10px;
}
.timeline-content p {
    color: #a1a1a6;
    font-size: 15px;
    max-width: 620px;
}

/* ============ About ============ */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 64px;
}
.about-copy p {
    color: var(--ink-soft);
    font-size: 17px;
    max-width: 560px;
    margin: 0 0 20px;
}

.contact-inner { text-align: center; }
.contact .section-title { margin: 8px auto 0; }
.contact-sub {
    color: var(--ink-soft);
    font-size: 18px;
    margin: 20px auto 0;
}
.contact-links { margin-top: 36px; }
.social-links {
    margin-top: 28px;
    display: flex;
    gap: 28px;
    justify-content: center;
    font-size: 14px;
    color: var(--ink-soft);
}
.social-links a:hover { color: var(--ink); }

.footer {
    text-align: center;
    padding: 8px;
    font-size: 12.5px;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        margin-left: auto;
        padding: 8px;
        cursor: pointer;
    }
    .nav-toggle span {
        width: 20px; height: 3.5px;
        background: var(--ink-light);
        transition: transform .25s ease, opacity .25s ease;
    }
    .nav-mobile.open { display: flex; }

    .project-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .timeline-row { grid-template-columns: 1fr; gap: 8px; }
    .section { padding: 90px 0; }
    .hero { padding-top: 120px; }
}