/* ajitsamuel.com — AI Infrastructure tier
   Dark · gradient mesh · glass cards · Inter Tight · subtle motion
*/

*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

:root {
  /* Color */
  --bg: #07070a;
  --bg-elev: #0d0d12;
  --bg-card: rgba(20, 20, 28, 0.55);
  --ink: #f5f5f7;
  --ink-soft: #a1a1ad;
  --ink-muted: #6b6b78;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Brand gradient */
  --grad-a: #a78bfa;   /* violet */
  --grad-b: #22d3ee;   /* cyan */
  --grad-c: #f472b6;   /* pink */
  --grad-d: #38bdf8;   /* sky */

  /* Type */
  --font-display: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============================
   ATMOSPHERE — gradient mesh background
   ============================ */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  will-change: transform;
}

.mesh-a {
  width: 720px; height: 720px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, var(--grad-a) 0%, transparent 60%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.mesh-b {
  width: 680px; height: 680px;
  top: 20vh; right: -150px;
  background: radial-gradient(circle, var(--grad-b) 0%, transparent 60%);
  animation: drift-b 28s ease-in-out infinite alternate;
  opacity: 0.4;
}

.mesh-c {
  width: 640px; height: 640px;
  top: 60vh; left: 30vw;
  background: radial-gradient(circle, var(--grad-c) 0%, transparent 60%);
  animation: drift-c 32s ease-in-out infinite alternate;
  opacity: 0.28;
}

@keyframes drift-a {
  0%   { transform: translate3d(0, 0, 0)         scale(1); }
  100% { transform: translate3d(120px, 80px, 0)  scale(1.15); }
}
@keyframes drift-b {
  0%   { transform: translate3d(0, 0, 0)            scale(1); }
  100% { transform: translate3d(-100px, 140px, 0)   scale(1.1); }
}
@keyframes drift-c {
  0%   { transform: translate3d(0, 0, 0)           scale(1); }
  100% { transform: translate3d(80px, -100px, 0)   scale(1.2); }
}

/* Subtle grid */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center top, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center top, black 30%, transparent 80%);
}

/* Grain — subtle SVG noise via data URI */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ============================
   LAYOUT
   ============================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

main, .nav, .footer { position: relative; z-index: 2; }

.section {
  padding: clamp(5rem, 10vh, 9rem) 0;
  position: relative;
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vh, 4rem);
  max-width: 720px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.label-num {
  color: var(--ink-muted);
  font-size: 0.7rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}

.section-title .muted {
  color: var(--ink-soft);
  font-weight: 400;
}

.muted { color: var(--ink-soft); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01" on, "cv11" on;
  letter-spacing: 0.02em;
}

/* ============================
   NAV
   ============================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem var(--gutter);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(7, 7, 10, 0.55);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.logo svg { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.02);
  color: var(--ink) !important;
}

.nav-cta .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse 2s ease-in-out infinite;
}

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

/* Mobile nav: keep all links reachable, scale gracefully */
@media (max-width: 720px) {
  .nav-inner { gap: 0.5rem; }
  .nav-links { gap: 0.125rem; }
  .nav-links a { padding: 0.45rem 0.6rem; font-size: 0.8rem; }
  .nav-cta { margin-left: 0.35rem; padding: 0.45rem 0.7rem; }
}

@media (max-width: 540px) {
  .nav-inner { gap: 0.25rem; }
  .nav-links { gap: 0; }
  .nav-links a:not(.nav-cta) { padding: 0.4rem 0.4rem; font-size: 0.72rem; letter-spacing: -0.01em; }
  .nav-cta { margin-left: 0.2rem; padding: 0.4rem 0.55rem; font-size: 0.78rem; }
  .nav-cta .dot { width: 5px; height: 5px; }
  .logo span { font-size: 0.92rem; }
  .logo svg { width: 20px; height: 20px; }
}

/* Tiny phones (≤400px): drop logo text, keep mark only — nav stays full */
@media (max-width: 400px) {
  .logo span { display: none; }
  .nav-links a:not(.nav-cta) { padding: 0.35rem 0.3rem; font-size: 0.7rem; }
  .nav-cta { padding: 0.4rem 0.5rem; }
  .nav-cta span:first-child { font-size: 0.72rem; }
}

/* ============================
   HERO
   ============================ */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem var(--gutter) 6rem;
  position: relative;
  z-index: 2;
}

/* Tablet portrait: trim hero so stats sit closer to fold, no awkward gap */
@media (min-width: 720px) and (max-width: 1080px) {
  .hero {
    min-height: 90vh;
    padding: 4rem var(--gutter) 3rem;
    justify-content: center;
  }
  .stat-row { margin-top: 2.5rem; }
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.02);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 0 12px var(--grad-a);
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.25rem, 11vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.display span { display: inline-block; }

.display-grad {
  background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 50%, var(--grad-c) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 0.15em;
}

.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.375rem);
  line-height: 1.45;
  max-width: 640px;
  color: var(--ink-soft);
  margin: 0 0 2.25rem;
  letter-spacing: -0.01em;
}

