:root {
  --bg: #0a0e12;
  --bg-deep: #070a0d;
  --accent: #5eead4;
  --accent-soft: #2dd4bf;
  --text: #e6edf3;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* smooth in-page scrolling for anchor links (My Projects / Contact Me) */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image: radial-gradient(
      60% 50% at 50% 40%,
      rgba(45, 212, 191, 0.06),
      transparent 70%
    ),
    linear-gradient(to right, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  /* lock the grid + glow to the viewport so they flow seamlessly across
     sections, in sync with the fixed particle canvas */
  background-attachment: fixed;
}

/* ---------- Page background (fixed particle/star canvas behind all sections) ---------- */
.page-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  /* fade particles out toward the center so text stays clean */
  -webkit-mask-image: radial-gradient(
    62% 55% at 50% 46%,
    transparent 0%,
    transparent 30%,
    rgba(0, 0, 0, 0.85) 70%,
    #000 100%
  );
  mask-image: radial-gradient(
    62% 55% at 50% 46%,
    transparent 0%,
    transparent 30%,
    rgba(0, 0, 0, 0.85) 70%,
    #000 100%
  );
}

/* ---------- Scroll stage (normal flow; hero fades as it scrolls away) ---------- */
.scroll-stage {
  position: relative;
  z-index: 1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 0 1.5rem;
  text-align: center;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* per-letter spans for the name cascade (injected by main.js) */
.hero__name .ltr {
  display: inline-block;
  will-change: transform, opacity, filter;
}
.hero__name .ltr--space {
  width: 0.32em;
}
/* a letter mid-assembly: shown as a mono syntax glyph in teal, then it
   locks into the real letter (Bebas Neue) via .ltr--locked */
.hero__name .ltr--scramble {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.62em;
  color: var(--accent);
  opacity: 0.85;
  vertical-align: middle;
}
.hero__name .ltr--locked {
  animation: ltr-lock 0.35s ease both;
}
/* persistent micro-glitch: a settled letter briefly flips to a code/math
   glyph then snaps back — noticeable but the name stays readable */
.hero__name .ltr--glitch {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.58em;
  color: var(--accent);
  opacity: 0.9;
  vertical-align: middle;
  /* box is pinned to the letter width in JS; keep the glyph inside it */
  overflow: hidden;
}
@keyframes ltr-lock {
  from {
    opacity: 0.4;
    filter: blur(3px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.06);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #bbf7d0;
  /* load in on page open; backwards fill keeps scroll-fade working after */
  animation: status-in 0.7s ease 0.05s backwards;
}
/* current role — small line right above the kicker (smaller than kicker) */
.hero__role {
  margin: 0 0 0.6rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: rgba(203, 238, 230, 0.8);
  animation: status-in 0.7s ease 0.1s backwards;
}
@keyframes status-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}
/* expanding ring that pulses outward */
.hero__status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #4ade80;
  animation: status-pulse 1.8s ease-out infinite;
}

@keyframes status-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__status-dot::after {
    animation: none;
  }
}

.hero__kicker {
  margin: 0 0 1.25rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: rgba(94, 234, 212, 0.7);
  /* load in on page open; backwards fill keeps scroll-fade working after */
  animation: kicker-in 0.7s ease 0.1s backwards;
}
@keyframes kicker-in {
  from {
    opacity: 0;
    letter-spacing: 0.6em;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    letter-spacing: 0.35em;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__kicker,
  .hero__status,
  .hero__tagline .word {
    animation: none;
    opacity: 1;
  }
  .hero__name .ltr--locked {
    animation: none;
  }
}

.hero__name {
  margin: 0;
  font-family: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400; /* Bebas Neue ships a single weight */
  font-size: clamp(3.5rem, 15vw, 9.5rem); /* condensed — sized up */
  line-height: 1;
  letter-spacing: 0.1em; /* condensed letters breathe better spaced */
  color: #fff;
}

.hero__tagline {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--muted);
  text-wrap: balance;
}
/* words fade in one-by-one (delay set inline per word by main.js) */
.hero__tagline .word {
  display: inline-block;
  opacity: 0;
  animation: word-in 0.5s ease both;
}
@keyframes word-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.btn--solid {
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 500;
}
.btn--solid:hover {
  transform: translateY(-2px);
}
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
.btn--ghost:hover {
  border-color: rgba(94, 234, 212, 0.4);
  color: var(--accent);
}
/* present but not yet wired — visually muted, non-interactive */
.btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

