:root {
  --ink: #0a0c16;
  --ink-2: #121627;
  --line: rgba(255, 255, 255, .08);
  --paper: #eef1f7;
  --dim: #959cb3;
  --blue: #4f8cff;
  --mint: #5eead4;
  --lilac: #a78bfa;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; background: var(--ink); scrollbar-width: thin; scrollbar-color: #2a3050 transparent; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #262b45; border-radius: 10px; border: 3px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: #3a4170; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 500 18px/1.65 "Barlow", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--mint); }
::selection { background: var(--mint); color: var(--ink); }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--mint)); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 80px 20px 60px; overflow: hidden; isolation: isolate; }
.glow { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.glow.a { width: 64vw; height: 64vw; background: radial-gradient(closest-side, rgba(79,140,255,.30), rgba(79,140,255,0)); opacity: 1; top: -22vw; left: -20vw; animation: drift-a 26s ease-in-out infinite alternate; }
.glow.b { width: 56vw; height: 56vw; background: radial-gradient(closest-side, rgba(94,234,212,.18), rgba(94,234,212,0)); opacity: 1; bottom: -24vw; right: -18vw; animation: drift-b 30s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(12vw, 8vh, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-10vw, -6vh, 0) scale(1.08); } }
.spot { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .9s var(--ease);
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 50%), rgba(94, 234, 212, .07), transparent 60%); }

.hero .pre { font-size: clamp(20px, 2.6vw, 26px); font-weight: 500; color: var(--dim); margin: 0; }
.hero h1 { margin: 10px 0 0; font-weight: 900; line-height: 1.02; letter-spacing: -.025em; font-size: clamp(52px, 9.6vw, 124px); }
.hero h1 .word { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .08em; }
.hero h1 .word > span { display: inline-block; background: linear-gradient(100deg, var(--blue), var(--mint) 50%, var(--blue)); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 10s linear infinite; }
.hero h1 .word + .word > span { animation-delay: -1.5s; }
@keyframes shimmer { to { background-position: 220% center; } }
.hero .tag { margin-top: 24px; font: 700 14px/1 var(--mono); letter-spacing: .02em; color: var(--paper); opacity: .8; }
.scroll-hint { margin-top: 72px; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; color: var(--dim); font: 700 11px/1 var(--mono); text-decoration: none; letter-spacing: .2em; transition: color .4s var(--ease); }
.scroll-hint:hover { color: var(--paper); }
.scroll-hint .line { position: relative; width: 1px; height: 44px; background: rgba(255,255,255,.12); overflow: hidden; }
.scroll-hint .line::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--mint); animation: drip 2.2s var(--ease-io) infinite; }
@keyframes drip { to { top: 100%; } }

