/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: #08090c;
    color: #e2e8f0;
    overflow-x: hidden;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --green: #10b981;
    --green-dim: #065f46;
    --blue: #3b82f6;
    --surface: #111318;
    --surface2: #1a1e26;
    --border: #1e2530;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-faint: #475569;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity:0; transform:translateY(28px); }
    to   { opacity:1; transform:translateY(0); }
}
@keyframes pulse-ring {
    0%,100% { transform: scale(1); opacity:.5; }
    50%      { transform: scale(1.05); opacity:.8; }
}

.fade-in { opacity:0; transform:translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity:1; transform:translateY(0); }

/* ── Nav ──────────────────────────────────────────────────── */
.navigation {
    position: fixed; top:0; left:0; right:0; z-index:100;
    height: 56px;
    background: rgba(8,9,12,.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}
.navigation.scrolled { border-bottom-color: var(--border); }
.nav-container {
    max-width: 1100px; margin: 0 auto;
    padding: 0 24px; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 18px; color: var(--green);
    letter-spacing: -.02em;
}
.nav-links { display: flex; gap: 32px; }
.nav-link {
    font-size: 14px; font-weight: 500;
    color: var(--text-dim); letter-spacing: .03em;
    transition: color .2s;
}
.nav-link:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding: 100px 24px 80px;
    position: relative; overflow: hidden;
    max-width: 1100px; margin: 0 auto;
    gap: 60px;
}
.hero-bg {
    position: fixed; inset:0; z-index:-1; pointer-events:none;
}
.hero-glow {
    position: absolute; border-radius: 50%;
    filter: blur(120px); opacity: .15;
}
.g1 { width:600px; height:600px; background:var(--green); top:-200px; left:-100px; }
.g2 { width:500px; height:500px; background:var(--blue); top:200px; right:-150px; }
.grid-overlay {
    position: absolute; inset:0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

.hero-content { flex: 1; max-width: 580px; }
.hero-eyebrow {
    font-size: 13px; font-weight: 500; letter-spacing: .12em;
    text-transform: uppercase; color: var(--green);
    margin-bottom: 20px;
}
.hero-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(64px, 9vw, 100px);
    font-weight: 700; line-height: .95;
    color: #f8fafc; letter-spacing: -.04em;
    margin-bottom: 24px;
}
.hero-name-light { color: var(--text-dim); }
.hero-sub {
    font-size: 17px; line-height: 1.7;
    color: var(--text-dim); max-width: 480px;
    margin-bottom: 36px;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
    display: inline-block;
    padding: 12px 24px; border-radius: 8px;
    background: var(--green); color: #000;
    font-weight: 700; font-size: 14px;
    transition: background .2s, transform .15s;
}
.btn-primary:hover { background: #34d399; transform: translateY(-2px); }
.btn-ghost {
    display: inline-block;
    padding: 12px 24px; border-radius: 8px;
    border: 1px solid var(--border); color: var(--text-dim);
    font-weight: 500; font-size: 14px;
    transition: border-color .2s, color .2s, transform .15s;
}
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); transform: translateY(-2px); }

.hero-photo-wrap {
    position: relative; flex-shrink: 0;
    width: 300px; height: 300px;
}
.hero-photo-ring {
    position: absolute; inset: -8px; border-radius: 50%;
    border: 2px solid var(--green);
    opacity: .4;
    animation: pulse-ring 3s ease-in-out infinite;
}
.hero-photo {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
}



/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 100px 24px; }
.section-dark { background: var(--surface); }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
    font-size: 12px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--green);
    margin-bottom: 12px;
}
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700; letter-spacing: -.03em;
    color: #f8fafc; margin-bottom: 56px; line-height: 1.1;
}

