/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #0c0e12;
  --bg-raised: #12151a;
  --surface: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);

  --text: #e9ecf1;
  --text-muted: #8d95a1;
  --text-faint: #5b626d;

  --accent: #40d9ff;
  --accent-rgb: 64, 217, 255;
  --glow-soft: 0 0 24px rgba(var(--accent-rgb), 0.18);
  --glow: 0 0 12px rgba(var(--accent-rgb), 0.45);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 16px;
  --container: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-space: clamp(96px, 14vw, 160px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(var(--accent-rgb), 0.3); color: #fff; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(12, 14, 18, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-mark {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 4px;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: var(--glow);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.875rem;
}

.nav a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.nav a:not(.nav-cta) { display: none; }

.nav-cta {
  color: var(--text) !important;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.nav-cta:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: var(--glow-soft);
}

@media (min-width: 760px) {
  .nav a:not(.nav-cta) { display: inline; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 96px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(var(--accent-rgb), 0.10), transparent 70%),
    radial-gradient(40% 30% at 85% 30%, rgba(var(--accent-rgb), 0.05), transparent 70%);
}

/* faint grid, fading out — gives depth without noise */
.hero-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
}

.hero-inner { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--glow);
  flex-shrink: 0;
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero-name {
  font-size: clamp(3.25rem, 14vw, 7.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: #f4f6f9;
  text-shadow:
    0 0 40px rgba(var(--accent-rgb), 0.16),
    0 0 90px rgba(var(--accent-rgb), 0.08);
}

/* LED strip under the name: a single light chases along it */
.lightbar {
  position: relative;
  height: 2px;
  width: min(100%, 520px);
  margin: 28px 0 32px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.55), rgba(var(--accent-rgb), 0.12) 60%, transparent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.25);
  overflow: hidden;
}

.lightbar span {
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #c9f5ff, transparent);
  animation: chase 5.5s var(--ease) infinite;
  animation-delay: 1.2s;
}

@keyframes chase {
  0% { left: -30%; }
  45%, 100% { left: 110%; }
}

.hero-tagline {
  font-size: clamp(1.2rem, 4.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text);
  max-width: 22em;
}

.hero-intro {
  margin-top: 14px;
  font-size: clamp(1rem, 3.4vw, 1.1rem);
  color: var(--text-muted);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s, background-color 0.25s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #04151b;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 6px 28px -6px rgba(var(--accent-rgb), 0.45);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.6), 0 8px 36px -4px rgba(var(--accent-rgb), 0.6);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: var(--glow-soft);
}

.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--border);
  max-width: 760px;
}

.hero-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.hero-facts strong { font-weight: 600; color: var(--text); }
.hero-facts span { color: var(--text-muted); text-align: right; }

@media (min-width: 760px) {
  .hero-facts {
    grid-template-columns: repeat(3, 1fr);
    border-top: 0;
    gap: 32px;
  }
  .hero-facts li {
    flex-direction: column;
    gap: 4px;
    padding: 20px 0 0;
    border-bottom: 0;
    border-top: 1px solid var(--border);
  }
  .hero-facts span { text-align: left; }
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  display: none;
}

.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: var(--glow);
  animation: scroll-cue 2.2s var(--ease) infinite;
}

@keyframes scroll-cue {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  80%, 100% { transform: translateY(12px); opacity: 0; }
}

@media (min-height: 700px) and (min-width: 760px) {
  .scroll-cue { display: block; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: var(--section-space) 0 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-num {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55);
}

.section-label { color: var(--text-muted); }

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

.sub-head {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 64px 0 20px;
}

/* ==========================================================================
   Cards (shared)
   ========================================================================== */
.card {
  position: relative;
  display: block;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

/* cursor-following light, set by script.js */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--accent-rgb), 0.07), transparent 65%);
}