.lede-em {
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 4rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #e5e5ea 100%);
  color: #07070a;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 8px 24px -8px rgba(255,255,255,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 12px 32px -8px rgba(255,255,255,0.3); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  border-color: var(--line-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }

.btn-lg {
  padding: 0.95rem 1.4rem;
  font-size: 1rem;
}

/* Stat row */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  max-width: 760px;
}

.stat { min-width: 0; }

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 0.35rem;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  display: none;
}

@media (min-width: 640px) {
  .stat-divider { display: block; }
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ink-muted), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--ink), transparent 60%);
  animation: scroll-cue 2s ease-in-out infinite;
}
@keyframes scroll-cue {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@media (max-width: 768px) {
  .scroll-cue { display: none; }
}

/* ============================
   VENTURES
   ============================ */
.venture-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

.venture-card {
  position: relative;
  border-radius: 18px;
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease;
}

/* Gradient border via pseudo */
.venture-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(167,139,250,0.4), rgba(34,211,238,0.2) 50%, rgba(244,114,182,0.3) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}

.venture-card:hover { transform: translateY(-4px); }
.venture-card:hover::before { opacity: 1; }

.venture-card-inner {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  z-index: 1;
}

.venture-glow {
  position: absolute;
  top: -100px; right: -100px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--grad-a) 0%, transparent 65%);
  opacity: 0.18;
  filter: blur(40px);
  pointer-events: none;
}

.venture-glow-b {
  background: radial-gradient(circle, var(--grad-b) 0%, transparent 65%);
  opacity: 0.18;
}

.venture-head { margin-bottom: 1.5rem; }

.venture-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.125rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
}

.venture-since {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.venture-name {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 0.4rem;
  line-height: 1.05;
  color: var(--ink);
}

.venture-tag {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0;
  font-weight: 400;
}

.venture-body {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  max-width: 46ch;
}

.venture-tags {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.venture-tags li {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

.venture-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.venture-link:hover { border-color: var(--ink); }
.venture-link svg { transition: transform 0.2s var(--ease-out); }
.venture-link:hover svg { transform: translate(2px, -2px); }

/* ============================
   ABOUT
   ============================ */
.section-about { background: linear-gradient(180deg, transparent 0%, rgba(13,13,18,0.4) 50%, transparent 100%); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 880px) {
  .about-grid {
    grid-template-columns: 360px 1fr;
    gap: 4rem;
  }
}

.about-portrait {
  position: relative;
}

.portrait-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  aspect-ratio: 4 / 5;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(0.95);
}

.portrait-glow {
  position: absolute;
  bottom: -60px; left: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--grad-b) 0%, transparent 65%);
  opacity: 0.25;
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

.portrait-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.875rem;
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}

.about-body .section-title {
  margin-bottom: 2rem;
}

.prose p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
  max-width: 60ch;
  letter-spacing: -0.005em;
}

.prose p:last-child { margin-bottom: 0; }

/* ============================
   STACK
   ============================ */
.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

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

.stack-cell {
  background: var(--bg);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  position: relative;
  transition: background 0.3s ease;
}

.stack-cell:hover { background: rgba(255,255,255,0.025); }

.stack-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grad-b);
  margin: 0 0 0.875rem;
}

.stack-body {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

/* ============================
   CONTACT
   ============================ */
.section-contact { padding-bottom: 4rem; }

.contact-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20,20,28,0.6) 0%, rgba(13,13,18,0.7) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.75rem, 4vw, 3.5rem);
  overflow: hidden;
  text-align: left;
}

.contact-glow {
  position: absolute;
  top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse at center, var(--grad-a) 0%, transparent 65%);
  opacity: 0.25;
  filter: blur(60px);
  pointer-events: none;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 1.25rem;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-lede {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-weight: 400;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Mobile contact: prevent the long email button from overflowing the card */
@media (max-width: 540px) {
  .contact-actions { flex-direction: column; align-items: stretch; gap: 0.625rem; }
  .contact-actions .btn { width: 100%; justify-content: center; }
  .contact-actions .btn .mono { font-size: 0.85rem; }
}

@media (max-width: 380px) {
  .contact-actions .btn .mono { font-size: 0.78rem; }
  .btn-lg { padding: 0.85rem 1rem; }
}

/* Hero email pill: also shrink on tiny screens so it never breaks out */
@media (max-width: 380px) {
  .cta-row { flex-direction: column; align-items: stretch; gap: 0.625rem; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .cta-row .btn .mono { font-size: 0.8rem; }
}

/* ============================
   FOOTER
   ============================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
}

.footer-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-size: 0.65rem;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.02);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--ink); }
.footer-links span { color: var(--ink-muted); }

.footer-copy {
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  margin: 0;
}

/* ============================
   REVEAL ANIMATIONS — opacity-only, no CLS, no JS
   Default: visible. Animation only adds polish on entry.
   ============================ */
.fade-in {
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) both;
}
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.18s; }
.fade-in:nth-child(3) { animation-delay: 0.32s; }
.fade-in:nth-child(4) { animation-delay: 0.48s; }
.fade-in:nth-child(5) { animation-delay: 0.62s; }

