/* ============================================================
   Theme: Forge (Warm rust, editorial serif)
   ============================================================ */

:root {
  --bg:         oklch(11% 0.018 52);
  --surface:    oklch(15% 0.022 50);
  --surface-2:  oklch(19% 0.026 48);
  --text:       oklch(87% 0.014 74);
  --muted:      oklch(50% 0.04 60);
  --muted-readable: oklch(66% 0.032 62);
  --hairline:   oklch(22% 0.02 54);
  --accent:     oklch(62% 0.18 35);
  --accent-2:   oklch(50% 0.15 28);
  --shadow-rgb: 30, 8, 0;
  --scheme:     dark;
  --f-display:  "Fraunces", Georgia, serif;
  --f-body:     "Sora", "Helvetica Neue", sans-serif;
  --f-mono:     "JetBrains Mono", ui-monospace, monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ——— Base ——— */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: var(--scheme);
}
body { overflow-x: hidden; }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ——— Layout ——— */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 640px) { 
  .container { padding: 0 20px; }
  .nav__links { gap: 18px; font-size: 14px; } 
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .nav__inner {
    height: 64px;
    justify-content: center;
  }
  .nav__mark { display: none; }
  .nav__links {
    width: 100%;
    justify-content: space-between;
    gap: 0;
    font-size: 12px;
  }
  .nav__link {
    padding: 10px 0;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .nav__links { font-size: 12px; }
  .hero__name { font-size: clamp(48px, 12vw, 116px); }
  .section__title { font-size: clamp(32px, 10vw, 64px); }
  .contact-title { font-size: clamp(38px, 12vw, 96px); }
  .about-facts { grid-template-columns: 1fr; gap: 20px; }
  .proj-row__links { gap: 16px; }
}

/* ——— Nav ——— */
@keyframes navRise {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: navRise 1000ms var(--ease-out-expo) forwards;
}
.nav--scrolled { border-bottom-color: var(--hairline); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav__mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 20px;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}
.nav__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
  flex-shrink: 0;
}
.nav__links {
  display: flex; gap: 28px;
  font-size: 15px;
}
.nav__link {
  position: relative;
  color: var(--muted);
  transition: color .2s ease;
  padding: 12px 0;
  margin: -6px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav__link:hover { color: var(--text); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 640px) {
  .nav__links {
    gap: 18px;
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .nav__inner {
    height: 64px;
    justify-content: center;
  }
  .nav__mark { display: none; }
  .nav__links {
    width: 100%;
    justify-content: space-between;
    gap: 0;
    font-size: 12px;
  }
  .nav__link {
    padding: 10px 0;
    margin: 0;
    justify-content: center;
  }
}

/* ——— Hero ——— */
.hero {
  min-height: clamp(500px, 90vh, 1000px);
  padding: clamp(96px, 12vh, 160px) 0 96px;
  display: flex;
  align-items: center;
  position: relative;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 100px;
  align-items: center;
  width: 100%;
}
@media (max-width: 960px) {
  .hero { min-height: 70vh; padding: 112px 0 48px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .hero {
    min-height: auto;
    padding: 96px 0 56px;
  }
}

.hero__left {
  max-width: 640px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 36px;
  letter-spacing: 0.04em;
}
.hero__eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); position: relative;
  flex-shrink: 0;
}
.hero__eyebrow .pulse::before {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; background: var(--accent);
  opacity: .3; animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .35; }
  100% { transform: scale(2.4); opacity: 0; }
}

.hero__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(64px, 8.4vw, 116px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--text);
  text-wrap: balance;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
}

.hero__rule {
  width: 80px;
  color: var(--accent);
  margin: 0 0 18px;
  display: block;
}
.hero__rule svg { width: 100%; height: 8px; display: block; }

.hero__role {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 44px;
}

.hero__tagline {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.55;
  color: color-mix(in oklab, var(--text) 82%, var(--muted-readable));
  margin: 0 0 34px;
  max-width: 52ch;
  text-wrap: pretty;
}

