/* Offstack — themes via html[data-theme] */
:root,
html[data-theme="dark-teal"] {
  color-scheme: dark;
  --bg: #050608;
  --surface: #0a0d14;
  --surface-2: #111622;
  --surface-3: #181f2e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f2f4f8;
  --muted: #8891a8;
  --accent: #5eead4;
  --accent-2: #8b9cff;
  --accent-3: #fbbf7a;
  --accent-dim: rgba(94, 234, 212, 0.14);
  --glow: rgba(94, 234, 212, 0.35);
  --btn-on-accent: #042f2e;
  --header-bg: rgba(5, 6, 8, 0.72);
  --nav-mobile-bg: rgba(10, 13, 20, 0.98);
  --backdrop: rgba(0, 0, 0, 0.55);
  --grid-line: rgba(255, 255, 255, 0.025);
  --orb-1: #1a4d47;
  --orb-2: #2a3566;
  --orb-3: #4a3520;
  --sheen: rgba(94, 234, 212, 0.04);
  --shadow-panel: rgba(0, 0, 0, 0.45);
  --shadow-card: rgba(0, 0, 0, 0.35);
  --ghost-bg: rgba(255, 255, 255, 0.03);
  --hover-tab: rgba(255, 255, 255, 0.03);
  --deploy-cloud-border: rgba(94, 234, 212, 0.25);
  --deploy-local-border: rgba(139, 156, 255, 0.35);
  --deploy-cloud-glow: rgba(94, 234, 212, 0.12);
  --deploy-local-glow: rgba(139, 156, 255, 0.15);
  --form-ring-1: rgba(94, 234, 212, 0.4);
  --form-ring-2: rgba(139, 156, 255, 0.3);
  --hero-radial-1: rgba(94, 234, 212, 0.08);
  --hero-radial-2: rgba(124, 156, 255, 0.05);
}

html[data-theme="dark-ember"] {
  color-scheme: dark;
  --bg: #0a0807;
  --surface: #12100e;
  --surface-2: #1a1613;
  --surface-3: #242019;
  --border: rgba(255, 220, 200, 0.09);
  --text: #faf3ed;
  --muted: #a89a8f;
  --accent: #fb923c;
  --accent-2: #f472b6;
  --accent-3: #fcd34d;
  --accent-dim: rgba(251, 146, 60, 0.16);
  --glow: rgba(251, 146, 60, 0.38);
  --btn-on-accent: #431407;
  --header-bg: rgba(10, 8, 7, 0.78);
  --nav-mobile-bg: rgba(18, 16, 14, 0.98);
  --backdrop: rgba(0, 0, 0, 0.58);
  --grid-line: rgba(255, 200, 150, 0.04);
  --orb-1: #5c2e12;
  --orb-2: #4a1942;
  --orb-3: #3d2a10;
  --sheen: rgba(251, 146, 60, 0.06);
  --shadow-panel: rgba(0, 0, 0, 0.5);
  --shadow-card: rgba(0, 0, 0, 0.4);
  --ghost-bg: rgba(255, 200, 150, 0.04);
  --hover-tab: rgba(255, 200, 150, 0.05);
  --deploy-cloud-border: rgba(251, 146, 60, 0.35);
  --deploy-local-border: rgba(244, 114, 182, 0.35);
  --deploy-cloud-glow: rgba(251, 146, 60, 0.14);
  --deploy-local-glow: rgba(244, 114, 182, 0.12);
  --form-ring-1: rgba(251, 146, 60, 0.45);
  --form-ring-2: rgba(244, 114, 182, 0.35);
  --hero-radial-1: rgba(251, 146, 60, 0.1);
  --hero-radial-2: rgba(244, 114, 182, 0.06);
}

