/* =========================================================
   Theme tokens
   ========================================================= */
:root,
:root[data-theme="dark"] {
  --bg: #08090b;
  --surface: #10131a;
  --surface-2: #171b23;
  --fg: #eef1f5;
  --muted: #99a1af;
  --faint: #6c7484;
  --border: #22262f;
  --border-strong: #333944;
  --accent: #5eead4;
  --accent-contrast: #06131a;
  --accent-soft: color-mix(in oklab, var(--accent) 14%, transparent);
  --grid-line: #ffffff0b;
  --violet: #818cf8;
  --amber: #f59e0b;
  --pass: #4ade80;
  --shadow: 0 1px 2px #0006, 0 8px 24px -12px #0009;
  --shadow-lg: 0 2px 4px #0006, 0 24px 48px -20px #000000b3;
  --glow: 0 0 28px color-mix(in oklab, var(--accent) 35%, transparent);
  --aurora-op: 0.55;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fcfcfa;
  --surface: #ffffff;
  --surface-2: #f5f5f1;
  --fg: #101317;
  --muted: #5a6270;
  --faint: #8b93a1;
  --border: #e5e4de;
  --border-strong: #d3d2cb;
  --accent: #0f766e;
  --accent-contrast: #ffffff;
  --grid-line: #1013170d;
  --violet: #6366f1;
  --pass: #16a34a;
  --shadow: 0 1px 2px #1013170a, 0 8px 24px -12px #1013171f;
  --shadow-lg: 0 2px 4px #1013170a, 0 24px 48px -24px #1013173d;
  --glow: none;
  --aurora-op: 0.28;
  color-scheme: light;
}

/* =========================================================
   Base
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; color: var(--fg); }
code, .mono, .kicker, .mono-label, .hud, .status-pill, .rail, .typing, .marquee-label {
  font-family: "Geist Mono", ui-monospace, monospace;
}
::selection { background: var(--accent); color: var(--accent-contrast); }
.container { width: 100%; max-width: 1104px; margin: 0 auto; padding: 0 24px; position: relative; }

/* =========================================================
   Background: aurora, grid, pixels, cursor glow
   ========================================================= */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--aurora-op); animation: drift 22s ease-in-out infinite alternate; }
.a1 { width: 620px; height: 620px; left: -160px; top: -120px; background: radial-gradient(circle, #14b8a6 0%, transparent 70%); }
.a2 { width: 520px; height: 520px; left: 38%; top: 18%; background: radial-gradient(circle, #a16207 0%, transparent 70%); animation-duration: 28s; animation-delay: -6s; }
.a3 { width: 680px; height: 680px; right: -220px; top: -200px; background: radial-gradient(circle, #3b5bdb 0%, transparent 70%); animation-duration: 32s; animation-delay: -12s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, 80px) scale(.95); }
}
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
}
.pixels i {
  position: absolute; width: 8px; height: 8px; background: var(--accent); opacity: 0;
  animation: pixel 6s ease-in-out infinite;
}
@keyframes pixel { 0%, 100% { opacity: 0; } 40%, 60% { opacity: .2; } }
.cursor-glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 10%, transparent) 0%, transparent 65%);
  transform: translate(-50%, -50%); left: -600px; top: -600px; transition: opacity .3s;
}

.corner { position: fixed; width: 18px; height: 18px; border-color: var(--border-strong); border-style: solid; z-index: 40; pointer-events: none; }
.corner.tl { top: 76px; left: 8px; border-width: 1px 0 0 1px; }
.corner.tr { top: 76px; right: 8px; border-width: 1px 1px 0 0; }
.corner.bl { bottom: 8px; left: 8px; border-width: 0 0 1px 1px; }
.corner.br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

/* =========================================================
   HUD
   ========================================================= */
.hud {
  position: fixed; z-index: 45; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  background: color-mix(in oklab, var(--surface) 75%, transparent);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
  backdrop-filter: blur(10px); color: var(--faint); min-width: 158px;
  animation: pop-in .6s cubic-bezier(.2,.8,.2,1) both .4s;
}
.hud b { color: var(--fg); font-weight: 600; }
.hud-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; line-height: 1.9; }
.hud-accent { color: var(--accent) !important; }
.hud-pass { color: var(--pass) !important; }
.hud-tl { top: 92px; left: 8px; }
.hud-bl { bottom: 28px; left: 8px; }
.hud-br { bottom: 28px; right: 64px; }
.hud-sec { font-size: 13px; margin-top: 2px; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 14px; margin-top: 6px; }
.eq i { flex: 1; background: var(--accent); height: 100%; transform-origin: bottom; animation: hud-eq 1.1s ease-in-out infinite; opacity: .85; }
.eq i:nth-child(2n) { animation-delay: -.3s; } .eq i:nth-child(3n) { animation-delay: -.6s; } .eq i:nth-child(5n) { animation-delay: -.9s; }
@keyframes hud-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pass); flex-shrink: 0;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--pass) 60%, transparent); animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--pass) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); margin-left: 3px; vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