.hero-proof {
  width: min(100%, 620px);
  margin: 0 0 44px;
  padding: 18px 0 0;
  border-top: 1px solid color-mix(in oklab, var(--hairline) 84%, transparent);
  transition: border-color 240ms ease-out, background 240ms ease-out, padding 240ms ease-out;
}
.hero-proof__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.hero-proof__eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-proof__items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
.hero-proof__item {
  min-width: 0;
}
.hero-proof__item dt {
  margin: 0 0 5px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-proof__item dd {
  margin: 0;
  color: color-mix(in oklab, var(--text) 92%, var(--muted-readable));
  font-size: 14px;
  line-height: 1.45;
}
.hero-proof[data-proof-variant="evidence"] {
  padding: 18px 18px 20px;
  border: 1px solid color-mix(in oklab, var(--accent) 34%, var(--hairline));
  background: color-mix(in oklab, var(--surface) 48%, transparent);
}
.hero-proof[data-proof-variant="evidence"] .hero-proof__item dd {
  color: var(--text);
  font-weight: 500;
}
.hero-proof[data-proof-variant="signal"] {
  padding: 20px;
  border: 1px solid color-mix(in oklab, var(--accent) 58%, var(--hairline));
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 12%, transparent), transparent 68%),
    color-mix(in oklab, var(--surface-2) 62%, transparent);
}
.hero-proof[data-proof-variant="signal"] .hero-proof__item dd {
  color: var(--text);
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
}
@media (max-width: 720px) {
  .hero-proof__items {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero-proof {
    order: 7;
    margin: 34px 0 0;
  }
  .hero__ctas {
    order: 6;
  }
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 16px 28px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--text);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: color 180ms ease-out;
}
.btn-primary__label { position: relative; z-index: 2; }
.btn-primary__fill {
  position: absolute; inset: 0;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease-out;
  z-index: 1;
}
.btn-primary:hover { color: var(--bg); }
.btn-primary:hover .btn-primary__fill { transform: scaleX(1); }

.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 14px 0;
  margin: -10px 0;
}
.btn-secondary__line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease-out;
}
.btn-secondary:hover .btn-secondary__line { transform: scaleX(1); }

.hero__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  color: color-mix(in oklab, var(--text) 48%, var(--muted));
  position: relative;
  z-index: 1;
  overflow: visible;
  min-height: 440px;
}
.hero__nodes {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 0 34px rgba(var(--shadow-rgb), 0.36));
}
@media (max-width: 960px) {
  .hero__right { display: none; }
}

/* Hero entrance — stagger by --i */
.hero__rise {
  opacity: 0;
  transform: translateY(16px);
  animation: heroRise 400ms ease-out forwards;
  animation-delay: calc(var(--i, 0) * 100ms);
}
@keyframes heroRise {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__rise { opacity: 1; transform: none; animation: none; }
}

/* ——— Section scaffolding ——— */
.section {
  padding: clamp(64px, 10vh, 140px) 0;
  position: relative;
}
.about-section, .projects-section, .skills-section, .contact-section { padding: 0; } /* Reset individual paddings to use .section default */

.section + .section { border-top: 1px solid var(--hairline); }

.section__label {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 22px;
}
.section__label::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.section__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  position: relative;
  display: inline-block;
}
.section-title__doodle {
  display: block;
  width: min(220px, 58vw);
  height: 34px;
  margin-top: 12px;
  color: var(--accent);
  opacity: 0.92;
  pointer-events: none;
  overflow: visible;
}
.section-title__doodle--projects {
  width: min(214px, 52vw);
  height: 18px;
  margin-top: 13px;
}
.section-title__doodle--experience {
  width: min(202px, 54vw);
  height: 38px;
}
.section-title__doodle--logic {
  width: min(206px, 55vw);
  height: 36px;
}
.section-title__doodle--contact {
  width: min(220px, 58vw);
  height: 42px;
  margin-top: 16px;
}
.section-title__doodle .doodle-stroke {
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1150ms var(--ease-out-expo);
  transition-delay: 180ms;
}
.section-title__doodle--projects .doodle-stroke {
  stroke-width: 1.55;
}
.is-doodle-in .section-title__doodle .doodle-stroke {
  stroke-dashoffset: 0;
}
.section__kicker {
  font-size: 20px;
  color: color-mix(in oklab, var(--text) 80%, var(--muted));
  max-width: 640px;
  margin: 28px 0 clamp(48px, 8vh, 72px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ——— About ——— */
.about-section { padding: 140px 0; }
.about-title__rule {
  display: block;
  width: 200px;
  height: 10px;
  margin-top: 14px;
  color: var(--accent);
  opacity: 0.9;
}
.about-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 80px;
  align-items: start;
  margin-top: 64px;
}
@media (max-width: 1100px) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 56px;
  }
}
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; margin-top: 48px; }
  .about-figure { max-width: 160px; justify-self: start; }
  .about-copy p { font-size: 17px; line-height: 1.6; }
  .about-facts { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; padding-top: 24px; }
}