html[data-theme="light-slate"] {
  color-scheme: light;
  --bg: #f0f3f8;
  --surface: #ffffff;
  --surface-2: #e8ecf4;
  --surface-3: #dce2ee;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #5b6478;
  --accent: #0d9488;
  --accent-2: #4f46e5;
  --accent-3: #d97706;
  --accent-dim: rgba(13, 148, 136, 0.12);
  --glow: rgba(13, 148, 136, 0.25);
  --btn-on-accent: #ffffff;
  --header-bg: rgba(240, 243, 248, 0.88);
  --nav-mobile-bg: rgba(255, 255, 255, 0.98);
  --backdrop: rgba(15, 23, 42, 0.35);
  --grid-line: rgba(15, 23, 42, 0.06);
  --orb-1: #99f6e4;
  --orb-2: #c7d2fe;
  --orb-3: #fde68a;
  --sheen: rgba(13, 148, 136, 0.06);
  --shadow-panel: rgba(15, 23, 42, 0.08);
  --shadow-card: rgba(15, 23, 42, 0.1);
  --ghost-bg: rgba(15, 23, 42, 0.04);
  --hover-tab: rgba(15, 23, 42, 0.04);
  --deploy-cloud-border: rgba(13, 148, 136, 0.35);
  --deploy-local-border: rgba(79, 70, 229, 0.35);
  --deploy-cloud-glow: rgba(13, 148, 136, 0.1);
  --deploy-local-glow: rgba(79, 70, 229, 0.08);
  --form-ring-1: rgba(13, 148, 136, 0.35);
  --form-ring-2: rgba(79, 70, 229, 0.25);
  --hero-radial-1: rgba(13, 148, 136, 0.12);
  --hero-radial-2: rgba(79, 70, 229, 0.08);
}

html[data-theme="light-sand"] {
  color-scheme: light;
  --bg: #faf6f0;
  --surface: #fffdf9;
  --surface-2: #f3ebe0;
  --surface-3: #e8ddd0;
  --border: rgba(68, 45, 32, 0.12);
  --text: #292018;
  --muted: #6b5c4f;
  --accent: #b45309;
  --accent-2: #0369a1;
  --accent-3: #15803d;
  --accent-dim: rgba(180, 83, 9, 0.12);
  --glow: rgba(180, 83, 9, 0.22);
  --btn-on-accent: #fffbeb;
  --header-bg: rgba(250, 246, 240, 0.9);
  --nav-mobile-bg: rgba(255, 253, 249, 0.98);
  --backdrop: rgba(41, 32, 24, 0.35);
  --grid-line: rgba(68, 45, 32, 0.06);
  --orb-1: #fcd34d;
  --orb-2: #7dd3fc;
  --orb-3: #fdba74;
  --sheen: rgba(180, 83, 9, 0.05);
  --shadow-panel: rgba(41, 32, 24, 0.08);
  --shadow-card: rgba(41, 32, 24, 0.1);
  --ghost-bg: rgba(68, 45, 32, 0.05);
  --hover-tab: rgba(68, 45, 32, 0.05);
  --deploy-cloud-border: rgba(180, 83, 9, 0.35);
  --deploy-local-border: rgba(3, 105, 161, 0.35);
  --deploy-cloud-glow: rgba(180, 83, 9, 0.1);
  --deploy-local-glow: rgba(3, 105, 161, 0.08);
  --form-ring-1: rgba(180, 83, 9, 0.35);
  --form-ring-2: rgba(3, 105, 161, 0.25);
  --hero-radial-1: rgba(180, 83, 9, 0.1);
  --hero-radial-2: rgba(3, 105, 161, 0.08);
}

:root {
  --radius: 8px;
  --radius-lg: 16px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1180px;
  --nav-h: 4.25rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .marquee-track, .orb, .scan-line { animation: none !important; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Ambient */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: -50%;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px;
  transform: rotate(-8deg);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 75%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-a { width: 420px; height: 420px; background: var(--orb-1); top: -120px; left: -80px; }
.orb-b { width: 380px; height: 380px; background: var(--orb-2); top: 40%; right: -120px; animation-delay: -6s; }
.orb-c { width: 280px; height: 280px; background: var(--orb-3); bottom: 10%; left: 30%; animation-delay: -12s; opacity: 0.35; }

@keyframes drift {
  to { transform: translate(40px, 30px) scale(1.08); }
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.2);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.logo {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-mark {
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow);
  animation: pulse-mark 2.5s ease-in-out infinite;
}
@keyframes pulse-mark {
  50% { opacity: 0.6; transform: scale(0.85); }
}
.logo span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.35s var(--ease-out);
}
.nav a:hover, .nav a.is-active { color: var(--text); text-decoration: none; }
.nav a:hover::after, .nav a.is-active::after { width: 100%; }

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  min-height: 44px;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Theme picker */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--ghost-bg);
}