.js .hero .pre, .js .hero .tag, .js .scroll-hint { opacity: 0; transform: translate3d(0, 14px, 0); }
.js .hero h1 .word > span { transform: translateY(105%); }
.js .loaded .hero .pre, .js .loaded .hero .tag, .js .loaded .scroll-hint { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js .loaded .hero .pre { transition-delay: .1s; }
.js .loaded .hero .tag { opacity: .8; transition-delay: .75s; }
.js .loaded .scroll-hint { transition-delay: 1.05s; }
.js .loaded .hero h1 .word > span { transform: none; transition: transform 1s var(--ease); }
.js .loaded .hero h1 .word:nth-child(1) > span { transition-delay: .25s; }
.js .loaded .hero h1 .word:nth-child(2) > span { transition-delay: .38s; }

/* ---------- sections ---------- */
section { max-width: 860px; margin: 0 auto; padding: 104px 24px; }
.eyebrow { display: block; text-align: center; font: 700 12px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
h2 { text-align: center; font-weight: 800; font-size: clamp(38px, 5.6vw, 56px); line-height: 1.02; margin: 0 0 48px; letter-spacing: -.015em; }
h2 .bar { display: block; width: 48px; height: 3px; margin: 20px auto 0; border-radius: 3px; background: currentColor; transform-origin: center; }
.c-mint { color: var(--mint); } .c-blue { color: var(--blue); } .c-lilac { color: var(--lilac); }
.lead { font-size: 21px; line-height: 1.6; margin: 0 0 22px; text-align: center; max-width: 700px; margin-left: auto; margin-right: auto; }
.lead strong { color: var(--paper); font-weight: 700; }
.lead .hl { color: var(--mint); font-weight: 600; }
.muted { color: var(--dim); }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js h2 .bar { transform: scaleX(0); transition: transform .8s var(--ease) .2s; }
.js h2.in .bar { transform: scaleX(1); }

/* placeholders: still to be filled in */
.ph { color: var(--dim); }

/* ---------- hero buttons ---------- */
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.js .cta { opacity: 0; transform: translate3d(0, 14px, 0); }
.js .loaded .cta { opacity: 1; transform: none; transition: opacity .8s var(--ease) .9s, transform .9s var(--ease) .9s; }
.pill { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; font: 700 15px/1 "Barlow", sans-serif; letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.pill svg { width: 17px; height: 17px; }
.pill.solid { background: var(--paper); color: var(--ink); }
.pill.ghost { background: rgba(255,255,255,.03); color: var(--paper); border-color: rgba(255,255,255,.16); }

/* ---------- education ---------- */
.edu { padding: 30px 32px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; }
.edu .school { font-size: 26px; font-weight: 800; line-height: 1.15; }
.edu .degree { margin-top: 6px; font-size: 18px; color: var(--paper); }
.edu .meta { margin-top: 10px; font: 500 14px/1.5 var(--mono); color: var(--dim); }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project { display: flex; flex-direction: column; padding: 28px 28px 24px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; transition: transform .35s var(--ease), border-color .3s var(--ease); }
.project.wide { grid-column: 1 / -1; }
.project .kind { font: 700 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mint); }
.project h3 { margin: 12px 0 8px; font-size: 24px; font-weight: 800; line-height: 1.2; }
.project p { margin: 0; color: var(--dim); font-size: 17px; }
.project .stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.project .stack span { font: 500 12px/1 var(--mono); padding: 6px 9px; border-radius: 6px; background: rgba(255,255,255,.04); color: var(--paper); }
.project .links { display: flex; gap: 18px; margin-top: auto; padding-top: 22px; }
.project .links a { font: 700 13px/1 var(--mono); letter-spacing: .06em; color: var(--paper); text-decoration: none; }
.project .links a .arr { display: inline-block; transition: transform .3s var(--ease); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact .big { display: inline-block; margin: 0 0 30px; font-size: clamp(28px, 5vw, 46px); font-weight: 800; letter-spacing: -.01em; color: var(--paper); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease), color .3s var(--ease); }
.contact .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }

/* ---------- resume pop-up ---------- */
dialog.resume {
  width: min(920px, 94vw); height: min(90vh, 1160px); max-width: none; max-height: none; padding: 0; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: var(--ink-2); color: var(--paper);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.7);
  opacity: 0; transform: translate3d(0, 18px, 0) scale(.98);
  transition: opacity .3s var(--ease), transform .45s var(--ease), overlay .45s allow-discrete, display .45s allow-discrete;
}
dialog.resume[open] { opacity: 1; transform: none; display: flex; flex-direction: column; }
@starting-style { dialog.resume[open] { opacity: 0; transform: translate3d(0, 18px, 0) scale(.98); } }
dialog.resume::backdrop { background: rgba(4, 5, 12, 0); transition: background .35s var(--ease), overlay .45s allow-discrete, display .45s allow-discrete; }
dialog.resume[open]::backdrop { background: rgba(4, 5, 12, .75); }
@starting-style { dialog.resume[open]::backdrop { background: rgba(4, 5, 12, 0); } }
.rbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.rbar .ttl { font-weight: 800; font-size: 18px; margin-right: auto; }
.rbar .pill { height: 38px; padding: 0 16px; font-size: 14px; }
.xbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: transparent; color: var(--paper); cursor: pointer; font-size: 20px; line-height: 1; transition: background .25s var(--ease), transform .3s var(--ease); }
.rbody { flex: 1; min-height: 0; background: #0d1020; }
.rbody iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.rph { height: 100%; display: grid; place-items: center; text-align: center; padding: 40px 24px; color: var(--dim); }
.rph .doc { width: 92px; height: 118px; margin: 0 auto 22px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.03); display: grid; place-items: center; font: 700 13px/1 var(--mono); color: var(--dim); }
.rph b { display: block; color: var(--paper); font-size: 20px; margin-bottom: 6px; }
.rph code { font: 500 14px var(--mono); color: var(--mint); }

