/* =========================================================================
   Jhonattan Rivera — Liquid Glass Portfolio
   Tokens + base
   ========================================================================= */

:root {
  /* Surfaces */
  --bg: #f7f5ef;
  --bg-warm: #faf7ef;
  --ink: #0e0d0b;
  --ink-2: #2b2925;
  --ink-3: #5a564e;
  --ink-4: #8a857a;
  --line: rgba(14, 13, 11, 0.08);
  --line-strong: rgba(14, 13, 11, 0.14);

  /* Accent: yellow from logo */
  --accent: #f5c038;
  --accent-warm: #ecb02a;
  --accent-soft: #fde9a0;

  /* Mesh blobs (controllable from JS) */
  --blob-1: #ffd55e;   /* yellow */
  --blob-2: #f5d6c3;   /* peach */
  --blob-3: #d8cff2;   /* lavender */
  --blob-4: #c8e4d6;   /* mint */

  /* Liquid Glass — Apple-style: high transparency, deep blur, chromatic */
  --glass-blur: 40px;
  --glass-sat: 220%;
  --glass-bg: rgba(255, 255, 252, 0.22);
  --glass-bg-strong: rgba(255, 255, 252, 0.42);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 -1px 0 rgba(255, 255, 255, 0.22) inset,
    0 0 0 0.5px rgba(255, 255, 255, 0.4) inset,
    0 30px 70px -28px rgba(28, 24, 12, 0.22),
    0 10px 30px -14px rgba(28, 24, 12, 0.14);
  /* Cursor-tracked specular position (px from element top-left) */
  --gx: 50%;
  --gy: -20%;
  /* Section scroll progress (0 = far, 1 = centered) */
  --section-p: 1;

  /* Type */
  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-pill: 999px;
  --r-card: 28px;
  --r-chip: 14px;
  --r-sm: 12px;

  /* Spacing rhythm */
  --pad-x: clamp(20px, 5vw, 64px);
  --section-y: clamp(36px, 4vw, 56px);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  /* Mobile: lower blur + slightly higher opacity for perf + legibility */
  :root {
    --glass-blur: 24px;
    --glass-sat: 180%;
    --glass-bg: rgba(255, 255, 252, 0.32);
    --glass-bg-strong: rgba(255, 255, 252, 0.5);
  }
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--ink); }

/* =========================================================================
   Mesh gradient background — fixed, animated
   ========================================================================= */

.mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-warm);
  overflow: hidden;
  pointer-events: none;
}

.mesh::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(closest-side at 18% 20%, var(--blob-1) 0%, transparent 65%),
    radial-gradient(closest-side at 82% 12%, var(--blob-2) 0%, transparent 60%),
    radial-gradient(closest-side at 12% 82%, var(--blob-3) 0%, transparent 60%),
    radial-gradient(closest-side at 88% 78%, var(--blob-4) 0%, transparent 60%);
  filter: blur(60px) saturate(115%);
  opacity: 0.85;
  animation: meshDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}

.mesh::after {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(closest-side at 50% 50%, rgba(255, 220, 120, 0.35) 0%, transparent 55%),
    radial-gradient(closest-side at 30% 70%, rgba(220, 200, 250, 0.28) 0%, transparent 60%),
    radial-gradient(closest-side at 75% 35%, rgba(245, 200, 170, 0.32) 0%, transparent 55%);
  filter: blur(80px);
  opacity: 0.7;
  animation: meshDrift 36s ease-in-out infinite alternate-reverse;
  will-change: transform;
}

@keyframes meshDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(-3%, 2%, 0) scale(1.05); }
  66%  { transform: translate3d(3%, -2%, 0) scale(1.02); }
  100% { transform: translate3d(-2%, -3%, 0) scale(1.06); }
}

/* Subtle paper noise overlay on top of mesh */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/></svg>");
}

@media (prefers-reduced-motion: reduce) {
  .mesh::before, .mesh::after { animation: none; }
}

/* =========================================================================
   Liquid Glass primitives
   ========================================================================= */

.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}