.theme-picker-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: 0.15rem;
}

.theme-swatch {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.theme-swatch[data-theme="dark-teal"] {
  background: linear-gradient(145deg, #5eead4 35%, #0a0d14 65%);
}
.theme-swatch[data-theme="dark-ember"] {
  background: linear-gradient(145deg, #fb923c 35%, #1a1613 65%);
}
.theme-swatch[data-theme="light-slate"] {
  background: linear-gradient(145deg, #0d9488 30%, #f0f3f8 70%);
}
.theme-swatch[data-theme="light-sand"] {
  background: linear-gradient(145deg, #b45309 30%, #faf6f0 70%);
}

.theme-swatch:hover {
  transform: scale(1.08);
}
.theme-swatch[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
  transform: scale(1.1);
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 8vw, 5rem) 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.35rem, 5.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 1.25rem;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-top: 0.5rem;
}
.stat {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, filter 0.25s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: var(--btn-on-accent);
  box-shadow: 0 0 0 0 var(--glow);
}
.btn-primary:hover {
  box-shadow: 0 0 28px var(--glow);
  text-decoration: none;
  filter: brightness(1.06);
}
.btn-ghost {
  background: var(--ghost-bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

/* Terminal panel */
.term-panel {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  overflow: hidden;
  box-shadow:
    0 24px 48px var(--shadow-panel),
    inset 0 1px 0 var(--border);
}
.term-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, var(--sheen) 50%, transparent 60%);
  animation: sheen 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.term-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.term-body {
  padding: 1.1rem 1.15rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.65;
  min-height: 220px;
  color: var(--muted);
}
.term-line { margin: 0 0 0.35rem; opacity: 0; transform: translateY(6px); }
.term-line.visible { opacity: 1; transform: none; transition: opacity 0.4s, transform 0.4s var(--ease-out); }
.term-line .ok { color: var(--accent); }
.term-line .warn { color: var(--accent-3); }
.term-line .cmd { color: var(--accent-2); }

/* Sections */
section.block {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  position: relative;
}
section.block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--max));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  margin: 0 0 0.35rem;
}
section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* Services — tabbed showcase */
.service-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  min-height: 340px;
}
@media (max-width: 820px) {
  .service-shell { grid-template-columns: 1fr; }
}

.service-tabs {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}
@media (max-width: 820px) {
  .service-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.service-tab {
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  padding: 1rem 1.1rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 52px;
  transition: background 0.25s, color 0.25s, padding-left 0.25s var(--ease-out);
}
.service-tab:last-child { border-bottom: none; }
@media (max-width: 820px) {
  .service-tab { border-bottom: none; border-right: 1px solid var(--border); white-space: nowrap; }
}
.service-tab .tab-idx {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  opacity: 0.5;
}
.service-tab:hover { color: var(--text); background: var(--hover-tab); }
.service-tab.is-active {
  color: var(--text);
  background: var(--surface);
  padding-left: 1.35rem;
  box-shadow: inset 3px 0 0 var(--tab-accent, var(--accent));
}

.service-stage {
  padding: 2rem 2rem 2rem 1.75rem;
  position: relative;
  overflow: hidden;
}
.service-stage::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--tab-glow, var(--accent-dim)), transparent 70%);
  pointer-events: none;
}

.service-pane {
  display: none;
  animation: pane-in 0.45s var(--ease-out);
}
.service-pane.is-active { display: block; }
@keyframes pane-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

.service-pane h3 {
  font-size: 1.45rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.service-pane .pane-lead {
  color: var(--muted);
  max-width: 32rem;
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
}

.mini-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  margin-top: 1.25rem;
}
.flow-node {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-3);
  animation: node-pop 0.5s var(--ease-out) backwards;
}
.flow-node:nth-child(1) { animation-delay: 0.05s; }
.flow-node:nth-child(3) { animation-delay: 0.15s; }
.flow-node:nth-child(5) { animation-delay: 0.25s; }
.flow-arrow { color: var(--accent); opacity: 0.7; }
@keyframes node-pop {
  from { opacity: 0; transform: scale(0.92); }
}