.about-copy { max-width: 60ch; }
.about-copy p {
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 1.4em;
  color: color-mix(in oklab, var(--text) 92%, var(--muted-readable));
  text-wrap: pretty;
  max-width: 58ch;
}
.about-copy p:last-of-type { margin-bottom: 0; }
.about-copy em {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}

.about-facts {
  margin: 44px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 36px;
  font-family: var(--f-mono);
}
.about-facts dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.about-facts dd {
  margin: 0;
  font-family: var(--f-body);
  font-size: 15px;
  color: color-mix(in oklab, var(--text) 92%, var(--muted-readable));
}

.about-figure {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 360px;
  justify-self: end;
  color: var(--text);
}
@media (max-width: 960px) { .about-figure { justify-self: start; max-width: 320px; } }
@media (max-width: 640px) {
  .about-figure {
    max-width: min(320px, 100%);
  }
  .about-figure__svg,
  .about-figure:hover .about-figure__svg {
    transform: none;
  }
}

.about-figure__svg {
  width: 100%;
  height: auto;
  display: block;
  transform: rotate(-1.5deg);
  transition: transform 350ms ease-out;
}
.about-figure__frame { color: var(--accent); opacity: 0.65; }
.about-figure__cap {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 4px;
}
.about-figure__mark {
  position: absolute;
  top: -18px; right: -10px;
  width: 36px; height: 36px;
  color: var(--accent);
  opacity: 0;
  transform: rotate(-12deg) scale(0.85);
  transition: opacity 220ms ease-out, transform 260ms ease-out;
  pointer-events: none;
}
.about-figure:hover .about-figure__svg { transform: rotate(0.5deg); }
.about-figure:hover .about-figure__mark { opacity: 1; transform: rotate(0deg) scale(1); }

@media (max-width: 640px) {
  .about-rise--x,
  .about-section.is-in .about-rise--x {
    transform: none;
  }
  .about-figure__svg,
  .about-figure:hover .about-figure__svg {
    transform: none;
  }
}

/* About section reveal */
.about-rise {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
  transition-delay: calc(var(--i, 0) * 150ms);
}
.about-rise--x { transform: translateX(20px); }
.about-section.is-in .about-rise { opacity: 1; transform: none; }
@media (max-width: 640px) {
  .about-rise--x {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .about-rise { opacity: 1; transform: none; transition: none; }
}

/* ——— Projects ——— */
.projects-section { padding: 140px 0; }
.proj-section__kicker {
  font-size: 18px;
  line-height: 1.65;
  color: color-mix(in oklab, var(--text) 84%, var(--muted-readable));
  max-width: 60ch;
  margin: 28px 0 0;
  text-wrap: pretty;
}
.proj-list {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 96px);
  margin-top: clamp(48px, 6vw, 96px);
}
@media (max-width: 960px) { .proj-list { } }

.proj-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  position: relative;
}
.proj-row--reverse .proj-row__visual-col { order: 2; }
.proj-row--reverse .proj-row__copy-col   { order: 1; }
@media (max-width: 960px) {
  .proj-row { grid-template-columns: 1fr; gap: 24px; }
  .proj-row--reverse .proj-row__visual-col { order: 0; }
  .proj-row--reverse .proj-row__copy-col   { order: 1; }
}

.proj-row__visual-col {
  position: relative;
  transition: transform 280ms ease-out;
}
.proj-row:hover .proj-row__visual-col { transform: translateY(-5px); }

.proj-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  overflow: hidden;
  color: var(--text);
}
@media (max-width: 768px) {
  .proj-visual { aspect-ratio: 4 / 3; }
}
.proj-visual svg { width: 100%; height: 100%; display: block; }
.proj-visual__plate {
  fill: color-mix(in oklab, var(--surface-2) 88%, var(--bg));
}
.proj-visual__label,
.proj-visual__text,
.proj-visual__number,
.crypto-asset {
  font-family: var(--f-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--text);
}
.proj-visual__label {
  font-size: 10px;
  fill: var(--accent);
}
.proj-visual__text {
  font-size: 13px;
  fill: color-mix(in oklab, var(--text) 84%, var(--muted));
}
.proj-visual__number {
  font-size: 26px;
  fill: var(--accent);
}
.ticket-board__time {
  font-family: var(--f-mono);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  fill: var(--accent);
}