@media (hover: hover) {
  .card:hover {
    border-color: rgba(var(--accent-rgb), 0.28);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.06), 0 18px 50px -24px rgba(var(--accent-rgb), 0.25);
  }
  .card:hover::before { opacity: 1; }
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 10px;
}

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.pill--live {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.pill .status-dot { width: 6px; height: 6px; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.25s var(--ease), text-shadow 0.25s;
}

.card-link:hover,
.card:hover .card-link {
  gap: 10px;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.5);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tags li {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   LUMI
   ========================================================================== */
.lumi-title {
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #f4f6f9;
  text-shadow:
    0 0 30px rgba(var(--accent-rgb), 0.25),
    0 0 80px rgba(var(--accent-rgb), 0.12);
}

.lumi-what {
  margin-top: 16px;
  font-size: clamp(1.15rem, 4vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lumi-outcome {
  margin-top: 20px;
  max-width: 32em;
  font-size: 1.05rem;
  color: var(--text-muted);
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  box-shadow: -8px 0 16px -12px rgba(var(--accent-rgb), 0.6);
}

.lumi-outcome em {
  font-style: normal;
  color: var(--text);
}

.pivot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  counter-reset: none;
}

.pivot-step {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "index move"
    "title title"
    "body body"
    "meter label";
  align-items: center;
  row-gap: 6px;
  column-gap: 16px;
}

.pivot-index {
  grid-area: index;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
}

.pivot-step h4 {
  grid-area: title;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 6px;
}

.pivot-step p {
  grid-area: body;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.pivot-move {
  grid-area: move;
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.pivot-move::after { content: " →"; }

.meter {
  grid-area: meter;
  display: flex;
  gap: 4px;
}

.meter span {
  flex: 1;
  height: 6px;
  max-width: 34px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
}

.meter span.on {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55);
}

.meter-label {
  grid-area: label;
  justify-self: end;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.pivot-step--hit {
  border-color: rgba(var(--accent-rgb), 0.35);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(var(--accent-rgb), 0.07), transparent 70%),
    var(--surface);
  box-shadow: 0 20px 60px -30px rgba(var(--accent-rgb), 0.35);
}

.pivot-step--hit .meter-label,
.pivot-step--hit .pivot-move { color: var(--accent); }

.pivot-step--next {
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
}

/* pending meter: a light runs through it, like an install in progress */
.meter--pending span { animation: segment 2.4s ease-in-out infinite; }
.meter--pending span:nth-child(2) { animation-delay: 0.15s; }
.meter--pending span:nth-child(3) { animation-delay: 0.3s; }
.meter--pending span:nth-child(4) { animation-delay: 0.45s; }
.meter--pending span:nth-child(5) { animation-delay: 0.6s; }

@keyframes segment {
  0%, 60%, 100% { background: rgba(255, 255, 255, 0.07); box-shadow: none; }
  20% { background: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.45); }
}

@media (min-width: 900px) {
  .pivot { grid-template-columns: repeat(4, 1fr); }
  .pivot-step {
    grid-template-columns: 1fr;
    grid-template-areas:
      "index"
      "title"
      "body"
      "meter"
      "label"
      "move";
    align-content: start;
  }
  .pivot-step p { min-height: 3.2em; }
  .meter-label { justify-self: start; margin-top: 4px; }
  .pivot-move { justify-self: start; margin-top: 14px; }
}

/* ==========================================================================
   Credentials
   ========================================================================== */
.cred-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cred h3 { font-size: 1.1rem; }

.cred--stat .stat {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #f4f6f9;
  text-shadow: 0 0 28px rgba(var(--accent-rgb), 0.25);
}

@media (min-width: 640px) {
  .cred-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .cred-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Ventures
   ========================================================================== */
.venture-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.venture { padding: 32px 28px; }

.venture-top,
.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.venture h3 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (min-width: 760px) {
  .venture-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Projects
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 760px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

.stack {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-list li {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: border-color 0.25s, box-shadow 0.25s;
}

@media (hover: hover) {
  .stack-list li:hover {
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: var(--glow-soft);
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.section--contact { padding-bottom: var(--section-space); }

.contact-title {
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 40px;
  text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.14);
}

.contact-list { border-top: 1px solid var(--border); }

.contact-list li { border-bottom: 1px solid var(--border); }

.contact-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  transition: color 0.25s, padding 0.35s var(--ease);
}

.contact-arrow {
  color: var(--text-faint);
  transition: color 0.25s, transform 0.35s var(--ease), text-shadow 0.25s;
}

.contact-list a:hover { color: #fff; padding-left: 6px; }

.contact-list a:hover .contact-arrow {
  color: var(--accent);
  transform: translateX(-6px);
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.6);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner a { transition: color 0.2s; }
.footer-inner a:hover { color: var(--text); }

/* ==========================================================================
   Reveal on scroll (only when JS is running)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