/* Scroll rail */
.rail { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); height: 56vh; z-index: 45; width: 20px; }
.rail-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--border); }
.rail-fill { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.rail-pct { position: absolute; top: -26px; right: -4px; font-size: 10px; letter-spacing: .1em; color: var(--accent); font-weight: 600; }
.rail-dots { position: absolute; inset: 0; }
.rail-dot {
  position: absolute; left: 50%; width: 9px; height: 9px; transform: translate(-50%, -50%) rotate(45deg);
  background: var(--bg); border: 1px solid var(--accent); cursor: pointer; pointer-events: auto; transition: all .25s;
}
.rail-dot span {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%) rotate(-45deg); transform-origin: right center;
  font-size: 10px; letter-spacing: .12em; color: var(--accent); white-space: nowrap; opacity: 0; transition: opacity .25s;
}
.rail-dot.active { width: 13px; height: 13px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.rail-dot.active span, .rail-dot:hover span { opacity: 1; }
.rail-scroll { position: absolute; bottom: -64px; left: 50%; transform: translateX(-50%) rotate(90deg); transform-origin: center; font-size: 10px; letter-spacing: .25em; color: var(--faint); }

/* Status pill */
.status-pill {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 45;
  display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: .12em; color: var(--faint);
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  backdrop-filter: blur(10px); white-space: nowrap;
}
.status-pill b { color: var(--fg); }
.status-pill i { width: 1px; height: 12px; background: var(--border-strong); }

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50; height: 68px;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; height: 100%; gap: 20px; max-width: 1180px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand img { border-radius: 50%; border: 1px solid var(--border-strong); }
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-links a { padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border); color: var(--fg); cursor: pointer; transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.menu-btn { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font: 600 15px/1 "Geist", sans-serif; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-accent { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 0 24px color-mix(in oklab, var(--accent) 45%, transparent), 0 6px 18px -6px color-mix(in oklab, var(--accent) 60%, transparent); }
.btn-accent:hover { box-shadow: 0 0 36px color-mix(in oklab, var(--accent) 60%, transparent), 0 10px 24px -6px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn-accent svg { transition: transform .2s; }
.btn-accent:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-light { background: var(--fg); color: var(--bg); }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; min-height: calc(100vh - 68px); display: flex; align-items: center; padding: 72px 0 96px; overflow: hidden; }
.floor {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 60%;
  background-image:
    linear-gradient(color-mix(in oklab, var(--accent) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 22%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(62deg); transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 70%, transparent 100%);
  animation: floor-move 6s linear infinite; opacity: .55;
}
@keyframes floor-move { to { background-position: 0 64px, 0 0; } }

.floaters { position: absolute; inset: 0; pointer-events: none; }
.fl { position: absolute; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .5; filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 50%, transparent)); animation: float-3d 9s ease-in-out infinite; }
.fl.violet { stroke: var(--violet); filter: drop-shadow(0 0 6px color-mix(in oklab, var(--violet) 50%, transparent)); }
.fl.faint { stroke: var(--faint); opacity: .35; filter: none; }
.f1 { width: 64px; left: 22%; top: 6%; animation-delay: -1s; }
.f2 { width: 58px; left: 62%; top: 72%; animation-delay: -3s; }
.f3 { width: 42px; left: 28%; top: 86%; animation-delay: -5s; }
.f4 { width: 54px; left: 50%; top: 8%; animation-delay: -2s; }
.f5 { width: 60px; right: 12%; bottom: 10%; animation-delay: -4s; }
.f6 { width: 70px; left: 44%; top: 40%; animation-delay: -6s; opacity: .18; }
.f7 { width: 90px; left: 6%; top: 58%; animation-delay: -7s; }
.f8 { width: 48px; right: 30%; top: 10%; animation-delay: -2.5s; }
@keyframes float-3d {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  33% { transform: translate3d(8px, -16px, 0) rotate(4deg); }
  66% { transform: translate3d(-10px, -6px, 0) rotate(-2deg); }
}
.tag-float {
  position: absolute; font: 500 12px "Geist Mono", monospace; color: var(--accent); opacity: .45;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); border-radius: 6px; padding: 2px 8px;
  animation: float-3d 11s ease-in-out infinite;
}
.t1 { left: 52%; top: 26%; transform: rotate(8deg); }
.t2 { left: 3%; top: 30%; animation-delay: -4s; }
.t3 { right: 8%; top: 22%; animation-delay: -7s; }