.ticket-rail,
.ticket-sleeper {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ticket-rail {
  stroke-width: 4;
  opacity: 0.42;
}
.ticket-sleeper {
  stroke: color-mix(in oklab, var(--text) 34%, transparent);
  stroke-width: 2;
}
.ticket-board rect,
.ticket-toast rect,
.rbac-matrix-card > rect,
.ext-window > rect,
.ext-popover > rect,
.crypto-ledger > rect,
.crypto-chart > rect,
.crypto-basis > rect {
  fill: color-mix(in oklab, var(--surface) 74%, var(--bg));
  stroke: color-mix(in oklab, var(--accent) 42%, var(--hairline));
  stroke-width: 1.2;
}
.ticket-board line,
.rbac-matrix-card line,
.ext-window line,
.crypto-chart line {
  stroke: color-mix(in oklab, var(--text) 18%, transparent);
  stroke-width: 1;
}
.ticket-toast rect {
  fill: color-mix(in oklab, var(--surface) 88%, var(--bg));
  filter: drop-shadow(0 16px 22px rgba(var(--shadow-rgb), 0.24));
}
.ticket-toast circle {
  fill: color-mix(in oklab, var(--accent) 18%, var(--surface));
  stroke: var(--accent);
  stroke-width: 1.5;
}
.ticket-toast path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ticket-toast {
  animation: toastIn 4600ms var(--ease-out-expo) infinite;
}

.ext-popover rect:not(:first-child),
.crypto-ledger rect:not(:first-child) {
  fill: color-mix(in oklab, var(--text) 26%, transparent);
}
.rbac-column,
.rbac-twofa__text {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: color-mix(in oklab, var(--text) 82%, var(--muted));
}
.rbac-twofa rect {
  fill: color-mix(in oklab, var(--accent) 16%, var(--surface));
  stroke: color-mix(in oklab, var(--accent) 40%, var(--hairline));
  stroke-width: 1;
}
.rbac-check {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rbac-deny-mark {
  fill: none;
  stroke: color-mix(in oklab, var(--muted) 78%, var(--hairline));
  stroke-width: 1.6;
  stroke-linecap: round;
}

.ext-window circle {
  fill: color-mix(in oklab, var(--accent) 42%, var(--muted));
}
.ext-window path,
.ext-zip path {
  fill: none;
  stroke: color-mix(in oklab, var(--text) 72%, var(--muted));
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ext-branch--active {
  stroke: var(--accent) !important;
}
.ext-download-button rect,
.ext-zip path:first-child {
  fill: color-mix(in oklab, var(--accent) 22%, var(--surface));
}
.ext-download-button rect {
  stroke: var(--accent);
  stroke-width: 1.2;
  animation: buttonPress 3600ms var(--ease-out-expo) infinite;
  transform-origin: center;
}
.ext-download-button path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ext-button-text {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  fill: var(--text);
}
.ext-zip {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: zipArrive 3600ms var(--ease-out-expo) infinite;
}

.crypto-asset {
  font-size: 11px;
  fill: color-mix(in oklab, var(--text) 82%, var(--muted));
}
.crypto-chart path,
.crypto-basis path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.crypto-line {
  stroke-dasharray: 390;
  animation: chartDraw 15000ms linear infinite;
}
.ticket-toast,
.ext-download-button rect,
.ext-zip,
.crypto-line {
  animation-play-state: paused;
}
.projects-section.is-in .ticket-toast,
.projects-section.is-in .ext-download-button rect,
.projects-section.is-in .ext-zip,
.projects-section.is-in .crypto-line {
  animation-play-state: running;
}

@keyframes toastIn {
  0%, 18% { opacity: 0; transform: translateY(-18px); }
  34%, 78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}
@keyframes buttonPress {
  0%, 44%, 100% { transform: translateY(0); }
  52% { transform: translateY(2px); }
}
@keyframes zipArrive {
  0%, 52% { opacity: 0; transform: translateY(-18px) scale(0.9); }
  66%, 88% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(6px) scale(0.98); }
}
@keyframes chartDraw {
  0% { stroke-dashoffset: 390; }
  14% { stroke-dashoffset: 342; }
  23% { stroke-dashoffset: 326; }
  31% { stroke-dashoffset: 270; }
  45% { stroke-dashoffset: 232; }
  54% { stroke-dashoffset: 164; }
  66% { stroke-dashoffset: 128; }
  72% { stroke-dashoffset: 64; }
  84%, 100% { stroke-dashoffset: 0; }
}

.proj-visual::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms ease-out;
}
.proj-row:hover .proj-visual::after { transform: scaleX(1); }

.proj-row__copy-col { max-width: 52ch; }
.proj-row--reverse .proj-row__copy-col { justify-self: end; }

.proj-row__num {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 14px;
}
.proj-row__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1px;
  color: var(--text);
  transition: color 200ms ease-out;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}
