/* ==========================================================================
   SAHIR VEERANCHERI — SOVEREIGN AI SYSTEMS ARCHITECT
   Design System: Noir & Crimson Op-Art (Red, Black, White)
   Inspired by Film Noir, Geometric Brutalism & Op-Art Hypnotic Vortex
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Color Palette - Noir & Crimson Obsidian */
  --bg-dark: #050505;
  --bg-surface: #0a0a0a;
  --bg-card: rgba(14, 14, 14, 0.78);
  --bg-card-hover: rgba(22, 22, 22, 0.90);

  /* Red Accent System */
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-red-glow: rgba(239, 68, 68, 0.22);
  --accent-red-dim: rgba(239, 68, 68, 0.10);
  --accent-red-border: rgba(239, 68, 68, 0.35);

  /* High Contrast Monochrome Base */
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-blur: 16px;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-main: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  --text-bright: #ffffff;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Reset & Global Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

::selection {
  background: var(--accent-red);
  color: #000;
}

/* Atmospheric Ambient Canvas */
#aurora-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.ambient-canvas-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   NAVIGATION DOCK
   ========================================================================== */
.dock-container {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.nav-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 18px;
  background: #000;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9999px;
  transition: border-color var(--transition-smooth);
}

.nav-dock:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-bright);
}

.brand-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--accent-red);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  border-radius: 4px;
  letter-spacing: -0.02em;
}

.brand-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

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

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 9999px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-item:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: var(--text-bright);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  font-weight: 600;
}

.dock-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--border-subtle);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-red);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* ==========================================================================
   BUTTONS & COMMON UI ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--accent-red);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--accent-red-glow);
}

.btn-primary:hover {
  background: #ff3333;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.45);
  transform: translateY(-2px);
  color: #000;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-bright);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 28px;
  transition: border-color var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(239, 68, 68, 0.08);
  transform: translateY(-2px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: min(100vh, 100svh);
  padding: 110px max(24px, calc((100vw - 1360px) / 2)) 42px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-dark);
}

.hero-section::before,
.hero-section::after { display: none; }

.hero-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-line { background: rgba(255,255,255,.018); }
.line-1 { left: 17%; top: 0; width: 1px; height: 100%; }
.line-2 { left: 50%; top: 0; width: 1px; height: 100%; background: rgba(255,255,255,.026); }
.line-3 { right: 17%; top: 0; width: 1px; height: 100%; }

.grid-crosshair,
.grid-coord,
.hero-giant-bg { display: none; }

/* One full-width standalone SVG wordmark row. */
.hero-wordmark-svg {
  grid-row: 1;
  position: relative;
  z-index: 1;
  width: 100%;
  line-height: 0;
  margin: 0 auto;
}

.hero-wordmark-svg svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero-wordmark-svg text {
  font-family: 'Bebas Neue', Impact, sans-serif;
  fill: rgba(201, 58, 58, .22);
  stroke: #c93a3a;
  stroke-width: 1.5;
  paint-order: stroke;
}

/* Desktop hero grid with equal side tracks around a fixed 380px portrait. */
.hero-stage-grid {
  grid-row: 2;
  position: relative;
  z-index: 2;
  width: min(1360px, 100%);
  margin: -3.6vw auto 0;
  min-height: min(560px, calc(100svh - 180px));
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 380px) minmax(300px, 1fr);
  grid-template-areas: 'left photo right';
  grid-template-rows: minmax(0, 1fr);
  column-gap: clamp(24px, 3vw, 56px);
  row-gap: 0;
  align-items: end;
}

.hero-flank {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 8px;
}

.left-flank { grid-area: left; }
.right-flank { grid-area: right; align-self: stretch; padding-right: 0; }

.hero-script {
  font: 600 clamp(32px, 3.4vw, 44px)/1 'Caveat', cursive;
  color: #fff;
  margin: 0 0 14px;
}

