:root {
  --bg: #070a14;
  --bg-2: #0a0e1a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e7ecf5;
  --muted: #8b97ad;
  --c1: #22d3ee;
  --c2: #6366f1;
  --c3: #a855f7;
  --grad: linear-gradient(120deg, #22d3ee, #6366f1 45%, #a855f7);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, .brand { font-family: "Sora", sans-serif; letter-spacing: -0.02em; }

/* ---------- Aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1200px 600px at 70% -10%, rgba(99,102,241,0.18), transparent 60%),
  radial-gradient(900px 500px at 10% 10%, rgba(34,211,238,0.12), transparent 55%),
  var(--bg); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; mix-blend-mode: screen; }
.orb-1 { width: 480px; height: 480px; background: #2563eb; top: -120px; left: -80px; animation: float1 18s ease-in-out infinite; }
.orb-2 { width: 420px; height: 420px; background: #a855f7; top: 40%; right: -120px; animation: float2 22s ease-in-out infinite; }
.orb-3 { width: 360px; height: 360px; background: #22d3ee; bottom: -120px; left: 30%; animation: float3 20s ease-in-out infinite; }
.grid-overlay { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px; mask-image: radial-gradient(circle at 50% 0%, black, transparent 80%); }
@keyframes float1 { 50% { transform: translate(80px, 60px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-70px, -50px) scale(1.15); } }
@keyframes float3 { 50% { transform: translate(40px, -70px) scale(0.95); } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px); transition: all 0.35s ease;
}
.nav.scrolled {
  background: rgba(10, 14, 26, 0.7); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); padding-top: 12px; padding-bottom: 12px;
}
.brand { font-size: 22px; font-weight: 800; }
.brand span { color: var(--c1); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 9px 18px; border: 1px solid var(--border); border-radius: 999px; color: var(--text) !important; background: var(--surface); }
.nav-cta:hover { border-color: var(--c2); }
.menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ---------- Layout ---------- */
main { width: 100%; }
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 11vw, 130px) clamp(20px, 5vw, 24px); }
.section-head { margin-bottom: 54px; max-width: 720px; }
.kicker { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--c1); letter-spacing: 0.1em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(28px, 4.5vw, 46px); font-weight: 800; margin-top: 14px; line-height: 1.1; }
.section-sub { color: var(--muted); margin-top: 16px; font-size: 17px; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px 20px 60px; position: relative; }
.hero-inner { max-width: 880px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); margin-bottom: 30px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero h1 { font-size: clamp(48px, 11vw, 120px); font-weight: 800; line-height: 0.95; }
.hero h1 .line { display: block; }
.role { font-family: "JetBrains Mono", monospace; font-size: clamp(15px, 2.6vw, 21px); color: var(--c1); margin: 22px 0 8px; min-height: 1.5em; }
.caret { animation: blink 1s step-end infinite; color: var(--muted); }
@keyframes blink { 50% { opacity: 0; } }
.lede { font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 640px; margin: 14px auto 0; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 16px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; justify-content: center; margin-top: 34px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.hero-meta a { border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.hero-meta a:hover { border-color: var(--c2); color: var(--text); }
.scroll-hint { position: absolute; bottom: 26px; font-size: 22px; color: var(--muted); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: transform 0.2s, box-shadow 0.25s, background 0.25s; }
.btn span { transition: transform 0.2s; }
.btn-primary { background: var(--grad); color: #06080f; box-shadow: 0 10px 30px -10px rgba(99,102,241,0.6); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px rgba(99,102,241,0.8); }
.btn-primary:hover span { transform: translateX(4px); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--c2); transform: translateY(-3px); }

/* ---------- Stats ---------- */
.stats { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0 clamp(20px, 5vw, 24px); }
.stat { text-align: center; padding: 34px 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); backdrop-filter: blur(6px); }
.stat .num { font-family: "Sora", sans-serif; font-size: clamp(32px, 5vw, 48px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: block; }
.stat label { color: var(--muted); font-size: 14px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; font-size: 18px; color: var(--muted); }
.about-grid strong { color: var(--text); font-weight: 600; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 8px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--c2), var(--c3), transparent); }
.t-item { position: relative; padding-left: 42px; margin-bottom: 26px; }
.t-dot { position: absolute; left: 0; top: 26px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--c1); box-shadow: 0 0 0 4px rgba(34,211,238,0.12); }
.t-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px 26px; transition: transform 0.25s, border-color 0.25s, background 0.25s; }
.t-card:hover { transform: translateX(6px); border-color: rgba(99,102,241,0.4); background: var(--surface-2); }
.t-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.t-date { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--c1); }
.t-loc { font-size: 13px; color: var(--muted); }
.t-card h3 { font-size: 20px; margin-bottom: 2px; }
.t-org { color: var(--c3); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.t-card p:last-child { color: var(--muted); font-size: 15px; }
.t-card strong { color: var(--text); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; transition: transform 0.3s, border-color 0.3s; }
.proj::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 50% -30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); opacity: 0; transition: opacity 0.35s; }
.proj:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.proj:hover::before { opacity: 1; }
.proj > * { position: relative; z-index: 1; }
.proj-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.proj-tag { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--accent); padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 999px; }
.live { font-size: 12px; color: #34d399; }
.proj h3 { font-size: 22px; margin-bottom: 10px; }
.proj p { color: var(--muted); font-size: 15px; flex-grow: 1; }
.proj-stack { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 16px; }
.proj-stack span { font-size: 12px; color: var(--muted); padding: 4px 10px; background: rgba(255,255,255,0.05); border-radius: 7px; }
.proj-link { font-size: 14px; font-weight: 600; color: var(--accent); }
.proj-platform { cursor: default; }
.proj-platform:hover { transform: translateY(-6px); }
.more-work { text-align: center; margin-top: 40px; color: var(--muted); font-size: 15px; }
.more-work strong { color: var(--text); }

/* ---------- Stack ---------- */
.stack-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stack-group { padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.stack-group h4 { font-size: 14px; color: var(--c1); margin-bottom: 14px; font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: 0.05em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { font-size: 14px; padding: 7px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; transition: border-color 0.2s, transform 0.2s; }
.pills span:hover { border-color: var(--c2); transform: translateY(-2px); }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-h { font-size: clamp(34px, 6vw, 64px); font-weight: 800; line-height: 1.05; margin: 16px 0; }
.contact-sub { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 34px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 30px clamp(20px, 5vw, 24px); border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 14px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 64px; right: 16px; left: 16px; flex-direction: column; gap: 16px; padding: 20px; background: rgba(12,16,28,0.96); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 18px; }
  .projects, .stack-groups { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb, .scroll-hint, .status-dot { animation: none; }
}
