/* ==========================================================================
   BẮP CÔNG NGHỆ (bapcongnghe.com) — Cyber-Obsidian Design System
   Crafted with precision, high-FPS motion, and dynamic theme tokens.
   ========================================================================== */

:root {
  --bg-primary: #050811;
  --bg-secondary: #0a0f1e;
  --bg-elevated: rgba(13, 19, 36, 0.72);
  --bg-card: rgba(15, 22, 41, 0.58);
  --bg-card-hover: rgba(20, 30, 56, 0.78);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Dynamic Engine Variables (live-editable from Tech Lab!) */
  --accent-h: 187;
  --accent-s: 100%;
  --accent-l: 50%;
  --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-soft: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.14);
  --accent-glow: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.35);
  --accent-2: #6366f1;
  --accent-3: #10b981;
  --glass-blur: 18px;
  --glow-strength: 1;
  --grid-opacity: 0.22;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Be Vietnam Pro', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.65);
  --transition-fast: 180ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f4f7fb;
  --bg-secondary: #eaf0f8;
  --bg-elevated: rgba(255, 255, 255, 0.84);
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-hover: rgba(255, 255, 255, 0.96);
  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.2);
  --text-primary: #0b1120;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-card: 0 20px 45px -20px rgba(15, 23, 42, 0.14);
  --accent-l: 42%;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Background 3D Canvas & Ambient Layers */
#neural-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.ambient-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 18% 12%, hsla(var(--accent-h), var(--accent-s), var(--accent-l), calc(0.14 * var(--glow-strength))), transparent 65%),
    radial-gradient(50% 45% at 85% 20%, rgba(99, 102, 241, calc(0.16 * var(--glow-strength))), transparent 65%),
    radial-gradient(45% 40% at 50% 85%, rgba(16, 185, 129, calc(0.09 * var(--glow-strength))), transparent 70%);
}

.cyber-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grid-opacity);
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 35%, transparent 100%);
}

.page-wrapper {
  position: relative;
  z-index: 2;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   TOP LIVE TELEMETRY STRIP & NAVBAR
   ========================================================================== */
.telemetry-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 8, 17, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

[data-theme="light"] .telemetry-bar {
  background: rgba(244, 247, 251, 0.9);
}

.telemetry-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 24px;
  max-width: 1240px;
  margin: 0 auto;
  overflow-x: auto;
  white-space: nowrap;
}

.telemetry-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.telemetry-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

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

.navbar {
  position: sticky;
  top: 30px;
  z-index: 55;
  padding: 14px 0;
  transition: var(--transition-smooth);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-elevated);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 8px 12px 8px 18px;
  box-shadow: var(--shadow-card);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: #040710;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 0 20px var(--accent-glow);
  position: relative;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0.35;
  filter: blur(6px);
  z-index: -1;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  display: block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cmd-trigger:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.84rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #030712;
  font-weight: 700;
  box-shadow: 0 10px 30px -8px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -6px var(--accent-glow);
  filter: brightness(1.06);
}

.btn-glass {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-strong);
  backdrop-filter: blur(12px);
}

.btn-glass:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: rgba(148, 163, 184, 0.08);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 64px 0 88px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 44px;
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.32);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.eyebrow-tag {
  background: var(--accent);
  color: #040710;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 4.8vw, 4.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--accent) 0%, #818cf8 48%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 30px;
  line-height: 1.75;
}

.hero-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
}

.hero-cta-row .btn {
  padding: 11px 18px;
  font-size: 0.88rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 560px;
}

.metric-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  backdrop-filter: blur(var(--glass-blur));
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-value span {
  color: var(--accent);
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Hero Right: Interactive Holographic Showcase Console */
.hero-console {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(16, 24, 48, 0.88), rgba(7, 11, 23, 0.92));
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.8), 0 0 50px -15px var(--accent-glow);
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
  transform-style: preserve-3d;
  transition: transform 250ms ease;
}