.hero-name {
  display: inline-block;
  width: fit-content;
  color: #fff;
  font: 400 clamp(56px, 6.4vw, 92px)/1 'Bebas Neue', sans-serif;
  margin: 0 0 22px;
  padding: .06em .16em;
  background: var(--accent-red);
}

.accent-red-dot { color: #fff; margin-left: .05em; }

.hero-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font: 700 13px/1.3 var(--font-mono);
  letter-spacing: .04em;
  margin: 0 0 28px;
}

.pill-dot { color: var(--accent-red); font-size: 13px; }

.hero-desc {
  max-width: 42ch;
  margin: 26px 0 30px;
  color: #c4c4cb;
  font-size: 16px;
  line-height: 1.65;
}

.hero-desc strong { color: #fff; font-weight: 700; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }

.btn-crimson,
.btn-glass {
  padding: 15px 20px;
  font: 700 13px/1 var(--font-mono);
  letter-spacing: .08em;
  border-radius: 0;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.hero-stat-box {
  min-height: 62px;
  padding: 12px;
}

.hero-stat-box:nth-child(n+2) {
  border-left: 1px solid rgba(255,255,255,.12);
}

.stat-val {
  color: #fff;
  font: 700 20px/1.1 var(--font-mono);
  letter-spacing: -.02em;
}

.hero-stat-box:nth-child(1) .stat-val { color: var(--accent-red); }
.stat-lbl { color: #a8a8b0; font: 500 13px/1.3 var(--font-mono); letter-spacing: .05em; }

/* Center portrait: exact centered track, deliberate panel frame, bottom fade. */
.hero-center-col {
  grid-area: photo;
  align-self: end;
  min-width: 0;
  display: grid;
  place-items: end center;
}

.hero-cutout-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: visible;
  background: linear-gradient(154deg, #050505 0%, #111111 58%, #050505 100%);
  opacity: 1;
}

.hero-cutout-wrap::before,
.hero-cutout-wrap::after { display: none; }

.hero-portrait-panel {
  position: absolute;
  inset: 18% 6% 0;
  z-index: 1;
  background: var(--accent-red);
  transform: translate(14px, -14px);
}

.hero-portrait-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.35);
  transform: translate(-14px, 14px);
}

.hero-cutout-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: bottom center;
  filter: brightness(1.12) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 99%);
  mask-image: linear-gradient(to bottom, black 78%, transparent 99%);
}

.cutout-status-badge {
  position: absolute;
  left: -8px;
  bottom: 14px;
  z-index: 5;
  padding: 7px 12px;
  background: #000;
  border: 1px solid var(--accent-red);
  color: #fff;
  font: 700 13px/1.2 var(--font-mono);
  letter-spacing: .05em;
}

.status-pulse-red { color: var(--accent-red); animation: pulseDot 2s ease-in-out infinite; }

/* HUD cards use readable body/label sizes. */
.right-flank .hud-stack {
  display: grid;
  gap: 12px;
}

.hud-card {
  padding: 20px 24px;
  background: #0f0f10;
  border: 1px solid rgba(255,255,255,.1);
}

.hud-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #fff;
}

.hud-idx {
  color: #fff;
  font: 700 13px/1 var(--font-mono);
}

.hud-tag {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.18);
  color: #c4c4cb;
  font: 700 13px/1 var(--font-mono);
  letter-spacing: .06em;
}

.hud-card-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.hud-card-desc {
  color: #c4c4cb;
  font-size: 15px;
  line-height: 1.55;
}

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

.hud-tech-tags .tech-tag {
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #c4c4cb;
  padding: 5px 12px;
  font: 500 13px/1 var(--font-mono);
  border-radius: 4px;
}