.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; font-size: 13.5px;
  background: color-mix(in oklab, var(--surface) 70%, transparent); border: 1px solid var(--border); color: var(--muted);
}
.hero-name {
  font-size: clamp(3rem, 7.4vw, 5.6rem); line-height: 1; letter-spacing: -.045em; font-weight: 700; margin: 26px 0 18px;
  background: linear-gradient(180deg, var(--fg) 30%, color-mix(in oklab, var(--accent) 55%, var(--fg)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px color-mix(in oklab, var(--accent) 30%, transparent));
}
:root[data-theme="light"] .hero-name { filter: none; }
.typing { font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--accent); min-height: 1.6em; letter-spacing: .02em; }
.hero-desc { font-size: 1.15rem; color: var(--muted); max-width: 600px; margin-top: 22px; line-height: 1.7; }
.hero-desc code { color: var(--accent); font-size: .92em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-contact { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; color: var(--muted); font-size: 15px; }
.hero-contact li, .hero-contact a { display: inline-flex; align-items: center; gap: 8px; }
.hero-contact a:hover { color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; font-size: 13.5px;
  border: 1px solid var(--border-strong); color: var(--muted); transition: all .2s;
}
.chip-link:hover { color: var(--accent); border-color: var(--accent); }

/* Profile card with spinning border */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.profile-card {
  position: relative; border-radius: 18px; padding: 1px;
  background: conic-gradient(from var(--angle), transparent 0deg, transparent 260deg, var(--accent) 320deg, transparent 360deg), var(--border);
  animation: spin-border 6s linear infinite; box-shadow: var(--shadow-lg);
  transform-style: preserve-3d; transition: transform .2s ease-out;
}
@keyframes spin-border { to { --angle: 360deg; } }
.profile-inner { border-radius: 17px; padding: 26px; background: color-mix(in oklab, var(--surface) 94%, transparent); backdrop-filter: blur(12px); overflow: hidden; position: relative; }
.profile-inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, color-mix(in oklab, var(--accent) 10%, transparent) 50%, transparent 60%);
  transform: translateX(-100%); animation: sheen 5s ease-in-out infinite 1.5s;
}
@keyframes sheen { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.profile-head .profile-name { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
.profile-head p { color: var(--muted); }
.mono-small { display: flex; align-items: center; gap: 8px; font: 500 12px "Geist Mono", monospace; letter-spacing: .06em; margin-top: 4px; color: var(--accent) !important; }
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar-wrap img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid var(--surface); }
.ring { position: absolute; inset: -5px; border-radius: 50%; border: 1px dashed var(--accent); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.stat { padding: 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--bg) 40%, transparent); }
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n+2) { border-bottom: 0; }
.stat b { display: block; font-size: 1.9rem; letter-spacing: -.02em; line-height: 1.2; }
.stat > span { font-size: 13.5px; color: var(--muted); }