[data-theme="light"] .hero-console {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(236, 243, 255, 0.94));
  box-shadow: 0 28px 70px -20px rgba(15, 23, 42, 0.2);
}

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.window-dots span:nth-child(1) { background: #ef4444; }
.window-dots span:nth-child(2) { background: #f59e0b; }
.window-dots span:nth-child(3) { background: #10b981; }

.console-url {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.09);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.console-body {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.console-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.architect-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-hex {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: #030712;
  font-size: 1.05rem;
}

.architect-name {
  font-weight: 700;
  font-size: 0.94rem;
}

.architect-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.console-code-box {
  background: rgba(2, 6, 16, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.65;
  color: #cbd5e1;
  white-space: pre;
  overflow-x: auto;
}

[data-theme="light"] .console-code-box {
  background: #0f172a;
  color: #e2e8f0;
}

.tk-kw { color: #c084fc; }
.tk-fn { color: #38bdf8; }
.tk-str { color: #34d399; }
.tk-num { color: #fbbf24; }
.tk-cm { color: #64748b; }

.console-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.score-ring-card {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}

.score-ring {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: conic-gradient(#10b981 0deg 356deg, rgba(16, 185, 129, 0.16) 356deg);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: #34d399;
  position: relative;
}

.score-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--bg-secondary);
}

.score-ring span {
  position: relative;
  z-index: 1;
}

.score-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.console-live-graph {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
}

.live-graph-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.sparkline-svg {
  width: 100%;
  height: 46px;
  display: block;
}

/* ==========================================================================
   TECH MARQUEE
   ========================================================================== */
.marquee-section {
  padding: 20px 0 40px;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.02);
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
}

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

/* ==========================================================================
   SECTIONS & HEADINGS
   ========================================================================== */
.section {
  padding: 88px 0;
  position: relative;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 42px;
}

.section-header.centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 620px;
  font-size: 1rem;
  margin-top: 10px;
}

/* Spotlight Glass Card */
.spotlight-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: border-color var(--transition-fast), transform var(--transition-smooth), box-shadow var(--transition-smooth);
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    hsla(var(--accent-h), var(--accent-s), var(--accent-l), calc(0.14 * var(--glow-strength))),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
  z-index: 0;
}

.spotlight-card:hover::before { opacity: 1; }
.spotlight-card:hover {
  border-color: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.42);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   TEMPLATE SHOWCASE
   ========================================================================== */
.showcase-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #030712;
  font-weight: 700;
  border-color: transparent;
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-box svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.template-card {
  display: flex;
  flex-direction: column;
}

/* Miniature Live-Rendered Browser Preview Thumbnail */
.template-thumb {
  position: relative;
  height: 224px;
  background: #060913;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.thumb-browser {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b1020;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  transition: transform var(--transition-smooth);
}

.template-card:hover .thumb-browser {
  transform: translateY(-4px) scale(1.018);
}

.thumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.thumb-dots {
  display: flex;
  gap: 4px;
}
.thumb-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
  background: rgba(255, 255, 255, 0.25);
}
.thumb-dots i:nth-child(1) { background: #f87171; }
.thumb-dots i:nth-child(2) { background: #fbbf24; }
.thumb-dots i:nth-child(3) { background: #34d399; }

.thumb-url {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #94a3b8;
}

.thumb-stage {
  flex: 1;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.thumb-overlay-actions {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 17, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.template-card:hover .thumb-overlay-actions {
  opacity: 1;
}

.template-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.cat-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.25);
}

.star-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.star-btn:hover,
.star-btn.starred {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.template-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.template-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.mini-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.09);
  padding: 3px 8px;
  border-radius: 6px;
}

.template-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.score-pill {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   BENTO ARCHITECTURE & CAPABILITIES
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

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

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }

.bento-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.3);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.bento-card h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.bento-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.architecture-diagram {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.arch-node {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.arch-node strong {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 3px;
}

/* ==========================================================================
   TECH LAB: INTERACTIVE UI ENGINE + TERMINAL
   ========================================================================== */
.lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.lab-panel {
  padding: 28px;
}

.lab-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lab-panel-title h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.preset-btn:hover,
.preset-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.slider-group {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.slider-row label span {
  font-family: var(--font-mono);
  color: var(--accent);
}

input[type="range"] {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.22);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 14px var(--accent-glow);
  border: 2px solid #050811;
}

.token-preview {
  background: rgba(2, 6, 16, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 16px;
  white-space: pre;
  overflow-x: auto;
}

[data-theme="light"] .token-preview {
  background: #0f172a;
  color: #cbd5e1;
}

/* Interactive Terminal */
.terminal-shell {
  background: #040711;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 410px;
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
}

.terminal-output {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: #e2e8f0;
}

.term-line { margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.term-cmd { color: var(--accent); font-weight: 600; }
.term-ok { color: #34d399; }
.term-warn { color: #fbbf24; }
.term-muted { color: #64748b; }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.term-prompt {
  color: #34d399;
  font-weight: 600;
  white-space: nowrap;
}

.terminal-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
}

.quick-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.quick-cmd-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.07);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-cmd-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ==========================================================================
   SMART PROJECT ESTIMATOR
   ========================================================================== */
.estimator-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
}

.estimator-card {
  padding: 30px;
}

.est-step {
  margin-bottom: 24px;
}

.est-step:last-child { margin-bottom: 0; }

.est-step-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.est-chip {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-primary);
  font-size: 0.87rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.est-chip:hover {
  border-color: var(--border-strong);
}

.est-chip.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.summary-box {
  padding: 28px;
  position: sticky;
  top: 110px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(8, 13, 28, 0.92));
}

[data-theme="light"] .summary-box {
  background: linear-gradient(160deg, #ffffff, #edf4ff);
}

.est-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  margin: 8px 0 4px;
  background: linear-gradient(120deg, var(--accent), #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.est-timeline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #34d399;
  margin-bottom: 18px;
}

.est-stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 22px;
}

/* ==========================================================================
   PROCESS TIMELINE & CONTACT
   ========================================================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.process-card {
  padding: 24px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
}

.process-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.process-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

.contact-info-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.contact-form-card {
  padding: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-field.full { grid-column: span 2; }

.form-field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-field select option {
  background: #0b1120;
  color: #f8fafc;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-result {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  display: none;
}

.form-result.success {
  display: block;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
}

.form-result.error {
  display: block;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #f87171;
}

/* ==========================================================================
   MODALS: LIVE PREVIEW STUDIO & COMMAND PALETTE
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 180ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Live Preview Studio */
.preview-modal {
  width: 100%;
  max-width: 1180px;
  height: min(88vh, 820px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.85);
}

.preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.viewport-switcher {
  display: inline-flex;
  background: rgba(148, 163, 184, 0.1);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.vp-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.vp-btn.active {
  background: var(--accent);
  color: #030712;
  font-weight: 700;
}

.preview-canvas-wrap {
  flex: 1;
  overflow: auto;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12), transparent 60%), #050811;
}

.preview-device-frame {
  width: 100%;
  min-height: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #080d1a;
  overflow: hidden;
  transition: width 320ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.preview-device-frame.vp-tablet { width: 768px; max-width: 100%; }
.preview-device-frame.vp-mobile { width: 390px; max-width: 100%; }

/* Command Palette */
.cmd-modal {
  width: 100%;
  max-width: 600px;
  background: #0b1122;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .cmd-modal {
  background: #ffffff;
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
}

.cmd-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease;
}

.cmd-item:hover,
.cmd-item.selected {
  background: var(--accent-soft);
  color: var(--accent);
}

.cmd-item-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(11, 17, 34, 0.94);
  border: 1px solid var(--accent);
  color: #f8fafc;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.88rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 46px 0 36px;
  margin-top: 40px;
  background: rgba(5, 8, 17, 0.45);
}

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

.footer-copy {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1), transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   BRAND LOGO, REAL PROJECTS, APP & GAME, BRAND KIT
   ========================================================================== */
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.proj-card {
  display: flex;
  flex-direction: column;
}

.proj-shot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #060913;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.proj-bar {
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  background: rgba(10, 15, 30, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

.proj-bar .thumb-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

.live-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #34d399;
  flex-shrink: 0;
}

.proj-shot-media {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #050811;
}

.proj-shot-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform var(--transition-smooth);
}

.proj-card:hover .proj-shot-media img {
  transform: scale(1.04);
}

.proj-card:hover .thumb-overlay-actions {
  opacity: 1;
}

.proj-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.proj-stats div {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 9px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proj-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.proj-stats span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.25;
}

/* Game & Mobile App Demo */
.game-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.game-hud-item {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.game-hud-item b {
  color: var(--text-primary);
  font-size: 0.9rem;
}

#game-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  display: block;
  touch-action: none;
  background: #050811;
}

.game-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.game-touch-pad {
  display: flex;
  gap: 8px;
}

.touch-key {
  min-width: 54px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: var(--transition-fast);
}

.touch-key:active {
  background: var(--accent);
  color: #030712;
  transform: scale(0.95);
}

/* iPhone Simulator */
.phone {
  width: 280px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 38px;
  border: 6px solid #1e293b;
  background: linear-gradient(180deg, #090f1f, #050811);
  padding: 12px 14px 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 42px -12px var(--accent-glow);
  position: relative;
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 10px;
  padding: 0 4px;
}

.phone-notch {
  width: 78px;
  height: 16px;
  border-radius: 99px;
  background: #02040a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-screen {
  min-height: 315px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #f8fafc;
}

.ps-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ps-card {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ps-card b {
  display: block;
  font-size: 0.98rem;
  color: #f8fafc;
}

.ps-card small {
  display: block;
  color: #94a3b8;
  font-size: 0.74rem;
  line-height: 1.35;
}

.ps-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ps-bars {
  height: 132px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 10px 6px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
}

.ps-bars i {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent), rgba(99, 102, 241, 0.35));
}

.ps-chat-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 14px 14px 14px 4px;
  background: rgba(148, 163, 184, 0.15);
  font-size: 0.79rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.ps-msg.me {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #030712;
  font-weight: 600;
}

.phone-dock {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.phone-dock button {
  padding: 7px 4px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.phone-dock button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Brand Kit / Media Showcase */
.brandkit-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 20px;
}

.brandkit-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brandkit-preview {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #050811;
}

.brandkit-preview img {
  width: 100%;
  height: auto;
  display: block;
}

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

/* Mobile Floating Bottom Quick-Dock */
.mobile-dock {
  display: none;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (DESKTOP COMPACT, TABLET, MOBILE PRO)
   ========================================================================== */
@media (max-width: 1180px) {
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(10, 15, 30, 0.96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.72);
    z-index: 80;
  }
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.98);
  }
  .nav-links a {
    display: block;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: grid; }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .templates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-grid { grid-template-columns: 1fr; }
  .estimator-grid { grid-template-columns: 1fr; }
  .summary-box { position: static; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
  .brandkit-grid { grid-template-columns: 1fr; }
  .span-7, .span-5, .span-4, .span-8, .span-6 { grid-column: span 12; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .telemetry-inner { padding: 6px 16px; gap: 12px; font-size: 11px; }
  .telemetry-hide-sm { display: none; }
  .navbar { top: 28px; padding: 10px 0; }
  .navbar-inner { padding: 6px 10px 6px 12px; gap: 8px; }
  .brand { font-size: 0.94rem; gap: 9px; }
  .brand-logo { width: 34px; height: 34px; }
  .brand-sub { font-size: 9px; }
  .cmd-trigger { display: none; }
  .nav-cta-desktop { display: none; }

  .hero { padding: 34px 0 54px; }
  .eyebrow-pill { font-size: 0.72rem; margin-bottom: 16px; }
  .hero-title { font-size: clamp(1.95rem, 8vw, 2.55rem); margin-bottom: 14px; }
  .hero-desc { font-size: 0.95rem; margin-bottom: 22px; }
  .hero-cta-row { gap: 10px; margin-bottom: 24px; }
  .hero-cta-row .btn { flex: 1 1 auto; min-height: 44px; font-size: 0.86rem; }
  .hero-metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .metric-chip { padding: 11px 10px; }
  .metric-value { font-size: 1.25rem; }
  .metric-label { font-size: 0.7rem; }

  .console-body { padding: 14px; }
  .console-header-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .console-code-box { font-size: 0.71rem; padding: 12px; }
  .console-scores { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .score-ring-card { padding: 8px 4px; }
  .score-ring { width: 38px; height: 38px; font-size: 0.72rem; }
  .score-label { font-size: 0.62rem; }

  .section { padding: 54px 0; }
  .section-header { margin-bottom: 26px; gap: 14px; }
  .section-title { font-size: clamp(1.6rem, 6.5vw, 2.1rem); }
  .section-subtitle { font-size: 0.92rem; }

  .projects-grid { grid-template-columns: 1fr; gap: 18px; }
  .proj-stats { grid-template-columns: repeat(2, 1fr); }
  .templates-grid { grid-template-columns: 1fr; gap: 18px; }

  .showcase-controls { gap: 12px; margin-bottom: 20px; }
  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; min-height: 38px; }
  .search-box { width: 100%; min-width: 0; }

  .bento-card, .lab-panel, .estimator-card, .summary-box, .contact-info-card, .contact-form-card {
    padding: 20px;
  }
  .architecture-diagram { grid-template-columns: 1fr; gap: 8px; }
  .game-hud { gap: 6px; }
  .game-hud-item { padding: 7px 8px; font-size: 0.72rem; }
  .terminal-shell { height: 340px; }
  .process-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: span 1; }

  /* Preview Studio Mobile Sheet */
  .modal-backdrop { padding: 8px; }
  .preview-modal { height: 92vh; border-radius: 18px; }
  .preview-toolbar { padding: 12px 14px; }
  .viewport-switcher { display: none; }
  .preview-canvas-wrap { padding: 10px; }

  /* Floating Mobile Bottom Dock */
  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 90;
    padding: 6px;
    border-radius: 20px;
    background: rgba(8, 13, 28, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
  }
  [data-theme="light"] .mobile-dock {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  }
  .mobile-dock a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 600;
    transition: var(--transition-fast);
  }
  .mobile-dock a span { font-size: 1rem; line-height: 1.1; }
  .mobile-dock a.dock-cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #030712;
    font-weight: 700;
  }
  .footer { padding-bottom: 96px; }
  .toast-container { right: 14px; left: 14px; bottom: 82px; }
}

@media (max-width: 420px) {
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .hero-metrics { grid-template-columns: 1fr; }
  .console-scores { grid-template-columns: repeat(2, 1fr); }
  .template-footer { flex-direction: column; align-items: stretch; }
  .template-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
}