/* Specular highlight border (top-left bright, bottom-right faint) */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.45) 28%,
    rgba(255, 255, 255, 0.05) 55%,
    rgba(255, 255, 255, 0.25) 78%,
    rgba(255, 255, 255, 0.55) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Cursor-tracked specular highlight + soft top reflection */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      circle 240px at var(--gx) var(--gy),
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.18) 28%,
      rgba(255, 255, 255, 0) 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0) 38%
    );
  filter: blur(2px);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.glass.solid {
  background: var(--glass-bg-strong);
}

.glass.flat::after { display: none; }

/* Glass content needs to sit above pseudo-elements */
.glass > * { position: relative; z-index: 3; }

/* Pill variant */
.glass-pill {
  border-radius: var(--r-pill);
}

/* =========================================================================
   Typography
   ========================================================================= */

.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 0.96;
  color: var(--ink);
  text-wrap: balance;
}

.display em {
  font-style: italic;
  font-feature-settings: "ss01";
}

.eyebrow {
  font-family: var(--f-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-weight: 500;
}

.lede {
  font-family: var(--f-display);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.body {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

.body-large {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* =========================================================================
   Layout
   ========================================================================= */

.shell {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.shell-narrow {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

section {
  position: relative;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

/* =========================================================================
   Nav
   ========================================================================= */

.nav-wrap {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--r-pill);
  --glass-bg: rgba(255, 255, 252, 0.48);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  margin-right: 4px;
}

.nav-logo img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.nav-logo-text {
  font-family: var(--f-display);
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.nav-logo-text em {
  font-style: italic;
  color: var(--ink-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: background 0.2s ease, color 0.2s ease;
}

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

.lang-toggle {
  display: flex;
  align-items: center;
  padding: 3px;
  background: rgba(14, 13, 11, 0.05);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-left: 4px;
}

.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  font: inherit;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cta:hover {
  background: #1a1815;
  transform: translateY(-1px);
}

.cta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.nav-burger {
  display: none;
}

@media (max-width: 1024px) {
  .nav-links, .lang-toggle { display: none; }
  .nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(14, 13, 11, 0.06);
    border: 0;
    cursor: pointer;
    margin-left: 4px;
  }
  .nav-burger svg { width: 18px; height: 18px; }
  .nav { padding: 6px 6px 6px 14px; }
}

/* Mobile menu sheet */
.mobile-sheet {
  position: fixed;
  top: 72px;
  left: 16px;
  right: 16px;
  z-index: 49;
  padding: 18px;
  border-radius: 24px;
  display: none;
  flex-direction: column;
  gap: 4px;
  --glass-bg: rgba(255, 255, 252, 0.7);
}

.mobile-sheet.open { display: flex; }

.mobile-sheet a {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 17px;
  color: var(--ink);
}
.mobile-sheet a:hover { background: rgba(255, 255, 255, 0.5); }

.mobile-sheet .lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.mobile-sheet .lang-row .lang-toggle { display: flex; margin: 0; }

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.hero-card {
  padding: clamp(32px, 4.5vw, 56px);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dd47a;
  box-shadow: 0 0 0 4px rgba(45, 212, 122, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(45, 212, 122, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(45, 212, 122, 0.08); }
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(48px, 9vw, 124px);
}

.hero h1 em {
  font-style: italic;
  display: block;
}

.hero-intro {
  max-width: 540px;
}

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

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.hero-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Avatar pane */
.hero-avatar-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 36px;
  overflow: hidden;
  padding: 18px;
}

.hero-avatar-wrap img {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  object-fit: cover;
  border-radius: 24px;
  background: linear-gradient(160deg, #fff 0%, #f5e8c8 100%);
}

.hero-floating-card {
  position: absolute;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 4;
  white-space: nowrap;
  --glass-bg: rgba(255, 255, 252, 0.7);
}

.hero-floating-card .label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 3px;
  white-space: nowrap;
}

.hero-floating-card .value {
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.hero-floating-card.tx {
  bottom: 28px;
  left: -14px;
  animation: floatA 6s ease-in-out infinite alternate;
}

.hero-floating-card.years {
  top: 28px;
  right: -14px;
  animation: floatB 7s ease-in-out infinite alternate;
}

@keyframes floatA {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(2px, -6px, 0); }
}
@keyframes floatB {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-2px, 6px, 0); }
}

.hero-floating-card .swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(245, 192, 56, 0.4);
  display: grid;
  place-items: center;
  color: var(--ink);
}

.hero-floating-card .swatch svg { width: 16px; height: 16px; }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--ink-3), transparent);
  animation: scrollCue 2s ease-in-out infinite;
}

@keyframes scrollCue {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-avatar-wrap { max-width: 360px; margin: 0 auto; aspect-ratio: 1 / 1; padding: 12px; }
  .hero h1 { font-size: clamp(48px, 11vw, 84px); margin-bottom: 16px; }
  .scroll-cue { display: none; }
  .hero { padding-top: 90px; min-height: auto; padding-bottom: 40px; }
  .hero-card { padding: 24px 22px; }
  .hero-meta { margin-bottom: 18px; }
  .lede { font-size: 17px; }
  .hero-intro { max-width: none; }
  .hero-tags { margin-top: 18px; gap: 6px; }
  .hero-tag { font-size: 10px; padding: 5px 10px 5px 8px; }
}

@media (max-width: 720px) {
  .hero h1 { font-size: clamp(44px, 13vw, 64px); line-height: 0.98; }
  .hero-floating-card { padding: 8px 12px; gap: 8px; }
  .hero-floating-card .value { font-size: 16px; }
  .hero-floating-card .swatch { width: 22px; height: 22px; border-radius: 6px; }
  .hero-floating-card .swatch svg { width: 12px; height: 12px; }
}

/* =========================================================================
   Foundation
   ========================================================================= */

.foundation {
  text-align: center;
}

.foundation .eyebrow { display: inline-flex; margin-bottom: 24px; }

.foundation h2 {
  margin: 0 0 28px;
  font-size: clamp(40px, 6vw, 76px);
}

.foundation .lede {
  margin: 0 auto 56px;
  max-width: 760px;
}

.foundation-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 22px;
  border-radius: 28px;
  max-width: 720px;
  margin: 0 auto;
}