.proj-row:hover .proj-row__title { color: var(--accent); }
.proj-row__summary {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
  margin: 0 0 18px;
}
.proj-row__blurb {
  font-size: 16px;
  line-height: 1.65;
  color: color-mix(in oklab, var(--text) 88%, var(--muted-readable));
  margin: 0 0 22px;
  text-wrap: pretty;
}
@media (max-width: 768px) {
  .proj-row__blurb { display: none; }
  .proj-list { gap: 48px; margin-top: 48px; }
  .proj-row { gap: 16px; }
}
.proj-row__tags {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.7;
}
.proj-row__sep { color: var(--accent); opacity: 0.7; }

.proj-row__links {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
  transition: color 180ms ease-out;
}
.proj-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease-out;
}
.proj-link:hover { color: var(--accent); }
.proj-link:hover::after { transform: scaleX(1); }
.proj-link__arr { font-size: 13px; transition: transform 200ms ease-out; }
.proj-link:hover .proj-link__arr { transform: translate(2px, -2px); }

/* Projects reveal */
.proj-rise {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
  transition-delay: calc(var(--i, 0) * 100ms + 50ms);
}
.projects-section.is-in .proj-rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ticket-toast,
  .ext-download-button rect,
  .ext-zip,
  .crypto-line {
    animation: none;
  }
  .proj-rise { opacity: 1; transform: none; transition: none; }
}

/* ——— Experience ——— */
.experience-section { 
  background: var(--bg);
  padding: clamp(80px, 12vh, 160px) 0;
}
.exp-list-distilled {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
}

.exp-row-distilled {
  padding: 0;
  border-top: 1px solid var(--hairline);
  position: relative;
}
.exp-rise {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease-out, transform 650ms var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 90ms + 70ms);
}
.experience-section.is-in .exp-rise {
  opacity: 1;
  transform: none;
}

.exp-row-distilled:last-child {
  border-bottom: 1px solid var(--hairline);
}

.exp-row-distilled__trigger {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: 140px 1fr 44px;
  gap: 64px;
  align-items: center;
  width: 100%;
  min-height: 108px;
  padding: 30px 0;
  text-align: left;
}
.exp-row-distilled__trigger:hover .exp-row-distilled__title,
.exp-row-distilled.is-open .exp-row-distilled__title {
  color: var(--accent);
}

.exp-row-distilled__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-row-distilled__date {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text);
  letter-spacing: 0.05em;
}

.exp-row-distilled__type {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.exp-row-distilled__title {
  display: block;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin: 0;
  transition: color 240ms ease-out;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
}

.exp-row-distilled__at {
  font-style: italic;
  color: var(--accent);
  opacity: 0.8;
}

.exp-row-distilled__hint {
  display: block;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: color-mix(in oklab, var(--muted) 82%, transparent);
  text-transform: uppercase;
}

.exp-row-distilled__proof {
  display: block;
  margin-top: 8px;
  color: color-mix(in oklab, var(--text) 80%, var(--muted-readable));
  font-size: 14px;
  line-height: 1.45;
}

.exp-row-distilled__indicator {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--accent) 38%, var(--hairline));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  transition: transform 520ms var(--ease-out-expo), background 280ms ease-out, border-color 280ms ease-out;
}
.exp-row-distilled__indicator span,
.exp-row-distilled__indicator span::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform 520ms var(--ease-out-expo);
}
.exp-row-distilled__indicator span {
  position: relative;
}
.exp-row-distilled__indicator span::before {
  left: 0;
  top: 0;
  transform: rotate(90deg);
}
.exp-row-distilled.is-open .exp-row-distilled__indicator {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(180deg);
}
.exp-row-distilled.is-open .exp-row-distilled__indicator span,
.exp-row-distilled.is-open .exp-row-distilled__indicator span::before {
  background: var(--bg);
}
.exp-row-distilled.is-open .exp-row-distilled__indicator span::before {
  transform: rotate(0deg);
}

.exp-row-distilled__expand {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 680ms var(--ease-out-expo), opacity 360ms ease-out;
}
.exp-row-distilled.is-open .exp-row-distilled__expand {
  grid-template-rows: 1fr;
  opacity: 1;
}
.exp-row-distilled__inner {
  overflow: hidden;
}
.exp-row-distilled__details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  align-items: center;
  padding: 0 0 34px 204px;
}