/* ---------- Top bar (fixed, very subtle) ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 3vw, 2.25rem);
  /* very subtle: faint translucent wash + hairline bottom border + blur */
  background: linear-gradient(
    to bottom,
    rgba(7, 10, 13, 0.55),
    rgba(7, 10, 13, 0.22)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* gentle fade-in on load */
  animation: topbar-in 0.7s ease 0.15s backwards;
}
@keyframes topbar-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.topbar__brand {
  font-family: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.topbar__brand:hover {
  color: var(--accent);
}
.topbar__brand:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
  border-radius: 0.25rem;
}

/* ---------- Contact rail ---------- */
.contact-rail {
  display: flex;
  gap: 0.5rem;
}

.contact-rail__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(80, 255, 230, 0.14);
  border-radius: 999px;
  background: rgba(5, 15, 18, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}
.contact-rail__item:hover,
.contact-rail__item:focus-within {
  color: #d7f5ee;
  border-color: rgba(80, 255, 230, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(94, 234, 212, 0.1);
}

.contact-rail__action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
}

.contact-rail__icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.contact-rail__item:hover .contact-rail__icon,
.contact-rail__item:focus-within .contact-rail__icon {
  opacity: 1;
}

/* copy button — hidden until the pill is hovered/focused */
.contact-rail__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  overflow: hidden;
  cursor: pointer;
  transition:
    width 0.2s ease,
    opacity 0.2s ease,
    color 0.2s ease;
}
.contact-rail__item--copy:hover .contact-rail__copy,
.contact-rail__item--copy:focus-within .contact-rail__copy {
  width: 14px;
  opacity: 0.75;
}
.contact-rail__copy:hover {
  color: var(--accent);
  opacity: 1;
}
.contact-rail__copy-icon {
  width: 14px;
  height: 14px;
}
.contact-rail__item.is-copied .contact-rail__copy {
  width: 14px;
  opacity: 1;
  color: var(--accent);
}

/* tooltip — shows the actual detail on hover/focus */
.contact-rail__tip {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 50%;
  transform: translate(-50%, -4px);
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(80, 255, 230, 0.18);
  border-radius: 0.4rem;
  background: rgba(5, 15, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.contact-rail__item:hover .contact-rail__tip,
.contact-rail__item:focus-within .contact-rail__tip {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* swap tooltip text to a "Copied" confirmation */
.contact-rail__item.is-copied .contact-rail__tip {
  opacity: 1;
  transform: translate(-50%, 0);
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.4);
}
.contact-rail__item.is-copied .contact-rail__tip::after {
  content: " — Copied";
  color: #4ade80;
}

.contact-rail a:focus-visible,
.contact-rail button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
  border-radius: 999px;
}

@media (max-width: 720px) {
  .contact-rail {
    gap: 0.4rem;
  }
  .contact-rail__item {
    height: 1.85rem;
    padding: 0 0.65rem;
    font-size: 0.66rem;
  }
  .topbar__brand {
    font-size: 1.05rem;
  }
  /* on mobile keep it minimal: icon-only pills, no tooltips/copy */
  .contact-rail__label,
  .contact-rail__tip,
  .contact-rail__copy {
    display: none;
  }
  .contact-rail__item {
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar {
    animation: none;
  }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Projects ---------- */
.projects {
  position: relative;
  z-index: 1;
  padding: clamp(6rem, 14vh, 10rem) 1.5rem;
  /* soft top-down veil so particles dim behind the content without a seam */
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(7, 10, 13, 0.35) 28%,
    rgba(7, 10, 13, 0.55) 100%
  );
}
.projects__inner {
  max-width: 72rem;
  margin: 0 auto;
}
.projects__kicker {
  margin: 0 0 1.25rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(94, 234, 212, 0.7);
}
.projects__heading {
  margin: 0 0 1rem;
  font-family: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff;
}
.projects__intro {
  margin: 0 0 clamp(2.5rem, 6vh, 4rem);
  max-width: 40rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: balance;
}
.projects__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
}
/* two-up on wider screens; with the capped section width this gives a
   clean 2×2 once there are four cards */
@media (min-width: 760px) {
  .projects__list {
    grid-template-columns: repeat(2, 1fr);
  }
  /* wide card: spans both columns; text on top, the visual sits below it,
     full width and short so the section doesn't get tall */
  .project-card--wide {
    grid-column: 1 / -1;
    flex-direction: column-reverse;
  }
  .project-card--wide .project-card__preview {
    width: 100%;
    height: clamp(200px, 22vw, 250px);
    margin-bottom: 0;
    margin-top: 1.5rem;
  }
  /* compact the wide card so it stays short: tighter desc + the two chip
     groups side by side instead of stacked */
  .project-card--wide .project-card__title {
    margin-bottom: 0.4rem;
  }
  .project-card--wide .project-card__desc {
    margin-bottom: 1rem;
  }
  .project-card--wide .project-card__chips-wrap {
    display: flex;
    gap: 1.5rem;
  }
  .project-card--wide .project-card__stack {
    flex: 1;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
  }
  .project-card--wide .project-card__stack + .project-card__stack {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
  }
}

/* ---------- Project card (research-file / build-log feel) ---------- */
.project-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: rgba(10, 16, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.project-card:hover {
  border-color: rgba(94, 234, 212, 0.32);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -28px rgba(94, 234, 212, 0.25);
}

.project-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.project-card__index {
  margin: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: rgba(94, 234, 212, 0.6);
}
/* status badge — small, "in dev" warm amber, matches chip idiom */
.project-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.07);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(252, 211, 77, 0.85);
  white-space: nowrap;
}
.project-card__status-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgb(251, 191, 36);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.7);
}
.project-card__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.01em;
}
.project-card__subtitle {
  margin: 0 0 0.9rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(94, 234, 212, 0.65);
}
.project-card__desc {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}

