/* ============ TOKENS ============ */
:root {
    --bg: #0b0c0e;
    --bg-2: #0f1114;
    --surface: #14171b;
    --border: #22262d;
    --text: #f2f2f2;
    --muted: #8a8f98;
    --dim: #5c626c;
    --accent: #b4ff39;        /* electric lime */
    --accent-soft: #b4ff3922;
    --purple: #7c5cff;         /* used sparingly */
    --sans: 'Manrope', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --serif: 'Instrument Serif', serif;
    --max: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--bg); }

.mono { font-family: var(--mono); font-feature-settings: 'ss01'; }
.dim { color: var(--dim); }
.hl { color: var(--accent); }
em {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.label-caps {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
    display: block;
    margin-bottom: 12px;
}

/* ============ BG DECOR ============ */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
    z-index: 0;
    pointer-events: none;
}
.noise {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: 0.05; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(20px, 5vw, 40px);
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(11,12,14,0.7);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.scrolled { border-color: var(--border); background: rgba(11,12,14,0.9); }

.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-weight: 600; font-size: 14px;
    letter-spacing: -0.01em;
}
.brand-dot {
    width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 0 4px var(--accent-soft);
    animation: pulseDot 2s infinite ease-in-out;
}
.brand-name .mono { color: var(--accent); }
@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.nav-links {
    display: flex; gap: 28px;
    font-family: var(--mono); font-size: 13px;
}
.nav-links a {
    color: var(--muted); transition: color 0.2s ease;
    position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: -4px;
    width: 0; height: 1px; background: var(--accent);
    transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px 8px 16px;
    background: var(--accent); color: var(--bg);
    font-family: var(--mono); font-size: 13px; font-weight: 600;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--accent); }

@media (max-width: 780px) { .nav-links { display: none; } }

/* ============ HERO ============ */
.hero {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 160px clamp(20px, 5vw, 40px) 40px;
}
.hero-inner { position: relative; }

.hero-meta { margin-bottom: 28px; }
.tag {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--mono); font-size: 12px;
    color: var(--muted);
}
.pulse {
    width: 6px; height: 6px; background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--accent-soft);
    animation: pulseDot 2s infinite ease-in-out;
}

.display {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(48px, 8vw, 108px);
    line-height: 0.96;
    letter-spacing: -0.04em;
    max-width: 15ch;
}
.display em {
    font-family: var(--serif);
    font-style: italic;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: -0.02em;
}
.display .hl {
    color: var(--accent);
    font-family: var(--serif);
    font-style: italic;
}

.lede {
    margin-top: 32px;
    max-width: 620px;
    font-size: 17px;
    color: var(--muted);
    line-height: 1.65;
}

.hero-actions {
    margin-top: 40px;
    display: flex; flex-wrap: wrap; gap: 12px;
}
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px;
    font-family: var(--mono); font-size: 13px; font-weight: 500;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); background: var(--accent); }
.btn-ghost { color: var(--text); border-color: var(--border); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }

.stat-card {
    position: absolute;
    top: 40px;
    right: 0;
    width: 240px;
    padding: 20px 22px;
    background: rgba(20,23,27,0.6);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
}
.stat-row {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
}
.stat-row:last-child { border-bottom: 0; }
.stat-row .lbl { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }
.stat-row .val { color: var(--accent); font-weight: 600; font-size: 16px; }

@media (max-width: 900px) {
    .stat-card { position: static; margin-top: 40px; width: 100%; }
}