.foundation-logos-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.foundation-logos-row a {
  --prox: 0;
  display: block;
  transform: translateY(calc(var(--prox) * -8px)) scale(calc(1 + var(--prox) * 0.22));
  transform-origin: bottom center;
  transition: transform 0.22s cubic-bezier(.2,.7,.2,1);
}

.foundation-logos img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  filter: saturate(calc(0.92 + var(--prox, 0) * 0.3));
  transition: filter 0.22s ease;
  flex-shrink: 0;
}

.foundation-logos-row a:hover { --prox: 1; }

.foundation-logos .logo-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .foundation-logos {
    flex-direction: column;
    gap: 16px;
    padding: 20px 14px;
  }
  .foundation-logos-row {
    gap: 10px;
    width: 100%;
    justify-content: space-around;
  }
  .foundation-logos img {
    width: clamp(46px, 13vw, 58px);
    height: clamp(46px, 13vw, 58px);
  }
}

/* =========================================================================
   Capabilities
   ========================================================================= */

.capabilities .section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
}

.capabilities .section-head .eyebrow { display: inline-flex; margin-bottom: 20px; }

.capabilities h2 {
  margin: 0 0 24px;
  font-size: clamp(40px, 6vw, 76px);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cap-card {
  --prox: 0;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 380px;
  transform: translateY(calc(var(--prox) * -4px)) scale(calc(1 + var(--prox) * 0.012));
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
}

.cap-card:hover { --prox: 1; }

.cap-num {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cap-num .n {
  font-family: var(--f-display);
  font-size: 44px;
  line-height: 1;
  font-style: italic;
  color: var(--accent-warm);
}

.cap-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--ink);
}

.cap-icon svg { width: 18px; height: 18px; }

.cap-card h3 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 30px;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.cap-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.55;
}

.cap-card .ribbon {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cap-card .ribbon::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-3);
}

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