.exp-row-distilled__metrics {
  display: flex;
  gap: 24px;
}

.exp-row-distilled__metric {
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.exp-row-distilled__stack {
  display: flex;
  gap: 16px;
}

.exp-row-distilled__tag {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
}

.exp-row-distilled__tag:not(:last-child)::after {
  content: "/";
  margin-left: 16px;
  opacity: 0.2;
}

@media (max-width: 960px) {
  .exp-row-distilled__trigger { grid-template-columns: 1fr 36px; gap: 16px; padding: 24px 0; }
  .exp-row-distilled__meta { flex-direction: row; align-items: baseline; gap: 16px; }
  .exp-row-distilled__main { grid-column: 1; grid-row: 2; }
  .exp-row-distilled__indicator { grid-column: 2; grid-row: 1 / span 2; }
  .exp-row-distilled__title { font-size: 20px; }
  .exp-row-distilled__details { padding: 0 0 28px; }
  .exp-row-distilled__metrics,
  .exp-row-distilled__stack { flex-wrap: wrap; }
}

/* ——— Skills ——— */
.skills-section { padding: clamp(80px, 12vh, 160px) 0; }
.skills-list {
  margin: 64px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
}
@media (max-width: 960px) { .skills-list { grid-template-columns: 1fr; } }

.skills-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}

.skills-row__label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.skills-row__items {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.skills-row__sep { color: var(--accent); opacity: 0.3; }

/* ——— Contact ——— */
.contact-section { 
  background: var(--bg);
  padding: clamp(80px, 15vh, 180px) 0;
}
.contact-block { max-width: 760px; }

.contact-title {
  font-family: var(--f-display);
  font-weight: 760;
  font-size: clamp(48px, 7.6vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  color: color-mix(in oklab, var(--text) 94%, var(--muted-readable));
  font-variation-settings: "opsz" 144, "SOFT" 24, "WONK" 1;
  display: inline-block;
  position: relative;
}

.contact-copy {
  font-size: 19px;
  line-height: 1.6;
  color: color-mix(in oklab, var(--text) 92%, var(--muted-readable));
  margin: 32px 0 34px;
  text-wrap: pretty;
}

.contact-intent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 0 0 52px;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.contact-intent dt {
  margin: 0 0 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-intent dd {
  margin: 0;
  color: color-mix(in oklab, var(--text) 92%, var(--muted-readable));
  font-size: 16px;
  line-height: 1.5;
}

.contact-grid-distilled {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link-distilled {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.3s ease;
}
.contact-link-distilled:hover { border-bottom-color: var(--accent); }

.contact-link__tag {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.contact-link__val {
  font-family: var(--f-body);
  font-size: 16px;
  color: var(--text);
  transition: color 0.3s ease;
}
.contact-link-distilled:hover .contact-link__val { color: var(--accent); }

.contact-footer-distilled {
  margin-top: 64px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 24px;
  color: var(--text);
  font-variation-settings: "opsz" 144, "SOFT" 20, "WONK" 1;
}

.contact-rise {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 650ms ease-out, transform 650ms var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.contact-section.is-in .contact-rise {
  opacity: 1;
  transform: none;
}

/* ——— Footer ——— */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--hairline);
  background: var(--bg);
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.footer__mark {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.footer__credit {
  font-family: var(--f-body);
  font-size: 11px;
  color: color-mix(in oklab, var(--text) 40%, var(--muted));
}

@media (max-width: 960px) {
  .contact-link-distilled { grid-template-columns: 80px 1fr; }
  .contact-link__val { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 640px) {
  .contact-intent {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .footer__row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* ——— Generic reveal on scroll ——— */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.8s var(--ease-out-expo);
}
.is-in .reveal {
  opacity: 1;
  transform: none;
}
.is-in .reveal { transition-delay: calc(var(--i, 0) * 100ms); }

/* ——— Cursor tilt ——— */
.tilt-wrap { perspective: 1000px; }
.tilt {
  transition: transform .2s cubic-bezier(.2,.7,.2,1);
  transform-style: preserve-3d;
  will-change: transform;
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  .exp-rise { opacity: 1; transform: none; transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow .pulse::before { animation: none; }
  .tilt { transform: none !important; transition: none; }
  .section-title__doodle .doodle-stroke {
    stroke-dashoffset: 0;
    transition: none;
  }
}