/* ticker */
.ticker {
    position: relative;
    margin-top: 100px;
    padding: 22px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track {
    display: inline-flex; gap: 40px;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    font-family: var(--mono); font-size: 14px;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted);
}
.ticker-track span:nth-child(odd) { color: var(--text); }
.ticker-track span:nth-child(2n) { color: var(--accent); }
@keyframes tickerScroll {
    to { transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */
.section {
    position: relative; z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 100px clamp(20px, 5vw, 40px);
}
.section-head { margin-bottom: 56px; }
.section-num {
    display: block; font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.h-lg {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(32px, 4.5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 18ch;
}

/* ============ ABOUT ============ */
.about-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 60px;
    align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.about-copy p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 62ch;
}
.about-copy p em { color: var(--text); }

.counters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
@media (max-width: 640px) { .counters { grid-template-columns: 1fr; } }
.counter-num {
    display: block;
    font-family: var(--sans); font-weight: 500;
    font-size: 44px;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1;
}
.counter-lbl {
    font-family: var(--mono); font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em; text-transform: uppercase;
    margin-top: 8px;
    display: block;
    max-width: 22ch;
}

.about-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.side-line { font-size: 14px; margin-top: 12px; line-height: 1.4; }
.side-line:first-of-type { margin-top: 4px; }

/* ============ STACK ============ */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.stack-card {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.stack-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--mono); font-size: 12px;
    color: var(--text);
    transition: background 0.2s ease, color 0.2s ease;
}
.chips li:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ============ PROJECTS ============ */
.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 780px) { .projects { grid-template-columns: 1fr; } }

.project {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.3s ease, transform 0.3s ease;
    position: relative; overflow: hidden;
}
.project::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 40%);
    opacity: 0; transition: opacity 0.3s ease;
    pointer-events: none;
}
.project:hover { border-color: var(--accent); }
.project:hover::before { opacity: 1; }
.project-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.chip-outline {
    padding: 5px 12px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--mono); font-size: 11px;
    letter-spacing: 0.1em; text-transform: uppercase;
    border-radius: 999px;
}
.project h3 {
    font-family: var(--sans); font-weight: 500;
    font-size: 24px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 14px;
}
.project h3 .dim { font-family: var(--mono); font-size: 15px; }
.project p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 20px;
}
.tag-list {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}
.tag-list li {
    font-family: var(--mono); font-size: 11px;
    color: var(--muted);
    padding: 2px 0;
}
.tag-list li:not(:last-child)::after { content: ' · '; color: var(--dim); }

/* ============ TIMELINE ============ */
.timeline {
    position: relative;
    padding-left: 32px;
}
.timeline::before {
    content: ''; position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}
.tl-item { position: relative; padding-bottom: 40px; }
.tl-dot {
    position: absolute; left: -32px; top: 6px;
    width: 17px; height: 17px;
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transition: background 0.2s ease;
}
.tl-item:hover .tl-dot { background: var(--accent); }
.tl-body h4 {
    font-family: var(--sans); font-weight: 500;
    font-size: 20px;
    margin: 6px 0 8px;
    letter-spacing: -0.01em;
}
.tl-body p {
    color: var(--muted);
    font-size: 15px;
    max-width: 68ch;
    line-height: 1.65;
}
.tl-body p em { color: var(--text); }

/* ============ AWARDS ============ */
.awards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 780px) { .awards { grid-template-columns: 1fr; } }
.award {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex; gap: 20px; align-items: flex-start;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.award:hover { border-color: var(--accent); transform: translateY(-3px); }
.award-place {
    font-size: 28px;
    color: var(--accent);
    line-height: 1;
    font-weight: 600;
}
.award h4 {
    font-family: var(--sans); font-weight: 500;
    font-size: 17px;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}
.award p { color: var(--muted); font-size: 14px; }

/* ============ CONTACT ============ */
.contact { padding-bottom: 60px; }
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-tile {
    display: block;
    padding: 32px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.contact-tile:hover {
    background: var(--bg);
    border-color: var(--accent);
    transform: translateY(-2px);
}
.contact-val {
    font-size: 22px;
    color: var(--text);
    letter-spacing: -0.01em;
    display: block;
    word-break: break-all;
}
.contact-tile:hover .contact-val { color: var(--accent); }
.closing {
    margin-top: 60px;
    font-size: 22px;
    color: var(--muted);
    max-width: 700px;
    line-height: 1.5;
    letter-spacing: -0.01em;
}
.closing em { color: var(--text); }

/* ============ FOOTER ============ */
.foot {
    position: relative; z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 32px clamp(20px, 5vw, 40px);
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between;
    font-size: 12px;
}

/* ============ REVEAL ANIM ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