/* ── Featured Card ────────────────────────────────────────── */
.featured-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative; overflow: hidden;
}
.featured-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(16,185,129,.05) 0%, transparent 60%);
    pointer-events: none;
}
.featured-badge {
    display: inline-block;
    padding: 5px 14px; border-radius: 999px;
    background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3);
    color: var(--green); font-size: 12px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    margin-bottom: 28px;
}
.featured-inner {
    display: grid; grid-template-columns: 1fr 340px; gap: 48px;
    align-items: start;
}
.project-tag {
    font-size: 12px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-faint);
    margin-bottom: 12px;
}
.project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px; font-weight: 700; color: #f8fafc;
    letter-spacing: -.02em; margin-bottom: 16px;
}
.project-desc {
    font-size: 15px; color: var(--text-dim); line-height: 1.75;
    margin-bottom: 28px;
}
.project-desc strong { color: var(--green); font-weight: 600; }

/* Stats */
.stat-row { display: flex; gap: 32px; margin-bottom: 32px; flex-wrap: wrap; }
.stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px; font-weight: 700; color: #f8fafc;
    letter-spacing: -.03em;
}
.stat-lbl { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* Detail items */
.project-details { display: flex; flex-direction: column; gap: 14px; }
.detail-item { display: flex; gap: 16px; font-size: 14px; }
.detail-label {
    flex-shrink: 0; width: 160px;
    font-weight: 600; color: var(--text-dim);
}
.detail-val { color: var(--text-faint); line-height: 1.6; }

/* Pipeline viz */
.pipeline-viz {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px; flex-wrap: wrap;
}
.pipe-step {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px; text-align: center;
    flex: 1; min-width: 80px;
}
.pipe-step.active { border-color: var(--green); background: rgba(16,185,129,.08); }
.pipe-icon { font-size: 20px; margin-bottom: 4px; }
.pipe-name { font-size: 13px; font-weight: 700; color: #f8fafc; }
.pipe-sub { font-size: 11px; color: var(--text-faint); }
.pipe-arrow { color: var(--text-faint); font-size: 18px; }

/* Impact callout */
.impact-callout {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: 10px; padding: 20px;
    margin-top: 16px;
}
.impact-callout-title {
    font-size: 11px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--green); margin-bottom: 10px;
}
.impact-callout p {
    font-size: 14px; color: var(--text-dim); line-height: 1.75;
}
body.light .impact-callout { background: #ffffff; }


/* ── Project Cards Grid ───────────────────────────────────── */
.projects-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.project-card {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 12px; padding: 28px;
    transition: border-color .25s, transform .2s;
}
.project-card:hover { border-color: #2d3748; transform: translateY(-3px); }
.project-card-tag {
    font-size: 11px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px;
}
.project-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px; font-weight: 700; color: #f8fafc;
    margin-bottom: 10px; letter-spacing: -.01em; line-height: 1.3;
}
.project-card-desc {
    font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 16px;
}
.project-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card-chips span {
    padding: 3px 10px; border-radius: 999px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border);
    font-size: 11px; color: var(--text-faint); font-weight: 500;
}

/* ── Skills ───────────────────────────────────────────────── */
.skills-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.skill-group-title {
    font-size: 12px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--green); margin-bottom: 12px;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips span {
    padding: 5px 12px; border-radius: 999px;
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    font-size: 13px; color: var(--text-dim);
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline { position: relative; }
.timeline::before {
    content: ''; position: absolute;
    left: 7px; top: 8px; bottom: 8px; width: 1px;
    background: var(--border);
}
.timeline-item {
    display: flex; gap: 28px; margin-bottom: 40px;
    position: relative;
}
.timeline-dot {
    width: 15px; height: 15px; flex-shrink: 0; margin-top: 4px;
    border-radius: 50%;
    border: 2px solid var(--green); background: var(--green-dim);
}
.timeline-date { font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.timeline-company {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px; font-weight: 700; color: #f8fafc;
    letter-spacing: -.01em;
}
.timeline-role { font-size: 14px; color: var(--green); margin-bottom: 8px; font-weight: 500; }
.timeline-desc { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

/* ── Contact ──────────────────────────────────────────────── */
.contact-container { text-align: center; }
.contact-sub { font-size: 16px; color: var(--text-dim); margin-bottom: 40px; }
.contact-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.contact-card {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 12px; padding: 28px 36px;
    min-width: 200px; text-align: center;
    transition: border-color .2s, transform .15s;
    display: block;
}
.contact-card:hover { border-color: var(--green); transform: translateY(-3px); }
.contact-icon {
    font-size: 22px; font-weight: 700; color: var(--green);
    margin-bottom: 8px;
}
.contact-label { font-size: 11px; color: var(--text-faint); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.contact-val { font-size: 14px; color: var(--text-dim); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; justify-content: space-between;
    font-size: 13px; color: var(--text-faint);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; }
    .hero-photo-wrap { width: 200px; height: 200px; }
    .hero-sub { max-width: 100%; }
    .hero-cta-row { justify-content: center; }
    .featured-inner { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr 1fr; }
    .skills-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .projects-grid, .skills-grid { grid-template-columns: 1fr; }
    .stat-row { gap: 20px; }
    .contact-links { flex-direction: column; align-items: center; }
    .detail-item { flex-direction: column; }
    .detail-label { width: auto; }
}

/* ── Light Theme ──────────────────────────────────────────── */
body.light {
    background: #f8fafc;
    color: #1e293b;
}
body.light { --surface: #ffffff; --surface2: #f1f5f9; --border: #e2e8f0; --text: #1e293b; --text-dim: #475569; --text-faint: #94a3b8; }
body.light .hero-bg { display: none; }
body.light .navigation { background: rgba(248,250,252,.9); }
body.light .navigation.scrolled { border-bottom-color: var(--border); }
body.light .nav-brand { color: var(--green); }
body.light .nav-link { color: var(--text-dim); }
body.light .hero-name { color: #0f172a; }
body.light .hero-name-light { color: var(--text-dim); }
body.light .section-title { color: #0f172a; }
body.light .featured-card { background: var(--surface2); border-color: var(--border); }
body.light .featured-card::before { background: linear-gradient(135deg, rgba(16,185,129,.04) 0%, transparent 60%); }
body.light .project-card { background: #ffffff; border-color: var(--border); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
body.light .project-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
body.light .pipe-step { background: #ffffff; border-color: var(--border); }
body.light .marquee-bar { background: var(--surface2); }
body.light .marquee-fade.left  { background: linear-gradient(90deg,  var(--surface2), transparent); }
body.light .marquee-fade.right { background: linear-gradient(270deg, var(--surface2), transparent); }
body.light .section-dark { background: var(--surface2); }
body.light .contact-card { background: #ffffff; border-color: var(--border); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
body.light .footer { background: var(--surface2); }
body.light .stat-num { color: #0f172a; }
body.light .timeline-company { color: #0f172a; }
body.light .project-title { color: #0f172a; }
body.light .project-card-title { color: #0f172a; }
body.light .pipe-name { color: #0f172a; }

/* ── Research badge ───────────────────────────────────────── */
.research-tag { color: #f59e0b !important; }
.research-badge {
    display: inline-block;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.3);
    color: #f59e0b; font-size: 11px; font-weight: 600;
    vertical-align: middle; margin-left: 6px;
}

/* ── Theme Toggle Button ──────────────────────────────────── */
.theme-toggle {
    position: fixed; bottom: 28px; right: 28px; z-index: 200;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--surface2); border: 1px solid var(--border);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    transition: transform .2s, box-shadow .2s;
}
.theme-toggle:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.toggle-icon { line-height: 1; }
/* dark mode: show moon, hide sun */
body:not(.light) .light-icon { display: none; }
body:not(.light) .dark-icon  { display: block; }
/* light mode: show sun, hide moon */
body.light .dark-icon  { display: none; }
body.light .light-icon { display: block; }