/* =========================================================
   Marquee
   ========================================================= */
.marquee-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(90deg, color-mix(in oklab, var(--surface) 60%, transparent), color-mix(in oklab, #3b5bdb 8%, var(--surface))); padding: 22px 0; }
.marquee-wrap { display: flex; align-items: center; gap: 28px; max-width: 1180px; }
.marquee-label { display: flex; align-items: center; gap: 14px; font-size: 11.5px; letter-spacing: .18em; color: var(--muted); white-space: nowrap; }
.marquee-label .line { width: 60px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.marquee-label b { color: var(--accent); }
.marquee { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: scroll-x 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.domain { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 15px; font-weight: 500; white-space: nowrap; }
.domain::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 112px 0; border-bottom: 1px solid var(--border); position: relative; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.heading { font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 700; text-shadow: var(--glow); }
.sub { color: var(--muted); max-width: 640px; margin-top: 14px; font-size: 1.05rem; }
.sub-heading { margin: 64px 0 20px; font-size: 1.25rem; letter-spacing: -.01em; }
.sub-heading span { color: var(--accent); font-family: "Geist Mono", monospace; margin-right: 6px; }

/* Card base + spotlight */
.card-base, .pillar, .service, .project, .research, .edu-item, .cert, .contact-form, .info-card, .skill-board {
  background: color-mix(in oklab, var(--surface) 92%, transparent); border: 1px solid var(--border); border-radius: 14px;
}
.spot { position: relative; overflow: hidden; }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%);
}
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; margin-top: 48px; align-items: start; }
.about-text p { color: var(--muted); font-size: 1.05rem; margin-bottom: 20px; line-height: 1.75; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pillar { padding: 22px; transition: border-color .25s, transform .25s; }
.pillar:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); transform: translateY(-3px); }
.pillar i { display: block; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 16px; box-shadow: 0 0 10px var(--accent); }
.pillar h3 { font-size: 1rem; margin-bottom: 8px; }
.pillar p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.service { padding: 24px; transition: border-color .25s, transform .25s, box-shadow .25s; }
.service:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent); margin-bottom: 20px; }
.service h3 { font-size: 1.05rem; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* Skills board */
.skill-board { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; overflow: hidden; }
.skill-cell { padding: 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background .25s; }
.skill-cell:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.skill-cell:nth-child(3n) { border-right: 0; }
.skill-cell:nth-last-child(-n+3) { border-bottom: 0; }
.skill-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.skill-top h3 { font-size: 1rem; }
.skill-top span { font: 500 11px "Geist Mono", monospace; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); transition: all .2s; }
.chips span:hover { color: var(--accent); border-color: var(--accent); }

