@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0b0c0e;
  --bg-soft: #101215;
  --ink: #f1efe9;
  --muted: #9a9c98;
  --faint: #6d706c;
  --line: rgba(241, 239, 233, 0.13);
  --line-strong: rgba(241, 239, 233, 0.26);
  --acid: #d8ff4a;
  --acid-dim: rgba(216, 255, 74, 0.14);
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --pad: clamp(20px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 78% -5%, rgba(216, 255, 74, 0.09), transparent 65%),
    radial-gradient(50% 45% at 5% 25%, rgba(96, 128, 255, 0.07), transparent 60%),
    var(--bg);
}

::selection { background: var(--acid); color: #0b0c0e; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--acid);
  color: #0b0c0e;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  transition: top 0.2s;
}
.skip:focus { top: 16px; }

.wrap {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin-inline: auto;
}

/* ---------- header ---------- */

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.site-head.scrolled {
  background: rgba(11, 12, 14, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.head-inner {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin-inline: auto;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.mark span { color: var(--acid); }
.nav {
  display: flex;
  gap: clamp(18px, 3vw, 38px);
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.nav a { position: relative; padding: 6px 0; transition: color 0.2s; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  transition: border-color 0.2s, color 0.2s;
}
.status:hover { border-color: var(--line-strong); color: var(--ink); }
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0 rgba(216, 255, 74, 0.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(216, 255, 74, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(216, 255, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(216, 255, 74, 0); }
}

/* ---------- hero ---------- */

.hero {
  padding-top: 76px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
  padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 90px);
}
.eyebrow {
  margin: 0 0 28px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(3.1rem, 8.2vw, 7.6rem);
  line-height: 0.93;
  letter-spacing: -0.045em;
}
.hero h1 em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--acid);
}
.lede {
  max-width: 46ch;
  margin: 34px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--muted);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: #0b0c0e;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); background: #e6ff86; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
  font-weight: 400;
}
.btn.ghost:hover { border-color: var(--ink); background: transparent; }

.hero-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 22px 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.005));
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.fact:last-of-type { border-bottom: 0; }
.fact-k {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.fact-v { font-size: 14.5px; color: var(--ink); }
.fact-links {
  display: flex;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}
.fact-links a:hover { color: var(--acid); }

/* ticker */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 15px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: marquee 58s linear infinite;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.ticker-track i { color: var(--acid); font-style: normal; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

.section { padding: clamp(88px, 11vw, 150px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(42px, 6vw, 70px);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.section-head .idx {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--acid);
  vertical-align: 0.55em;
  margin-right: 14px;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 34ch;
  text-align: right;
}

/* ---------- projects ---------- */

.project {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(300px, 38%);
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(30px, 4.5vw, 54px) 0;
  border-top: 1px solid var(--line);
  isolation: isolate;
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--pad) * -0.5);
  z-index: -1;
  background: radial-gradient(60% 120% at var(--mx, 50%) var(--my, 50%), rgba(216, 255, 74, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.project:hover::before { opacity: 1; }

.p-num {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--faint);
  padding-top: 8px;
}
.p-body h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.p-kicker {
  margin: 8px 0 18px;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--acid);
}
.p-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 60ch;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}
.tags li {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  line-height: 1.4;
}
.p-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 24px;
  font-size: 14px;
}
.p-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.p-links a span { transition: transform 0.25s var(--ease); }
.p-links a:hover { color: var(--acid); border-color: var(--acid); }
.p-links a:hover span { transform: translate(2px, -2px); }
.p-links a.quiet { color: var(--muted); border-color: transparent; }
.p-links a.quiet:hover { color: var(--acid); }

.plate {
  margin: 0;
  aspect-ratio: 16 / 11;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--bg-soft);
  color: var(--acid);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.3s;
}
.project:hover .plate { transform: translateY(-4px); border-color: var(--line-strong); }
.plate svg { width: 88%; height: 88%; }
.plate-canwork svg { color: var(--acid); }
.plate-peerhub svg { color: #c9d3ff; }
.plate-lab svg { color: var(--acid); }

/* terminal plate */
.terminal {
  width: 84%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a0b0d;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow: hidden;
}
.t-bar {
  display: flex;
  gap: 5px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}
.t-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}
.terminal pre {
  margin: 0;
  padding: 14px 16px 18px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
  white-space: pre-wrap;
}
.c-dim { color: var(--faint); }
.c-acc { color: var(--acid); }
.caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--acid);
  vertical-align: -2px;
  margin-left: 3px;
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- stack ---------- */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 90px);
}
.stack-group {
  border-top: 1px solid var(--line);
  padding: 24px 0 26px;
}
.stack-group h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--acid);
}
.stack-group p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: clamp(40px, 8vw, 120px);
}
.about-grid .section-head { margin-bottom: 32px; display: block; }
.about-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.75;
  max-width: 60ch;
}
.about-copy p:first-of-type { color: var(--ink); }
.side {
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 3vw, 40px);
}
.side-title {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.certs {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}
.certs li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.cert-name { font-size: 14.5px; line-height: 1.4; }
.cert-meta { font-size: 12.5px; color: var(--muted); }
.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.principles li {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.principles li::before { content: "— "; color: var(--acid); }

/* ---------- contact ---------- */

.contact { padding-bottom: clamp(80px, 10vw, 130px); }
.contact .eyebrow { margin-bottom: 22px; }
.contact-title {
  margin: 0 0 42px;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.contact-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--acid);
}
.contact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}
.mail {
  font-size: clamp(1.15rem, 2.6vw, 1.9rem);
  letter-spacing: -0.02em;
  border-bottom: 1px solid transparent;
  transition: color 0.2s;
}
.mail:hover { color: var(--acid); }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.copy:hover { color: var(--ink); border-color: var(--line-strong); }
.copy.done { color: var(--acid); border-color: var(--acid); }
.contact-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 36px;
  font-size: 14px;
  color: var(--muted);
}
.contact-links a:hover { color: var(--acid); }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  font-size: 12.5px;
  color: var(--faint);
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; gap: 40px; }
  .hero-card { max-width: 440px; }
  .project { grid-template-columns: 40px minmax(0, 1fr); }
  .plate { grid-column: 2; max-width: 460px; }
  .about-grid { grid-template-columns: 1fr; }
  .side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 30px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .head-inner { height: 66px; }
  .hero { padding-top: 66px; }
  .hero-grid { padding-top: 56px; }
  .section-head { flex-direction: column; gap: 12px; }
  .section-head p { text-align: left; }
  .project { grid-template-columns: 1fr; gap: 18px; }
  .p-num { padding-top: 0; }
  .plate { grid-column: 1; max-width: none; }
  .stack-grid { grid-template-columns: 1fr; }
  .contact-row { align-items: flex-start; }
}

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