.project-card__stack {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.project-card__stack + .project-card__stack {
  margin-top: 1rem;
  padding-top: 0;
  border-top: 0;
}
.project-card__stack-label {
  margin: 0 0 0.6rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(148, 163, 184, 0.6);
}
.project-card__chips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.project-card__chips li {
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(80, 255, 230, 0.16);
  border-radius: 999px;
  background: rgba(5, 15, 18, 0.4);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: #9fb6b1;
}

/* ---------- Project preview (abstract dashboard mock) ---------- */
.project-card__preview {
  display: flex;
  height: clamp(210px, 26vw, 250px);
  margin-bottom: 1.5rem;
}
.preview-panel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.75rem;
  background:
    linear-gradient(180deg, rgba(94, 234, 212, 0.03), transparent 60%),
    rgba(6, 11, 14, 0.6);
  /* faint dashboard grid */
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  overflow: hidden;
}
.preview-panel__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.7);
}
.preview-panel__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(94, 234, 212, 0.6);
}
.preview-panel__title {
  color: rgba(94, 234, 212, 0.75);
}
.preview-panel__live {
  margin-left: auto;
  color: rgba(134, 239, 172, 0.7);
}

.preview-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.preview-chart {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.preview-chart figcaption {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
}
.preview-chart svg {
  width: 100%;
  height: 48px;
}
.preview-chart polyline,
.preview-chart path {
  fill: none;
  stroke: rgba(94, 234, 212, 0.55);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.preview-chart .preview-zero {
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.preview-greeks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}
.preview-greek {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.45rem 0.2rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.4rem;
  background: rgba(10, 16, 20, 0.5);
}
.preview-greek .g-sym {
  font-size: 0.85rem;
  color: rgba(125, 211, 252, 0.8);
}
.preview-greek .g-name {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.6);
}
.preview-greek .g-val {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  color: var(--text);
}

.preview-heat {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}
.preview-heat span {
  height: 8px;
  border-radius: 2px;
  background: rgba(94, 234, 212, 0.1);
}
.preview-heat span:nth-child(3n) {
  background: rgba(94, 234, 212, 0.22);
}
.preview-heat span:nth-child(4n) {
  background: rgba(125, 211, 252, 0.18);
}
.preview-heat span:nth-child(7n) {
  background: rgba(134, 239, 172, 0.16);
}

.preview-surface-wrap {
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.preview-surface-wrap figcaption {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
}
.preview-surface {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
}

/* ---------- Regime tree preview ---------- */
.preview-regime {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
}

/* ---------- Orderbook preview (abstract L2 depth ladder) ---------- */
.preview-orderbook {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
}
.ob-side {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ob-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 18px;
  padding: 0 0.5rem;
  border-radius: 3px;
  overflow: hidden;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.6rem;
}
/* liquidity bar fills from the right, behind the text */
.ob-bar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  opacity: 0.82;
  /* width/opacity animate as the JS ticks the book "live" */
  transition:
    width 0.55s ease,
    opacity 0.4s ease;
}
.ob-price,
.ob-size {
  transition: color 0.3s ease;
}
/* brief emphasis when a level updates */
.ob-row.is-updated .ob-bar {
  opacity: 1;
}
.ob-row--bid.is-updated .ob-price {
  color: #aef7ea;
}
.ob-row--ask.is-updated .ob-price {
  color: #e8eef5;
}
.ob-price,
.ob-size {
  position: relative;
  z-index: 1;
}
.ob-size {
  margin-left: auto;
  color: rgba(148, 163, 184, 0.7);
}
.ob-row--ask .ob-bar {
  background: rgba(203, 213, 225, 0.12);
}
.ob-row--ask .ob-price {
  color: rgba(203, 213, 225, 0.8);
}
.ob-row--bid .ob-bar {
  background: rgba(94, 234, 212, 0.16);
}
.ob-row--bid .ob-price {
  color: rgba(94, 234, 212, 0.85);
}
.ob-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.18);
  border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.55);
}