/* Timeline */
.timeline { position: relative; margin-top: 52px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--accent), var(--border) 40%, var(--border)); }
.tl-item { position: relative; margin-bottom: 52px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -34px; top: 9px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent), 0 0 14px var(--accent);
}
.tl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.tl-head h3 { font-size: 1.3rem; letter-spacing: -.015em; }
.date-pill { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.tl-org { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 6px 0 16px; font-size: 15px; }
.tl-org b { color: var(--fg); }
.tl-item ul { list-style: none; max-width: 820px; }
.tl-item li { position: relative; padding-left: 18px; color: var(--muted); margin-bottom: 9px; font-size: 15.5px; }
.tl-item li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tl-item .chips { margin-top: 14px; }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 26px; }
.filter {
  font: 500 14px "Geist", sans-serif; cursor: pointer; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted); transition: all .2s;
}
.filter:hover { color: var(--fg); border-color: var(--accent); }
.filter.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.filter small { font-family: "Geist Mono", monospace; opacity: .7; margin-left: 6px; font-size: 11px; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project { padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: border-color .25s, transform .25s, box-shadow .25s; }
.project:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.project h3 { font-size: 1.08rem; line-height: 1.35; letter-spacing: -.01em; }
.feat { flex-shrink: 0; font: 600 10.5px "Geist Mono", monospace; letter-spacing: .14em; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.project p { color: var(--muted); font-size: 14.5px; flex-grow: 1; line-height: 1.65; }
.project .chips span { font-size: 12.5px; padding: 3px 11px; }
.project-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.lang { display: inline-flex; align-items: center; gap: 7px; font-family: "Geist Mono", monospace; font-size: 12.5px; }
.lang i { width: 9px; height: 9px; border-radius: 50%; }
.p-links { display: flex; gap: 14px; }
.p-links a { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.p-links a:hover { text-decoration: underline; }

/* Education */
.edu-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; margin-top: 48px; align-items: start; }
.edu-list { display: grid; gap: 12px; }
.edu-item { display: flex; gap: 16px; padding: 20px 22px; transition: border-color .25s; }
.edu-item:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); }
.edu-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.edu-date { font: 500 12px "Geist Mono", monospace; color: var(--faint); letter-spacing: .04em; }
.edu-item h3 { font-size: 1rem; margin: 2px 0; }
.edu-item p { color: var(--muted); font-size: 14.5px; }
.edu-item .gpa { color: var(--accent); font-family: "Geist Mono", monospace; font-size: 12.5px; }
.research { padding: 26px; }
.mono-label { font-size: 11.5px; font-weight: 600; letter-spacing: .2em; color: var(--accent); margin-bottom: 12px; }
.research h3 { font-size: 1.2rem; line-height: 1.35; margin-bottom: 14px; letter-spacing: -.01em; }
.research ul { list-style: none; margin-bottom: 18px; }
.research li { position: relative; padding-left: 18px; color: var(--muted); font-size: 14.5px; margin-bottom: 8px; }
.research li::before { content: "›"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cert { padding: 20px 22px; display: flex; gap: 16px; transition: border-color .25s, transform .25s; }
.cert:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); transform: translateY(-3px); }
.cert h4 { font-size: 15.5px; line-height: 1.4; margin-bottom: 2px; }
.cert .org { font: 500 12.5px "Geist Mono", monospace; color: var(--accent); letter-spacing: .03em; }
.cert p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.cert a.verify { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); font-weight: 600; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; margin-top: 40px; align-items: stretch; }
.contact-info { display: flex; flex-direction: column; gap: 12px; }
.info-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; transition: border-color .2s, transform .2s; }
a.info-card:hover { border-color: var(--accent); transform: translateX(4px); }
.info-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.info-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-weight: 600; font-size: 15.5px; overflow-wrap: anywhere; }
.info-text small { font: 500 11px "Geist Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.info-arrow { color: var(--faint); font-size: 18px; transition: color .2s, transform .2s; }
a.info-card:hover .info-arrow { color: var(--accent); transform: translate(2px, -2px); }
.contact-info .info-card { flex: 1; }
.contact-info .socials { margin-top: auto; padding-top: 6px; }
.contact-form { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.contact-form > label:last-of-type { flex: 1; }
.contact-form textarea { flex: 1; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: 400 15px "Geist", sans-serif; color: var(--fg); background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot span { font-size: 13px; color: var(--faint); }

/* Footer */
.footer { padding: 48px 0 72px; background: color-mix(in oklab, var(--surface) 50%, transparent); }
.footer-tag { color: var(--muted); max-width: 560px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--accent); }

/* =========================================================
   Scroll reveal (blur-in)
   ========================================================= */
.reveal { opacity: 0; filter: blur(10px); transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), filter .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; filter: none; transform: none; }
.no-js .reveal { opacity: 1; filter: none; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1400px) {
  .hud-tl, .hud-bl, .hud-br { display: none; }
  .corner { display: none; }
}
@media (max-width: 1024px) {
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 10px 16px 18px;
    background: color-mix(in oklab, var(--bg) 96%, transparent); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); transform: translateY(-120%); opacity: 0; transition: transform .3s, opacity .3s; pointer-events: none;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 16px; border-radius: 10px; }
  .nav-actions { margin-left: auto; }
  .menu-btn { display: grid; }
  .hero-grid, .about-grid, .edu-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 48px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-board { grid-template-columns: repeat(2, 1fr); }
  .skill-cell:nth-child(3n) { border-right: 1px solid var(--border); }
  .skill-cell:nth-child(2n) { border-right: 0; }
  .skill-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .skill-cell:nth-last-child(-n+2) { border-bottom: 0; }
  .rail { display: none; }
}
@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .hide-sm { display: none; }
  .brand span { display: none; }
  .hero { padding: 48px 0 80px; min-height: auto; }
  .section { padding: 80px 0; }
  .pillars, .service-grid, .project-grid, .cert-grid, .form-row { grid-template-columns: 1fr; }
  .skill-board { grid-template-columns: 1fr; }
  .skill-cell, .skill-cell:nth-child(n) { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .skill-cell:last-child { border-bottom: 0 !important; }
  .marquee-wrap { flex-direction: column; align-items: stretch; gap: 14px; }
  .profile-inner { padding: 20px; }
  .stat { padding: 16px; }
  .stat b { font-size: 1.6rem; }
  .status-pill { font-size: 9.5px; gap: 7px; }
  .f6, .f8, .t3 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; filter: none; transform: none; }
}