.reveal-up { opacity: 1; }

/* Only enable scroll-driven reveal where supported (Chromium, modern). 
   Default state above keeps content visible everywhere. */
@supports (animation-timeline: scroll()) {
  .reveal-up {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-fade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================
   LINKS / FOCUS / SELECTION
   ============================ */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--grad-b);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: var(--grad-a);
  color: #07070a;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .mesh { animation: none; }
  .scroll-line::after { animation: none; }
}

/* ============================================================
   BY THE NUMBERS — large metrics grid
   ============================================================ */
.section-numbers {
  position: relative;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.metrics-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 0% 0%, rgba(167, 139, 250, 0.08), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(34, 211, 238, 0.06), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.metric {
  position: relative;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  background: rgba(10, 10, 14, 0.72);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 220px;
  transition: background 320ms ease;
}

.metric:hover {
  background: rgba(16, 16, 22, 0.88);
}

.metric::after {
  content: "";
  position: absolute;
  left: clamp(1.5rem, 2.5vw, 2.25rem);
  right: clamp(1.5rem, 2.5vw, 2.25rem);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(167, 139, 250, 0.35) 30%,
    rgba(34, 211, 238, 0.35) 70%,
    transparent);
  opacity: 0;
  transition: opacity 320ms ease;
}

.metric:hover::after {
  opacity: 1;
}

.metric-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.6vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #c6c6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Text variant for non-numeric featured stats (e.g. "In production") */
.metric-num-text {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem) !important;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.gradient-num {
  background: linear-gradient(135deg, #c4b5fd 0%, #67e8f9 45%, #f9a8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: saturate(1.15);
}

.metric-label {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0;
}

.metric-detail {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0.25rem 0 0;
  max-width: 32ch;
}

.metric-feature {
  background: linear-gradient(160deg,
    rgba(167, 139, 250, 0.10) 0%,
    rgba(34, 211, 238, 0.06) 50%,
    rgba(244, 114, 182, 0.08) 100%),
    rgba(10, 10, 14, 0.72);
}

.metric-feature:hover {
  background: linear-gradient(160deg,
    rgba(167, 139, 250, 0.14) 0%,
    rgba(34, 211, 238, 0.08) 50%,
    rgba(244, 114, 182, 0.10) 100%),
    rgba(16, 16, 22, 0.88);
}

@media (max-width: 1080px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .metric { min-height: auto; padding: 1.5rem 1.25rem; }
}

/* Live status tile — matches siblings structurally; adds pulsing live dot */
.metric-live-num {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: clamp(2rem, 3.4vw, 2.75rem) !important;
  letter-spacing: 0.04em !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  background: none !important;
}
.metric-live-num::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55);
  animation: live-pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  70%  { box-shadow: 0 0 0 0.6em rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .metric-live-num::before { animation: none; }
}

/* ============================================================
   STAT row & metric — additional treatments
   ============================================================ */
.stat-unit {
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  margin-left: 0.08em;
  vertical-align: 0.18em;
}

.metric-unit {
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.55);
  margin-left: 0.08em;
  vertical-align: 0.32em;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.55);
}

.mono-num {
  font-family: var(--font-mono, "JetBrains Mono", monospace) !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  font-size: clamp(2.2rem, 4vw, 3.25rem) !important;
}

/* Hero metric — spans 2 columns, larger numeric */
.metric-hero {
  grid-column: span 2;
  min-height: 280px;
  padding: clamp(2rem, 3.2vw, 2.75rem);
  background: linear-gradient(135deg,
    rgba(167, 139, 250, 0.14) 0%,
    rgba(34, 211, 238, 0.08) 45%,
    rgba(244, 114, 182, 0.10) 100%),
    rgba(10, 10, 14, 0.78);
}

.metric-hero:hover {
  background: linear-gradient(135deg,
    rgba(167, 139, 250, 0.20) 0%,
    rgba(34, 211, 238, 0.12) 45%,
    rgba(244, 114, 182, 0.14) 100%),
    rgba(16, 16, 22, 0.9);
}

.metric-hero .metric-num {
  font-size: clamp(4rem, 8.5vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.metric-hero .metric-label {
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

.metric-hero .metric-detail {
  font-size: 0.95rem;
  max-width: 48ch;
  margin-top: 0.5rem;
}

@media (max-width: 1080px) {
  .metric-hero { grid-column: span 2; min-height: 240px; }
  .metric-hero .metric-num { font-size: clamp(3.5rem, 12vw, 5.5rem); }
}

@media (max-width: 540px) {
  .metric-hero { grid-column: span 1; min-height: auto; padding: 1.75rem 1.25rem; }
  .metric-hero .metric-num { font-size: clamp(3rem, 14vw, 4rem); }
}