/* Responsive: stack hero tracks under 1000px. */
@media (max-width: 1000px) {
  .hero-stage-grid {
    grid-template-columns: 1fr;
    grid-template-areas: 'photo' 'left' 'right';
    gap: 28px;
    min-height: 0;
    margin-top: 0;
  }

  .hero-section { padding-top: 34px; }

  .hero-wordmark-svg { margin-bottom: 0; }

  .hero-center-col {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
  }

  .grid-coord { display: none; }
  .brand-label { display: none; }
}

@media (max-width: 480px) {
  .hero-section { padding: 34px 20px 28px; }

  .hero-wordmark-svg { width: 100%; }

  .hero-role-pill {
    width: 100%;
    justify-content: center;
  }

  .hero-actions { flex-direction: column; }

  .btn-crimson,
  .btn-glass { width: 100%; }

  .hero-stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .hero-stat-box { padding: 10px 6px; }
  .stat-val { font-size: 15px; }
  .stat-lbl { font-size: 13px; }

  .cutout-status-badge { max-width: calc(100% - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-build,
  .reveal-item {
    transition: none;
    transform: none;
  }
}

/* ==========================================================================
   COMMON SECTION HEADERS
   ========================================================================== */
.section {
  padding: 100px 24px;
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 48px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-red);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
}

/* ==========================================================================
   FLAGSHIP SHOWCASE
   ========================================================================== */
.flagship-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.highlighted-card {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.75) 0%, rgba(10, 10, 10, 0.90) 100%);
  position: relative;
}

.card-glow-red {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--accent-red-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.45;
}

.flagship-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.flagship-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.30);
}

.flagship-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.flagship-title {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.flagship-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.flagship-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.metric-pill {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-red);
}

.metric-desc {
  font-size: 11px;
  color: var(--text-dim);
}

/* 7-Layer Architecture Interactive Explorer */
.saai-architecture-explorer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.explorer-header {
  margin-bottom: 16px;
}

.explorer-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.explorer-sub {
  font-size: 12px;
  color: var(--text-dim);
}

.layer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.layer-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.layer-tab:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-bright);
  border-color: rgba(255, 255, 255, 0.25);
}

.layer-tab.active {
  background: var(--accent-red);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-red);
  box-shadow: 0 2px 10px var(--accent-red-glow);
}

.layer-inspector-pane {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  min-height: 140px;
}

.layer-inspect-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-red);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.layer-inspect-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.layer-inspect-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.tech-tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
}

/* Secondary Flagship Grid */
.flagship-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.subgrid-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.subgrid-top {
  margin-bottom: 20px;
}

.subgrid-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.subgrid-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.subgrid-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-item::before {
  content: '▪';
  color: var(--accent-red);
}

.subgrid-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   BENTO GRID PROJECTS
   ========================================================================== */
.bento-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-bright);
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-btn.active {
  background: var(--accent-red);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-red);
  box-shadow: 0 2px 10px var(--accent-red-glow);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.bento-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card.hidden {
  display: none !important;
}

.bento-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.category-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.30);
}

.bento-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.bento-link {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.bento-link:hover {
  color: var(--accent-red);
}

.bento-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.bento-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.bento-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ==========================================================================
   TECHNICAL STACK SECTION
   ========================================================================== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.stack-group-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-red);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

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

.tech-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.tech-pill:hover {
  border-color: var(--accent-red);
  color: #fff;
}

/* ==========================================================================
   ABOUT & PHILOSOPHY
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.about-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-text strong {
  color: var(--text-bright);
}

.quote-box {
  border-left: 3px solid var(--accent-red);
  padding-left: 18px;
  font-style: italic;
  color: var(--text-bright);
  margin-top: 24px;
}

.principles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.principle-item {
  display: flex;
  gap: 12px;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-red);
  min-width: 24px;
}

.principle-title {
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.principle-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-card {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.contact-glow-red {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-red-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.4;
}

.contact-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.contact-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
}

.email-action-box {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px 8px 18px;
  border-radius: 8px;
  margin-bottom: 32px;
}

.email-address {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
}

.social-links-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.social-pill:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-bright);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #000;
  color: #fff;
  border: 1px solid var(--accent-red);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  background: var(--accent-red);
  color: #000;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
/* Section divider — coordinate label | rule | index label.
   Base rule was missing, so the bar collapsed into one run-together string. */