.pane-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.pane-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
}

/* Deploy duel */
.deploy-duel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 720px) { .deploy-duel { grid-template-columns: 1fr; } }

.deploy-card {
  position: relative;
  padding: 2rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.3s;
}
.deploy-card:hover {
  transform: translateY(-4px);
  border-color: var(--deploy-cloud-border);
}
.deploy-card.local:hover { border-color: var(--deploy-local-border); }

.deploy-card .card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  background: linear-gradient(135deg, var(--deploy-cloud-glow), transparent 50%);
  pointer-events: none;
}
.deploy-card.local .card-glow {
  background: linear-gradient(135deg, var(--deploy-local-glow), transparent 50%);
}
.deploy-card:hover .card-glow { opacity: 1; }

.deploy-icon {
  font-family: var(--font-mono);
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.deploy-card h3 { margin: 0 0 1rem; font-size: 1.2rem; }
.deploy-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.deploy-card li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.deploy-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.deploy-bridge {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.deploy-bridge .bridge-line {
  flex: 1;
  max-width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: bridge-pulse 2.5s ease-in-out infinite;
}
@keyframes bridge-pulse {
  50% { opacity: 0.4; }
}

/* Stack marquee + filter */
.stack-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 44px;
  transition: all 0.25s;
}
.filter-btn.is-active, .filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.marquee-wrap {
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.marquee-track {
  display: flex;
  gap: 0.65rem;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee-track.reverse { animation-direction: reverse; animation-duration: 38s; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--shadow-card);
}
.chip.is-hidden { display: none; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

/* Projects — horizontal */
.projects-scroller {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.project-card {
  flex: 0 0 min(340px, 85vw);
  scroll-snap-align: start;
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px var(--shadow-card);
}
.project-card .scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  top: 0;
  opacity: 0;
  animation: scan 3s ease-in-out infinite;
}
.project-card:hover .scan-line { opacity: 1; }
@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.project-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.project-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.project-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.project-tags { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tags .chip { font-size: 0.68rem; padding: 0.35rem 0.6rem; }

/* About */
.about-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) 1.15fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 800px) { .about-layout { grid-template-columns: 1fr; } }

.about-card {
  padding: 2rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
@media (max-width: 800px) {
  .about-card { position: static; }
}

.about-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background:
    linear-gradient(135deg, var(--surface-3), var(--surface-2));
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent);
  box-shadow: 0 0 32px var(--accent-dim);
}
.about-name { font-size: 1.65rem; font-weight: 600; margin: 0 0 0.25rem; }
.about-role {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.88rem;
  margin: 0 0 1.5rem;
}

.about-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
}
.about-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.82rem;
}
.fact-label {
  font-family: var(--font-mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}
.fact-value {
  font-weight: 500;
  color: var(--text);
  text-align: right;
}

.about-copy > p { color: var(--muted); margin: 0 0 1rem; max-width: 62ch; }

.about-block {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.about-subhead {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.about-block-lead {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 58ch;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
@media (max-width: 560px) {
  .focus-grid { grid-template-columns: 1fr; }
}

.focus-card {
  position: relative;
  padding: 1.15rem 1.2rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s var(--ease-out);
}
.focus-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.focus-idx {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.focus-card h4 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1rem;
}
.focus-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.focus-tools {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.focus-tools span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.how-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.how-n {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
}
.how-steps li div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.how-steps strong {
  font-size: 0.95rem;
}
.how-steps li span {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.name-note {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent-2);
  background: var(--surface-2);
  font-size: 0.88rem;
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Contact */
.contact-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 800px) { .contact-shell { grid-template-columns: 1fr; } }

.form-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}
.form-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--form-ring-1), transparent, var(--form-ring-2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

form { display: flex; flex-direction: column; gap: 1.1rem; }
label {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
input, textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  min-height: 48px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-note {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.contact-channels { display: flex; flex-direction: column; gap: 1rem; }
.channel {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: border-color 0.25s, transform 0.25s;
}
.channel:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}
.channel strong { display: block; font-size: 0.82rem; margin-bottom: 0.35rem; }
.channel a, .channel span {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  z-index: 300;
  box-shadow: 0 12px 40px var(--shadow-card);
  transition: transform 0.4s var(--ease-out);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.site-footer {
  padding: 2.5rem 0 3.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-mono);
  text-align: center;
}

.scroll-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 0.75rem;
  opacity: 0.7;
}

/* ——— Mobile navigation ——— */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: var(--backdrop);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.nav-open {
  overflow: hidden;
  touch-action: none;
}
body.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ——— Responsive: tablet & phone ——— */
@media (max-width: 900px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-head .hero-lead {
    max-width: none !important;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 3.75rem;
  }

  body {
    font-size: 1rem;
  }

  .wrap {
    width: min(100% - 1.25rem, var(--max));
  }

  .header-inner {
    position: relative;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    left: 0;
    z-index: 160;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--nav-mobile-bg);
    border-bottom: 1px solid transparent;
    padding: 0 1rem;
    transition: max-height 0.4s var(--ease-out), padding 0.3s, border-color 0.3s;
  }
  body.nav-open .nav {
    max-height: min(85vh, 520px);
    padding: 0.75rem 1rem 1.25rem;
    border-bottom-color: var(--border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav a {
    font-size: 1rem;
    padding: 0.85rem 0.5rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }
  .nav a::after { display: none; }
  .nav a:last-of-type {
    border-bottom: none;
    margin-bottom: 0.5rem;
  }

  .nav .lang-toggle {
    align-self: flex-start;
    margin-top: 0.5rem;
  }
  .nav .lang-toggle button {
    min-height: 44px;
    min-width: 52px;
  }

  .nav .theme-picker {
    margin-top: 0.75rem;
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 0.75rem;
  }

  .hero {
    padding-top: 1.75rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.5rem);
    hyphens: auto;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1rem;
    width: 100%;
  }
  .stat {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 120px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .term-panel {
    margin-top: 0.5rem;
  }
  .term-body {
    min-height: 180px;
    font-size: 0.68rem;
  }

  section.block {
    padding: 2.75rem 0;
  }

  .service-shell {
    min-height: 0;
  }

  .service-tabs {
    flex-direction: column;
    overflow-x: visible;
    max-height: none;
  }
  .service-tab {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    white-space: normal;
    padding: 0.9rem 1rem;
  }
  .service-tab.is-active {
    padding-left: 1rem;
    box-shadow: inset 4px 0 0 var(--tab-accent, var(--accent));
  }

  .service-stage {
    padding: 1.35rem 1.1rem 1.5rem;
  }
  .service-pane h3 {
    font-size: 1.25rem;
  }

  .mini-flow {
    font-size: 0.62rem;
  }
  .flow-node {
    padding: 0.5rem 0.65rem;
  }

  .deploy-card {
    padding: 1.5rem 1.25rem;
  }
  .deploy-card:hover {
    transform: none;
  }

  .stack-controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    margin-right: -0.5rem;
    scrollbar-width: none;
  }
  .stack-controls::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    flex-shrink: 0;
  }

  .marquee-wrap:last-of-type {
    display: none;
  }
  .marquee-track {
    animation-duration: 55s;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .stack-grid .chip {
    font-size: 0.72rem;
    padding: 0.55rem 0.5rem;
    text-align: center;
    justify-content: center;
  }

  .project-card {
    flex: 0 0 min(300px, 88vw);
    padding: 1.35rem;
  }
  .project-card:hover {
    transform: none;
  }

  .projects-scroller {
    scroll-padding-left: 0.25rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .about-card {
    padding: 1.5rem;
  }

  .form-card {
    padding: 1.35rem 1.1rem;
  }

  .channel:hover {
    transform: none;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    transform: translateY(120%);
    text-align: center;
  }
  .toast.show {
    transform: translateY(0);
  }

  .site-footer {
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }

  .orb-a, .orb-b {
    opacity: 0.35;
    filter: blur(60px);
  }
  .orb-c {
    display: none;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    flex-direction: column;
  }
  .stat {
    flex: 1 1 100%;
  }
  .stack-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) and (pointer: coarse) {
  .chip:hover,
  .deploy-card:hover,
  .project-card:hover,
  .channel:hover {
    transform: none;
    box-shadow: none;
  }
  .btn-primary:hover {
    box-shadow: none;
  }
}

@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  .wrap {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}