/* ---------- toolbox ---------- */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool { padding: 24px 18px 22px; text-align: center; background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; transition: transform .35s var(--ease), border-color .3s var(--ease), background .3s var(--ease); }
.tool i { font-size: 52px; line-height: 1; display: block; transition: transform .35s var(--ease); }
.tool i.devicon-cplusplus-plain { color: #6ea8e8; }
.tool i.devicon-github-original { color: var(--paper); }
.tool .nm { margin-top: 14px; font-size: 19px; font-weight: 700; }
.tool .use { margin-top: 2px; font-size: 14px; color: var(--dim); }


/* ---------- profiles ---------- */
.profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; perspective: 1000px; }
.profile { position: relative; display: block; padding: 30px 22px; text-align: center; text-decoration: none; color: var(--paper); overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .45s var(--ease), border-color .3s var(--ease), box-shadow .45s var(--ease); }
.profile::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(280px circle at var(--gx, 50%) var(--gy, 50%), rgba(167, 139, 250, .16), transparent 60%); }
.profile.tilting { will-change: transform; transition: transform .12s linear, border-color .5s var(--ease), box-shadow .7s var(--ease); }
.profile .ic { height: 46px; display: grid; place-items: center; margin-bottom: 12px; font-size: 42px; }
.profile .site { font-weight: 800; font-size: 24px; line-height: 1.1; }
.profile .handle { margin-top: 8px; font: 700 14px/1 var(--mono); color: var(--lilac); }
.cf-bars { display: inline-flex; align-items: flex-end; gap: 4px; height: 38px; }
.cf-bars span { width: 9px; border-radius: 2px; }
.ac { font: 800 21px/1 "Barlow", sans-serif; background: var(--paper); color: var(--ink); padding: 8px 9px; border-radius: 6px; }

@media (hover: hover) and (pointer: fine) {
  .hero:hover .spot { opacity: 1; }
  .tool:hover { transform: translate3d(0, -5px, 0); border-color: rgba(79, 140, 255, .45); background: #151a2e; }
  .tool:hover i { transform: scale(1.08); }
  .profile:hover { --ty: -5px; border-color: rgba(167, 139, 250, .5); box-shadow: 0 28px 56px -32px rgba(167, 139, 250, .5); }
  .profile:hover::after { opacity: 1; }
  .pill.solid:hover { transform: translate3d(0, -2px, 0); background: #ffffff; }
  .pill.ghost:hover { transform: translate3d(0, -2px, 0); border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.06); }
  .project:hover { transform: translate3d(0, -4px, 0); border-color: rgba(94, 234, 212, .35); }
  .project .links a:hover { color: var(--mint); }
  .project .links a:hover .arr { transform: translate3d(3px, -3px, 0); }
  .contact .big:hover { background-size: 100% 2px; color: var(--mint); }
  .xbtn:hover { background: rgba(255,255,255,.08); transform: rotate(90deg); }
}

footer { text-align: center; padding: 48px 20px 64px; color: var(--dim); font-size: 14px; border-top: 1px solid var(--line); max-width: 860px; margin: 0 auto; }

@media (max-width: 720px) {
  body { font-size: 17px; }
  section { padding: 76px 20px; }
  .lead { font-size: 19px; }
  .profiles, .projects { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; padding: 24px; }
  .rbar .pill span { display: none; }
  dialog.resume { width: 100vw; height: 100dvh; border-radius: 0; }
  .tools { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero .pre, .js .hero .tag, .js .scroll-hint, .js .hero h1 .word > span, .js .cta { opacity: 1 !important; transform: none !important; filter: none !important; }
  .js h2 .bar { transform: none !important; }
}

/* footer © doubles as the dashboard link; looks like plain text */
.quiet { color: inherit; text-decoration: none; cursor: text; }