/* =========================================================
   Contact form status
   ========================================================= */
.honey { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: 13px; color: var(--faint); transition: color .2s; }
.form-status.ok { color: var(--pass); }
.form-status.err { color: #f87171; }
.form-status a { color: var(--accent); text-decoration: underline; }
#sendBtn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* =========================================================
   Quality report
   ========================================================= */
.qa-report { padding: 112px 0; border-bottom: 1px solid var(--border); position: relative; }
.qa-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; margin-top: 44px; }
.qa-card {
  display: block; padding: 26px; border-radius: 14px; border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 92%, transparent); transition: border-color .25s, transform .25s;
}
a.qa-card:hover { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); transform: translateY(-3px); }
.qa-big { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 4px; }
.qa-big .count { font-size: 3.6rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--pass); text-shadow: 0 0 24px color-mix(in oklab, var(--pass) 35%, transparent); }
.qa-big small { font: 500 15px "Geist Mono", monospace; color: var(--muted); }
.qa-meta { color: var(--muted); font-size: 14px; margin-top: 8px; }
.ci-badge { display: block; margin-top: 18px; height: 20px; width: auto; }
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 10px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 104px; height: auto; transform: rotate(-90deg); }
.gauge .track { fill: none; stroke: var(--border); stroke-width: 7; }
.gauge .bar {
  fill: none; stroke: var(--pass); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 264; stroke-dashoffset: 264; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.7,.2,1);
  filter: drop-shadow(0 0 5px color-mix(in oklab, var(--pass) 50%, transparent));
}
.gauge.mid .bar { stroke: var(--amber); filter: none; }
.gauge-ring { position: relative; max-width: 104px; margin: 0 auto; }
.gauge-ring svg { display: block; max-width: none; }
.gauge-num { position: absolute; inset: 0; font: 700 1.45rem "Geist Mono", monospace; display: grid; place-items: center; }
.gauge p { font-size: 13px; color: var(--muted); margin-top: 8px; }
@media (max-width: 1024px) { .qa-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .qa-report { padding: 80px 0; }
  .gauges { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
}