/* =========================================================================
   Stack
   ========================================================================= */

.stack .section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.stack .section-head .eyebrow { display: inline-flex; margin-bottom: 20px; }

.stack h2 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5vw, 64px);
}

/* ---- Payment transaction flow ---- */
.payment-flow {
  padding: 20px 18px 22px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.payment-flow-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.payment-flow-label::before,
.payment-flow-label::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 80px;
  background: var(--line);
}

.flow-track {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Top/right padding leaves room for pin badges (top: -22px, right: -14px) */
  padding: 32px 22px 8px 8px;
  scrollbar-width: none;
}

.flow-track::-webkit-scrollbar { display: none; }

.flow-node {
  flex: 1;
  min-width: 140px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), background 0.25s ease;
  position: relative;
}

.flow-node:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.62);
}

.flow-node .flow-num {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-4);
}

.flow-node .flow-name {
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}

.flow-node .flow-role {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  line-height: 1.4;
}

.flow-arrow {
  align-self: center;
  color: var(--ink-4);
  flex-shrink: 0;
  width: 18px;
  display: grid;
  place-items: center;
}

.flow-arrow svg { width: 18px; height: 18px; }

/* ---- "I worked here" pin badges on flow nodes ---- */
.flow-pin {
  position: absolute;
  top: -22px;
  right: -14px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 11px 8px;
  background: linear-gradient(140deg, #ffd960 0%, #f5c038 70%, #ecb02a 100%);
  color: var(--ink);
  font-family: var(--f-mono);
  border-radius: 8px 10px 7px 9px;
  transform: rotate(7deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 -1px 0 rgba(0, 0, 0, 0.05) inset,
    -2px 6px 14px -4px rgba(28, 24, 12, 0.28),
    0 14px 24px -10px rgba(28, 24, 12, 0.22);
  transform-origin: 80% 100%;
  animation: pin-sway 5s ease-in-out infinite alternate;
  pointer-events: none;
}

.flow-pin::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

.flow-pin .pin-label {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-left: 12px;
}

.flow-pin .pin-co {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

/* Per-pin tilt variation */
.flow-pin.tilt-left  { transform: rotate(-7deg); animation-delay: 0.6s; }
.flow-pin.tilt-right { transform: rotate(6deg); animation-delay: 1.1s; }
.flow-pin.tilt-back  { transform: rotate(4deg); animation-delay: 0.3s; }

@keyframes pin-sway {
  0%   { translate: 0 0; }
  50%  { translate: 0 -2px; }
  100% { translate: 0 0; }
}

@media (max-width: 720px) {
  .flow-pin {
    top: -16px;
    right: -8px;
    padding: 5px 9px 6px;
  }
  .flow-pin.tilt-left  { transform: rotate(-5deg); }
  .flow-pin.tilt-right { transform: rotate(5deg); }
  .flow-pin.tilt-back  { transform: rotate(3deg); }
  .flow-pin::before { top: 5px; left: 6px; width: 5px; height: 5px; }
  .flow-pin .pin-label { font-size: 7.5px; margin-left: 9px; }
  .flow-pin .pin-co { font-size: 10px; }
}

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

/* ---- Stack groups (hero-style: paragraph + tags) ---- */
.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stack-group {
  padding: 32px 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stack-group .g-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.stack-group .g-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Serif lede — sells what I do in this area */
.stack-group .g-copy {
  font-family: var(--f-display);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.4;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: pretty;
}

.stack-group .g-copy em {
  font-style: italic;
  color: var(--ink);
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: translateY(-1px);
}

.chip .chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
}

.chip.accent .chip-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

@media (max-width: 720px) {
  .stack-groups { grid-template-columns: 1fr; }
  .stack-group { padding: 24px 22px 22px; gap: 14px; }
  .payment-flow { padding: 20px 16px; }
  .flow-node { min-width: 160px; padding: 14px 12px; }
  .flow-node .flow-name { font-size: 19px; }
  .flow-arrow { display: none; }
}

/* =========================================================================
   Contact
   ========================================================================= */

.contact .section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.contact .section-head .eyebrow { display: inline-flex; margin-bottom: 20px; }

.contact h2 {
  margin: 0 0 24px;
  font-size: clamp(40px, 6vw, 76px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.contact-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
}

.contact-card:hover { transform: translateY(-4px); }

.contact-card .c-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  color: var(--ink);
}

.contact-card .c-icon svg { width: 20px; height: 20px; }

.contact-card h3 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.contact-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.contact-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  align-self: flex-start;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
  background: var(--ink);
  color: #fff;
}

.contact-link:hover .arrow { transform: translate(2px, -2px); }

.contact-link .arrow {
  transition: transform 0.2s ease;
  display: inline-block;
}

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Footer
   ========================================================================= */

footer.site-footer {
  padding: 40px var(--pad-x) 32px;
  border-top: 1px solid var(--line);
  max-width: 1320px;
  margin: 24px auto 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo img { width: 36px; height: 36px; border-radius: 50%; }

.footer-logo-text {
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.footer-links a:hover { color: var(--ink); }

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  transition: background 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

.footer-social svg { width: 16px; height: 16px; }

.copyright {
  margin-top: 28px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-4);
}

@media (max-width: 720px) {
  .footer-row { flex-direction: column; gap: 18px; text-align: center; }
  .footer-row > * { justify-content: center; }
  .footer-logo, .footer-social { display: flex; }
}

/* =========================================================================
   Scroll reveal
   ========================================================================= */

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.9s cubic-bezier(.2, .7, .2, 1),
    transform 0.9s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Hero parallax wrapper (set via JS) */
.hero-card-wrap, .hero-avatar-stage {
  will-change: transform, opacity, filter;
}

/* =========================================================================
   Tweaks panel
   ========================================================================= */

.tweaks-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 12px;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  --glass-bg: rgba(255, 255, 252, 0.7);
}

.tweaks-toggle.visible { display: inline-flex; }

.tweaks-toggle .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.tweaks-panel {
  position: fixed;
  bottom: 80px;
  right: 22px;
  z-index: 60;
  width: 300px;
  padding: 18px;
  border-radius: 22px;
  display: none;
  flex-direction: column;
  gap: 18px;
  --glass-bg: rgba(255, 255, 252, 0.78);
}

.tweaks-panel.open { display: flex; }

.tweaks-panel h4 {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tweaks-panel h4 button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
}

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

.tweak-row .label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tweak-row .label span {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-4);
}

.tweak-row input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
}