.section-divider-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 15%, var(--border-subtle) 85%, transparent);
}

@media (max-width: 1040px) {
  .hero-section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .hero-stage-grid {
    grid-template-columns: 1fr;
    grid-template-areas: 'photo' 'left' 'right';
    gap: 24px;
    min-height: 0;
    margin-top: 0;
  }

  .hero-wordmark-svg { margin-bottom: 0; }

  .hero-center-col {
    grid-area: photo;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
  }

  .left-flank { grid-area: left; }
  .right-flank { grid-area: right; }

  .hero-script { font-size: 30px; }
  .hero-name { font-size: clamp(38px, 4.2vw, 52px); }
  .hero-desc { max-width: 56ch; }
  .hero-role-pill { font-size: 13px; }
  .btn-crimson, .btn-glass { padding: 14px 18px; font-size: 13px; }
  .hero-stats-row { margin-top: 26px; }
  .stat-val { font-size: 18px; }
  .stat-lbl { font-size: 13px; }
  .hero-cutout-wrap { width: min(100%, 380px); }
  .hud-card { padding: 18px 20px; }
  .hud-card-title { font-size: 18px; }
  .hud-card-desc { font-size: 15px; }
  .grid-coord { display: none; }
}

@media (max-width: 768px) {
  .dock-container {
    top: 12px;
    padding: 0 10px;
  }

  .nav-dock {
    gap: 10px;
    padding: 6px 12px;
  }

  .nav-links { display: none; }

  .hero-section { padding: 34px 18px 28px; }

  .hero-section::before,
  .hero-section::after,
  .grid-line.line-1,
  .grid-line.line-3,
  .grid-crosshair { display: none; }

  .hero-stage-grid { gap: 22px; }
  .left-flank,
  .right-flank { align-self: auto; }
  .hero-desc { max-width: 620px; }
  .hero-actions { width: 100%; }
  .hero-stats-row { width: 100%; margin-top: 24px; }
  .hero-cutout-wrap { width: min(100%, 390px); }
  .cutout-status-badge { left: 4%; bottom: 7%; }
  .hud-stack { gap: 10px; }
  .hud-card-title { font-size: 18px; }
  .hud-card-desc { font-size: 15px; }

  .section-divider-bar {
    padding-left: 18px;
    padding-right: 18px;
    font-size: 13px;
  }

  .section { padding: 60px 16px; }
  .flagship-subgrid,
  .bento-grid { grid-template-columns: 1fr; }

  .email-action-box {
    flex-direction: column;
    padding: 16px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-section { padding: 34px 15px 22px; }
  .hero-script { font-size: 27px; }
  .hero-name { font-size: 40px; }
  .hero-role-pill { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .btn-crimson, .btn-glass { width: 100%; }
  .hero-cutout-wrap { width: min(100%, 330px); }
  .cutout-status-badge {
    max-width: calc(100% - 16px);
    font-size: 13px;
  }
  .grid-coord { display: none; }
  .section-divider-bar { grid-template-columns: 1fr auto; }
  .divider-line { display: none; }
  .brand-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .status-pulse-red, .status-dot { animation: none; }
}

/* Temporary paint states preserve layout while each agent works. */
::highlight(swarm-unwritten) { color: transparent; text-shadow: none; }
.build-hide-text { color: transparent !important; }
.build-hide-media { visibility: hidden !important; }
.build-hide-box { background: none !important; border-color: transparent !important; box-shadow: none !important; backdrop-filter: none !important; }
.build-hide-box::before,.build-hide-box::after { opacity: 0 !important; }
.build-overlay { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; transition: opacity .32s ease; }
.build-exit { opacity: 0; }
.build-intro { position: absolute; inset: 0; display: grid; place-items: center; background: #080808; transition: opacity .5s; }
.build-intro img { width: 60px; height: 60px; object-fit: contain; filter: grayscale(1); opacity: .4; }
.build-running .build-intro { opacity: 0; }
.build-pointer,.build-frame { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.build-pointer { filter: drop-shadow(0 1px 2px #000a); }
.build-pointer[data-tool="text"] svg,.build-pointer[data-tool="box"] svg { display: none; }
.build-pointer[data-tool="text"] b::before { content: 'Ⅰ'; position: absolute; bottom: -2px; font: bold 22px/1 Georgia,serif; }
.build-pointer[data-tool="box"] b::before { content: '+'; position: absolute; left: -8px; top: -11px; font: bold 24px/1 monospace; }
.build-frame { border: 1px solid #359ff6; background: #398fe320; }
.build-frame[data-kind="text"] { background: transparent; }
.build-frame i { position: absolute; width: 5px; height: 5px; background: white; border: 1px solid #359ff6; }
.build-frame i:nth-child(1) { left: -3px; top: -3px; }
.build-frame i:nth-child(2) { right: -3px; top: -3px; }
.build-frame i:nth-child(3) { right: -3px; bottom: -3px; }
.build-frame i:nth-child(4) { left: -3px; bottom: -3px; }
.build-frame small { position: absolute; bottom: -17px; left: 50%; transform: translateX(-50%); background: #128fe5; border-radius: 2px; padding: 1px 3px; color: white; font: 600 10px/1.3 system-ui,sans-serif; white-space: nowrap; }
.build-ruler { position: absolute; opacity: 0; transition: opacity .2s; z-index: 2; }
.build-measuring .build-ruler { opacity: .65; }
.build-ruler.horizontal { inset: 0 0 auto; height: 8px; background: repeating-linear-gradient(90deg,#93a0b1 0 1px,transparent 1px 10px); }
.build-ruler.vertical { inset: 0 auto 0 0; width: 8px; background: repeating-linear-gradient(#93a0b1 0 1px,transparent 1px 10px); }
.build-hud { position: absolute; z-index: 3; bottom: max(16px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px 8px; max-width: calc(100% - 12px); border: 1px solid #393939; border-radius: 12px; background: #1d1d20f5; color: #eee; box-shadow: 0 3px 14px #0007; pointer-events: auto; font: 500 11px/1.3 system-ui,sans-serif; white-space: nowrap; }
.build-hud button { background: #323235; border: none; color: #eee; border-radius: 6px; padding: 5px 7px; font: inherit; cursor: pointer; }
.build-hud [data-tour][aria-pressed="true"] { background: #253746; color: #9ed1fb; }
.build-hud [data-live], .build-hud [data-sound] { background: #138ce6; color: white; }
.build-hud progress { width: 52px; height: 4px; accent-color: #319cff; }
.build-dots { display: flex; padding-left: 3px; }
.build-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #222; margin-left: -3px; }
.build-hud[hidden] { display: none; }
.build-ready [data-speed],.build-ready [data-tour] { display: none; }
@media(max-width:600px) {
  .build-dots,.build-hud progress { display: none; }
  .build-hud { gap: 3px; font-size: 10px; }
}
.build-frame[data-kind="duplicate"] { border-style: dashed; background: #459de22c; }
.build-frame[data-kind="duplicate"]::before, .build-frame[data-kind="duplicate"]::after { content: ''; position: absolute; opacity: .6; }
.build-frame[data-kind="duplicate"]::before { top: -1px; left: -100vw; width: 200vw; border-top: 1px dashed #70b9ee; }
.build-frame[data-kind="duplicate"]::after { left: -1px; top: -100vh; height: 200vh; border-left: 1px dashed #70b9ee; }
