:root {
  --bg: #0a0a0a;
  --fg: #ededed;
  --card: #111111;
  --card-2: #141414;
  --panel: #1a1a1a;
  --border: #262626;
  --muted: #8a8a86;
  --dim: #86867f;
  --brand: #739ef8;
  --primary: #3b6fe8;
  --ok: #4ade80;
  --amber: #f2b45b;
  --radius: 18px;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --heading: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--heading); }
::selection { background: rgb(59 111 232 / 0.45); }
:focus-visible { outline: 2px solid rgb(79 130 240 / 0.7); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: 13px; }
.brand { color: var(--brand); }
.dim { color: var(--dim); }
.muted { color: rgb(237 237 237 / 0.55); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fg); color: #000; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Backdrops (from noconfig) */
.bg-tiles {
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}
.mask-radial { mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); }
.glass {
  background: rgb(17 17 17 / 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.frame-blue { background: radial-gradient(120% 90% at 50% 110%, #9ab8f8 0%, #3b6fe8 35%, #12204a 70%, #0d0d0d 100%); }
.frame-slate { background: radial-gradient(120% 90% at 50% 110%, #7c8aa5 0%, #2c3550 40%, #111522 75%, #0d0d0d 100%); }
.frame-amber { background: radial-gradient(120% 90% at 50% 110%, #ffd49a 0%, #e7783b 35%, #3a1a0c 72%, #0d0d0d 100%); }
.frame-violet { background: radial-gradient(120% 90% at 0% 110%, #c9b8ff 0%, #6c4fe0 30%, #1d1640 65%, #0d0d0d 100%); }

/* Buttons: metallic border + gradient face */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px;
  border-radius: 10px;
  font: 550 15px/1 var(--sans);
  cursor: pointer;
  border: 1.5px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  transition: translate .3s cubic-bezier(.4,0,.2,1), box-shadow .3s cubic-bezier(.4,0,.2,1), filter .2s ease;
}
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-brand {
  color: #fff;
  background-image: linear-gradient(180deg, #4a84ff 0%, #1c4bb0 100%), linear-gradient(160deg, #dbe6ff 0%, #4f82f0 26%, #b9cfff 48%, #2a5bd0 72%, #9ab8f8 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -1px 0 rgb(0 0 0 / .18), 0 1px 2px rgb(16 40 130 / .25), 0 10px 22px -10px rgb(28 75 176 / .7);
}
.btn-dark {
  color: #ebebeb;
  background-image: linear-gradient(180deg, #1b1b1d 0%, #111113 100%), linear-gradient(160deg, #6b6d73 0%, #2c2d31 26%, #7c7e85 48%, #27282c 72%, #55575c 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 1px 2px rgb(0 0 0 / .11), 0 10px 22px -10px rgb(4 12 48 / .7);
}
.btn-light {
  color: #151515;
  background-image: linear-gradient(180deg, #fff 0%, #f1f2f4 100%), linear-gradient(160deg, #fff 0%, #b7b9c1 26%, #f7f7f9 48%, #9a9ca5 72%, #e3e4e8 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgb(0 0 0 / .12), 0 10px 22px -10px rgb(4 12 48 / .7);
}
@media (hover: hover) {
  .btn:hover { translate: 0 -1px; }
  .btn-brand:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), inset 0 -1px 0 rgb(0 0 0 / .18), 0 1px 2px rgb(16 40 130 / .25), 0 14px 28px -10px rgb(28 75 176 / .85); }
  .btn-dark:hover { background-image: linear-gradient(180deg, #222225 0%, #151517 100%), linear-gradient(160deg, #7c7e85 0%, #34353a 26%, #8d8f96 48%, #2e2f33 72%, #66686e 100%); }
}
.btn:active { translate: 0 0; filter: brightness(.96); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { display: flex; align-items: center; gap: 8px; font: 600 17px var(--heading); letter-spacing: -0.02em; }
.wordmark .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); box-shadow: 0 0 14px rgb(115 158 248 / .7); }
.nav nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.nav nav a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav nav a:not(.btn):hover { color: var(--fg); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero .backdrop { position: absolute; inset: -10% -10% 30%; pointer-events: none; }
.glow { position: absolute; left: 50%; top: -220px; width: 900px; height: 500px; translate: -50% 0; background: radial-gradient(closest-side, rgb(59 111 232 / .28), transparent); pointer-events: none; }
.hero .wrap { position: relative; }
.status { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--mono); color: var(--muted); border: 1px solid var(--border); background: var(--card); padding: 6px 12px; border-radius: 999px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgb(74 222 128 / .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgb(74 222 128 / 0); } 100% { box-shadow: 0 0 0 0 rgb(74 222 128 / 0); } }
.hero-grid { display: grid; gap: 28px; margin-top: 28px; align-items: end; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.1rem); font-weight: 450; line-height: 1.05; letter-spacing: -0.04em; }
h1 span { display: block; }
.lede { font-size: 17px; color: var(--muted); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.actions.center { justify-content: center; }
.stack { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 36px; font-size: 14px; font-weight: 500; color: rgb(237 237 237 / .4); }
.stack .label { color: rgb(237 237 237 / .55); font-weight: 400; }

.terminal { margin: 56px auto 0; max-width: 880px; border: 1px solid var(--border); border-radius: var(--radius); background: #0d0d0d; overflow: hidden; box-shadow: 0 40px 80px -30px rgb(28 75 176 / .45), 0 0 0 6px rgb(255 255 255 / .02); }
.term-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 40px; padding: 0 14px; background: var(--card-2); border-bottom: 1px solid var(--border); }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #2c2c2c; }
.term-title { font: 12.5px var(--mono); color: var(--dim); }
.term-body { padding: 22px 24px 26px; font: 14px/1.85 var(--mono); color: rgb(237 237 237 / .9); overflow-x: auto; }
.term-body .prompt { color: var(--brand); margin-right: 6px; }
.term-body .out { color: var(--muted); margin-bottom: 6px; }
.term-body .b { color: var(--amber); }
.caret { color: var(--brand); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 40px; padding: 0; }
.stat { background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.stat .num { font: 550 2rem/1.1 var(--heading); letter-spacing: -0.03em; }
.stat .cap { color: var(--muted); font-size: 14px; }

/* Sections */
.section { padding-top: 112px; }
.heading h2, .about h2, .cta h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 550; line-height: 1.08; letter-spacing: -0.04em; text-wrap: balance; }
.heading p { margin-top: 12px; color: var(--muted); max-width: 560px; font-size: 15.5px; }

/* Projects */
.projects { display: grid; gap: 16px; margin-top: 48px; }
.project { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s, translate .3s; }
@media (hover: hover) { .project:hover { border-color: #3a3a3a; translate: 0 -3px; } .project:hover .mock { translate: 0 -6px; } }
.thumb { aspect-ratio: 16 / 9; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.mock { width: 78%; height: 72%; border-radius: 12px 12px 0 0; border: 1px solid rgb(255 255 255 / .14); border-bottom: 0; background: rgb(10 10 10 / .7); backdrop-filter: blur(6px); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: translate .4s cubic-bezier(.4,0,.2,1); }
.mock span { display: block; height: 10px; border-radius: 5px; background: rgb(255 255 255 / .12); }
.mock span:nth-child(1) { width: 40%; background: rgb(255 255 255 / .28); }
.mock span:nth-child(2) { width: 85%; }
.mock span:nth-child(3) { width: 65%; }
.project-body { padding: 22px 24px 24px; }
.meta { display: flex; align-items: center; gap: 10px; color: var(--dim); }
.tag { font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; color: var(--muted); }
.project h3 { margin-top: 10px; font-size: 1.3rem; font-weight: 550; letter-spacing: -0.02em; }
.project p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips li { font: 12px var(--mono); padding: 3px 9px; border-radius: 6px; background: var(--panel); color: rgb(237 237 237 / .75); }

/* About */
.about { display: grid; gap: 36px; border: 1px solid var(--border); background: var(--card); border-radius: 22px; padding: 28px; }
.icon-tile { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: #181818; color: var(--brand); margin-bottom: 20px; }
.about p { margin-top: 14px; color: var(--muted); font-size: 15.5px; }
.skills { display: grid; gap: 12px; align-content: center; }
.skills li { display: flex; gap: 16px; border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: #0d0d0d; }
.skills h3 { font-size: 1.05rem; font-weight: 550; }
.skills p { margin-top: 2px; font-size: 14.5px; }

/* Timeline */
.timeline { margin-top: 40px; border-top: 1px solid var(--border); }
.timeline li { display: grid; gap: 6px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.timeline .when { color: var(--brand); }
.timeline h3 { font-size: 1.15rem; font-weight: 550; letter-spacing: -0.01em; }
.timeline p { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* CTA */
.cta { position: relative; overflow: hidden; text-align: center; border: 1px solid var(--border); border-radius: 22px; padding: 72px 24px; background: radial-gradient(120% 100% at 50% 120%, rgb(59 111 232 / .35) 0%, rgb(18 32 74 / .6) 40%, var(--card) 75%); }
.cta .backdrop { position: absolute; inset: 0; pointer-events: none; }
.cta > *:not(.backdrop) { position: relative; }
.cta p { margin: 14px auto 0; max-width: 440px; color: var(--muted); }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 32px; font-size: 14.5px; }
.socials a { color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.socials a:hover { color: var(--fg); border-color: var(--brand); }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 48px; padding-bottom: 40px; margin-top: 64px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }

/* Reveal on scroll */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .7s cubic-bezier(.2,.7,.2,1), translate .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; translate: 0 0; }

@media (min-width: 720px) {
  .hero { padding-top: 96px; }
  .hero-grid { grid-template-columns: 1.7fr 1fr; gap: 48px; }
  .lede { padding-bottom: 8px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .projects { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr 1fr; padding: 44px; align-items: center; }
  .timeline li { grid-template-columns: 180px 1fr; gap: 24px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav nav a:not(.btn) { display: none; }
  .term-body { font-size: 12.5px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
  html { scroll-behavior: auto; }
}
