:root {
  --bg: #0c0c0d;
  --panel: #151517;
  --panel-2: #1b1b1e;
  --line: #262629;
  --fg: #f3f3f2;
  --muted: #9a9aa0;
  --accent: #ffc83d;
  --accent-ink: #1a1400;
  --ok: #3ddc84;
  --radius: 18px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: min(1100px, 100% - 48px); margin-inline: auto; }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 12, 13, .78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.links { display: flex; gap: 24px; flex: 1; }
.links a { color: var(--muted); font-size: 15px; transition: color .15s; }
.links a:hover { color: var(--fg); }

/* ── avatar ── */
.avatar {
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  object-fit: cover;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 128px; height: 128px; font-size: 44px; margin: 0 auto 28px; box-shadow: 0 0 0 6px rgba(255, 200, 61, .12); }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600; font-size: 15px;
  transition: transform .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ffd666; }
.btn.ghost { border: 1px solid var(--line); background: var(--panel); }
.btn.ghost:hover { border-color: #3a3a3f; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }

/* ── hero ── */
.hero { text-align: center; padding: 72px 0 40px; }
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.lede { color: var(--muted); font-size: 18px; margin: 22px auto 0; max-width: 620px; }
.u { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 4px; }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ── highlight fan ── */
.fan { overflow: hidden; padding: 30px 0 70px; position: relative; }
.fan::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}
.fan-track { display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.fan-card {
  flex: 0 0 230px; height: 260px;
  margin: 0 -10px;
  padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  transition: transform .25s;
}
.fan-card:hover { transform: translateY(-8px) rotate(0) !important; z-index: 3; }
.t1 { transform: rotate(-8deg) translateY(30px); }
.t2 { transform: rotate(-4deg) translateY(8px); }
.t3 { transform: translateY(-6px); z-index: 2; flex-basis: 250px; height: 290px; }
.t4 { transform: rotate(4deg) translateY(8px); }
.t5 { transform: rotate(8deg) translateY(30px); }
.fan-card h3 { font-size: 17px; }
.fan-kicker { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.feature { background: linear-gradient(160deg, #241e0b, var(--panel) 60%); border-color: #3a3112; }
.drone { color: var(--accent); width: 140px; margin: 0 auto; }
.mono, .sync { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0; white-space: pre; }
.mono b { color: var(--ok); font-weight: 500; }
.sync em { font-style: normal; color: var(--ok); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--ok); }
.clouds { display: flex; flex-wrap: wrap; gap: 6px; }
.clouds span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }

/* ── sections ── */
section[id] { padding: 56px 0; }
h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; }
.sub { color: var(--muted); margin-top: 8px; font-size: 17px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.more { color: var(--muted); font-size: 15px; white-space: nowrap; }
.more:hover { color: var(--fg); }

/* ── two-col ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.two-col h2 { margin-bottom: 26px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rows li:first-child { padding-top: 0; }
.rows h3 { font-size: 17px; font-weight: 600; }
.rows .meta { color: var(--muted); font-size: 14px; margin: 2px 0 6px; }
.rows p:last-child { color: var(--muted); font-size: 15px; }
.logo {
  flex: 0 0 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 16%, var(--panel));
  color: var(--c);
  font-weight: 800; font-size: 14px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}

.cards { display: grid; gap: 14px; }
.card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card .icon {
  flex: 0 0 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--accent); font-size: 22px;
}
.card h3 { font-size: 18px; margin-bottom: 4px; }
.card p { color: var(--muted); font-size: 15px; }

/* ── projects ── */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.pcard:hover { border-color: #3a3a3f; transform: translateY(-3px); }
.shot {
  height: 160px;
  background: #0f0f11;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.shot .mono { font-size: 11.5px; }
.diagram { flex-wrap: wrap; gap: 8px; align-content: center; }
.diagram .box {
  font-size: 12px; font-weight: 600;
  padding: 8px 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  text-align: center;
}
.diagram .box small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; }
.diagram .zk { border-color: #3a3112; color: var(--accent); }
.diagram .arrow { color: var(--muted); }
.graph svg { width: 100%; max-width: 230px; }
.pbody { padding: 22px; }
.tagline { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.num {
  font-size: 12px; font-weight: 700; color: var(--accent);
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 200, 61, .1); border: 1px solid rgba(255, 200, 61, .25);
}
.pbody h3 { font-size: 22px; margin: 14px 0 8px; }
.pbody p:last-child { color: var(--muted); font-size: 15px; }

.list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 110px 260px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.list .tag { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.list a, .list .title { font-weight: 600; }
.list a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 4px; }
.list a:hover { text-decoration-color: var(--accent); }
.list .desc { color: var(--muted); font-size: 15px; }

/* ── skills ── */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skills > div, .edu > div {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.skills h4, .edu h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; font-weight: 600; }
.skills p, .edu p { color: var(--muted); font-size: 15px; }
.edu { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 14px; }
.edu strong { color: var(--fg); font-weight: 600; }

/* ── cta ── */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding: 44px;
  border-radius: 24px;
  background: radial-gradient(120% 140% at 0% 0%, #2a220a 0%, var(--panel) 55%);
  border: 1px solid #3a3112;
}
.cta-band p { color: var(--muted); margin-top: 10px; max-width: 460px; }
.cta-band .ctas { margin: 0; justify-content: flex-end; }

/* ── footer ── */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 48px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.foot-brand p { color: var(--muted); margin-top: 12px; font-size: 15px; }
.footer h4 { font-size: 14px; margin-bottom: 12px; }
.footer a:not(.brand) { display: block; color: var(--muted); font-size: 15px; padding: 3px 0; }
.footer a:not(.brand):hover { color: var(--fg); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.mono-s { font-family: var(--mono); font-size: 12px; }

/* ── responsive ── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .grid3 { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr 1fr; }
  .list li { grid-template-columns: 1fr; gap: 4px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px; }
  .cta-band .ctas { justify-content: flex-start; }
  .fan-card { flex-basis: 200px; height: 240px; }
  .t1, .t5 { display: none; }
}
@media (max-width: 640px) {
  .links { display: none; }
  .nav-inner { justify-content: space-between; }
  .hero { padding-top: 48px; }
  .br { display: none; }
  .lede { font-size: 16px; }
  .avatar.lg { width: 104px; height: 104px; font-size: 36px; }
  .skills, .edu, .foot-grid { grid-template-columns: 1fr; }
  .fan-card { flex-basis: 170px; height: 220px; margin: 0 -14px; padding: 14px; }
  .fan-card .mono, .sync { font-size: 10px; }
  .t2 { transform: rotate(-6deg) translateY(18px); }
  .t4 { transform: rotate(6deg) translateY(18px); }
  .section-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.stack { display: grid; gap: 6px; }
.stack span {
  text-align: center; font-size: 13px; font-weight: 600;
  padding: 6px; border-radius: 8px;
  background: rgba(255, 200, 61, .08); border: 1px solid rgba(255, 200, 61, .25); color: var(--accent);
}
a.pcard { display: block; color: inherit; }
.repo { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent); }
.pcard .pbody p:nth-last-child(2) { color: var(--muted); font-size: 15px; }