.swatches {
  display: flex;
  gap: 8px;
}

.swatch {
  flex: 1;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.swatch[aria-pressed="true"] {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, transparent 60%);
}

.toggle {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle[aria-pressed="true"] { background: var(--ink); }

.toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle[aria-pressed="true"]::before { transform: translateX(16px); }

@media (max-width: 720px) {
  .tweaks-panel { left: 16px; right: 16px; width: auto; }
}

/* =========================================================================
   Scroll-driven section blur/fade (Apple Liquid Glass focus shift)
   JS updates --section-p (0 = far from center, 1 = centered) per section.
   ========================================================================= */

.scroll-stage {
  --section-p: 1;
  /* p = section-p ∈ [0, 1]. blur grows as p shrinks. */
  transform: scale(calc(0.97 + var(--section-p) * 0.03));
  filter: blur(calc((1 - var(--section-p)) * 5px));
  opacity: calc(0.35 + var(--section-p) * 0.65);
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1),
              filter 0.4s cubic-bezier(.2,.7,.2,1),
              opacity 0.4s cubic-bezier(.2,.7,.2,1);
  will-change: transform, filter, opacity;
}

@media (max-width: 720px) {
  /* Mobile: lighter effect, no blur (cheap, avoids jank on Android) */
  .scroll-stage {
    transform: scale(calc(0.985 + var(--section-p) * 0.015));
    filter: none;
    opacity: calc(0.6 + var(--section-p) * 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-stage {
    transform: none;
    filter: none;
    opacity: 1;
    transition: none;
  }
}