@media (max-width: 720px) {
  .project-card__preview {
    height: clamp(220px, 60vw, 260px);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transition: opacity 0.4s ease;
    transform: none;
  }
  .project-card {
    transition: none;
  }
  .ob-row--live .ob-bar {
    animation: none;
  }
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  padding: clamp(6rem, 14vh, 10rem) 1.5rem clamp(7rem, 16vh, 11rem);
}
.contact__inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
}
.contact__kicker {
  margin: 0 0 1.25rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(94, 234, 212, 0.7);
}
.contact__heading {
  margin: 0 0 clamp(2.5rem, 6vh, 4rem);
  font-family: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff;
}

/* ---------- Contact cards (three equal-weight) ---------- */
.contact__cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
/* one shared class — no per-card size/glow overrides anywhere */
.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 13.5rem;
  padding: clamp(1.5rem, 2.6vw, 2rem);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: rgba(10, 16, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.contact-card:hover,
.contact-card:focus-within {
  border-color: rgba(94, 234, 212, 0.32);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -28px rgba(94, 234, 212, 0.25);
}
/* full-card click target for the copy-style cards (sits below content) */
.contact-card__hit {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.contact-card > :not(.contact-card__hit):not(.contact-card__shine) {
  position: relative;
  z-index: 1;
}
.contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(80, 255, 230, 0.18);
  border-radius: 0.6rem;
  background: rgba(5, 15, 18, 0.45);
  color: var(--accent);
}
.contact-card__icon svg {
  width: 20px;
  height: 20px;
}
.contact-card__label {
  font-size: 1.35rem;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.01em;
}
.contact-card__descriptor {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  word-break: break-word;
}
.contact-card__action {
  margin-top: auto;
  padding-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.contact-card__action-link {
  color: var(--accent);
  text-decoration: none;
}
.contact-card__action-link:hover {
  text-decoration: underline;
}
.contact-card__copy {
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(80, 255, 230, 0.18);
  border-radius: 999px;
  background: rgba(5, 15, 18, 0.4);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
.contact-card__copy:hover {
  border-color: rgba(80, 255, 230, 0.4);
  color: var(--accent);
}
.contact-card.is-copied .contact-card__copy {
  border-color: rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
}
.contact-card.is-copied .contact-card__copy::after {
  content: " ✓";
  color: #4ade80;
}
/* soft inner shine revealed on hover */
.contact-card__shine {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    120% 80% at 50% -10%,
    rgba(94, 234, 212, 0.12),
    transparent 60%
  );
  transition: opacity 0.3s ease;
}
.contact-card:hover .contact-card__shine,
.contact-card:focus-within .contact-card__shine {
  opacity: 1;
}
.contact-card:focus-visible,
.contact-card__hit:focus-visible,
.contact-card__action-link:focus-visible,
.contact-card__copy:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
  border-radius: 0.6rem;
}

/* ---------- Contact footer ---------- */
.contact__footer {
  margin-top: clamp(3rem, 8vh, 5rem);
  text-align: center;
}
.contact__rule {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: 1px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(148, 163, 184, 0.35),
    transparent
  );
}
.contact__copy {
  margin: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(203, 213, 225, 0.75);
}

@media (max-width: 720px) {
  .contact__cards {
    grid-template-columns: 1fr;
  }
  .contact-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-card {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero {
    transition: none;
  }
  /* drop the pin + cascade: render the hero as a simple stacked page */
  .scroll-stage {
    height: auto;
  }
  .hero {
    position: relative;
    height: 100vh;
  }
}
