/* ========================================
   CSS VARIABLES — THEME SYSTEM
   ======================================== */
:root {
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Theme accent colors (consistent across site themes) */
  --accent-ai: #8b5cf6;
  --accent-risk: #f59e0b;
  --accent-enterprise: #3b82f6;
  --accent-hardware: #22c55e;
  --accent-fullstack: #ec4899;
  --accent-security: #ef4444;

  --nav-height: 64px;
  --section-gap: 120px;
  --max-width: 1200px;
}

/* ── Forge (Default) ── */
[data-site-theme="forge"] {
  --bg-primary: #0a0a0a;
  --bg-surface: #141414;
  --bg-elevated: #1a1a1a;
  --bg-hover: #222222;
  --text-primary: #e8e8e8;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent-site: #f59e0b;
  --border-color: #222222;
  --glow-color: rgba(245, 158, 11, 0.15);
  --glass-bg: rgba(10, 10, 10, 0.8);
  --glass-border: rgba(255, 255, 255, 0.06);
}

/* ── Blueprint ── */
[data-site-theme="blueprint"] {
  --bg-primary: #0c1929;
  --bg-surface: #0f2240;
  --bg-elevated: #132f4c;
  --bg-hover: #1a3a5c;
  --text-primary: #d4e4f7;
  --text-secondary: #7da2c9;
  --text-muted: #4a7098;
  --accent-site: #3b82f6;
  --border-color: #1e3a5f;
  --glow-color: rgba(59, 130, 246, 0.15);
  --glass-bg: rgba(12, 25, 41, 0.85);
  --glass-border: rgba(59, 130, 246, 0.12);
}

/* ── Terminal ── */
[data-site-theme="terminal"] {
  --bg-primary: #0d1117;
  --bg-surface: #131920;
  --bg-elevated: #161b22;
  --bg-hover: #1c2330;
  --text-primary: #c9d1d9;
  --text-secondary: #6e7681;
  --text-muted: #484f58;
  --accent-site: #22c55e;
  --border-color: #21262d;
  --glow-color: rgba(34, 197, 94, 0.12);
  --glass-bg: rgba(13, 17, 23, 0.85);
  --glass-border: rgba(34, 197, 94, 0.1);
}

/* ── Daylight ── */
[data-site-theme="daylight"] {
  --bg-primary: #f8f7f4;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #f0eeea;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent-site: #2563eb;
  --border-color: #e5e2dc;
  --glow-color: rgba(37, 99, 235, 0.08);
  --glass-bg: rgba(248, 247, 244, 0.9);
  --glass-border: rgba(0, 0, 0, 0.06);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 32px);
}

body {
  font-family: var(--font-display);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ========================================
   UTILITY
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-gap {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-site);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.mono {
  font-family: var(--font-mono);
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  transition: all 0.3s ease;
  max-width: calc(100vw - 32px);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-site);
  margin-right: 16px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ── Theme Toggle ── */
.theme-toggle {
  display: flex;
  gap: 6px;
  margin-left: 8px;
  padding: 4px;
  border-radius: 8px;
  background: var(--bg-surface);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-dot:hover {
  transform: scale(1.2);
}

.theme-dot.active {
  border-color: var(--text-primary);
}

.theme-dot[data-theme="forge"] { background: #f59e0b; }
.theme-dot[data-theme="blueprint"] { background: #3b82f6; }
.theme-dot[data-theme="terminal"] { background: #22c55e; }
.theme-dot[data-theme="daylight"] { background: #e5e2dc; border: 1px solid #ccc; }
.theme-dot[data-theme="daylight"].active { border-color: #333; }

/* ── Themes Dropdown ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  min-width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dropdown-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  transition: border-color 0.3s ease;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.footer-ip {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.5;
  font-family: var(--font-mono);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}

.footer-link {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--accent-site);
}

/* ========================================
   BACKGROUNDS & DECORATIVE ELEMENTS
   ======================================== */

/* ── Dot grid pattern (reusable) ── */
.bg-dots {
  position: relative;
}

.bg-dots::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--text-muted) 0.5px, transparent 0.5px);
  background-size: 32px 32px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

/* ── Gradient glow behind sections ── */
.glow-top {
  position: relative;
}

.glow-top::after {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Section divider line ── */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 0 auto;
  max-width: var(--max-width);
}

/* ── Accent bar ── */
.accent-bar {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-site);
  margin-bottom: 24px;
  transition: background 0.3s ease;
}

/* ========================================
   HERO — VISUAL DETAIL
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  overflow: hidden;
}

/* Radial gradient background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--glow-color) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 20% 80%, color-mix(in srgb, var(--accent-ai) 6%, transparent) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 80% 80%, color-mix(in srgb, var(--accent-security) 4%, transparent) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 70%);
}

/* ========================================
   TIMELINE SECTION — VISUAL DETAIL
   ======================================== */
.timeline-section {
  position: relative;
}

.timeline-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

/* ========================================
   THEMES SECTION — VISUAL DETAIL
   ======================================== */
.themes-section {
  position: relative;
}

.themes-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -200px;
  width: 500px;
  height: 600px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-ai) 5%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Theme card enhancements ── */
.theme-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: block;
}

/* Subtle gradient overlay on cards */
.theme-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 3%, transparent) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.theme-card:hover::after {
  opacity: 1;
}

/* ========================================
   STACK SECTION — VISUAL DETAIL
   ======================================== */
.stack-section {
  position: relative;
  overflow: hidden;
}

.stack-section::before {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.4;
}

/* ========================================
   ABOUT SECTION — VISUAL DETAIL
   ======================================== */
.about-section {
  position: relative;
}

.about-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.3;
}

/* ========================================
   CONTACT SECTION — VISUAL DETAIL
   ======================================== */
.contact-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 300px;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, var(--glow-color) 0%, transparent 60%);
  pointer-events: none;
}

/* ========================================
   THEME PAGE HERO — VISUAL DETAIL
   ======================================== */
.theme-page-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.theme-page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -200px;
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, var(--glow-color) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0.4;
}

.theme-page-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.04;
  pointer-events: none;
  mask-image: linear-gradient(225deg, black 0%, transparent 60%);
  -webkit-mask-image: linear-gradient(225deg, black 0%, transparent 60%);
}

/* ========================================
   PRODUCT CARD — VISUAL DETAIL
   ======================================== */
.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Accent gradient on hover */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover::before {
  opacity: 1;
}

/* Subtle corner glow */
.product-card::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, color-mix(in srgb, var(--card-accent) 6%, transparent) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.product-card:hover::after {
  opacity: 1;
}

/* ========================================
   COUNTER CARDS — VISUAL DETAIL
   ======================================== */
.counter-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Subtle accent shimmer on hover */
.counter-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-site) 4%, transparent) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.counter-card:hover::before {
  opacity: 1;
}

/* ========================================
   CHART CONTAINER — VISUAL DETAIL
   ======================================== */
.chart-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-site), transparent);
  opacity: 0.3;
}

/* ========================================
   PRODUCT PREVIEW — VISUAL DETAIL
   ======================================== */
.product-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

/* Dot pattern in empty previews */
.product-preview:not(:has(img)) {
  background-image: radial-gradient(circle, var(--text-muted) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  background-position: center;
}

.product-preview:not(:has(img))::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  opacity: 0.9;
}

.product-preview:not(:has(img))::after {
  position: relative;
  z-index: 1;
}

/* ========================================
   404 PAGE — VISUAL DETAIL
   ======================================== */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.page-404::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 50% 50%, var(--glow-color) 0%, transparent 70%);
  pointer-events: none;
}

/* ========================================
   ABOUT HIGHLIGHT — ENHANCED
   ======================================== */
.about-highlight {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-site);
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.about-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-site) 4%, transparent), transparent 40%);
  pointer-events: none;
}

/* ========================================
   MISC VISUAL POLISH
   ======================================== */

/* Subtle border glow on hero stats */
.stat {
  text-align: center;
  padding: 16px 24px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-surface) 50%, transparent);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat:hover {
  border-color: color-mix(in srgb, var(--accent-site) 30%, var(--border-color));
}

/* Stack item enhancement */
.stack-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stack-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-site);
  opacity: 0;
  transition: opacity 0.2s;
}

.stack-item:hover::before {
  opacity: 1;
}

/* Footer enhancement */

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-site), transparent);
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-sprint {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--accent-site);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  transition: color 0.3s ease;
}

.hero-title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}


.stat-number {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-site);
  line-height: 1;
  transition: color 0.3s ease;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  animation: float 2s ease-in-out infinite;
}

.hero-scroll svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}


.timeline-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 36px;
}

.timeline-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  width: 180px;
  text-align: right;
  flex-shrink: 0;
}

.timeline-track {
  flex: 1;
  height: 100%;
  position: relative;
  background: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
  transition: background 0.3s ease;
}

.timeline-bar {
  position: absolute;
  height: 100%;
  border-radius: 6px;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
}

.timeline-bar:hover {
  opacity: 1;
  transform: scaleY(1.15);
}

.timeline-days {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-left: 196px;
}

.timeline-day {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Counter Cards ── */
.counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.counter-card:hover {
  border-color: var(--accent-site);
  background: var(--bg-hover);
}

.counter-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.counter-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================
   THEME CARDS
   ======================================== */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Theme card accent bar and hover */
.theme-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.theme-card:hover {
  border-color: var(--card-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.theme-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--card-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--card-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.card-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--card-accent);
  margin-top: 16px;
  padding: 4px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--card-accent) 8%, transparent);
}

.card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========================================
   TECH STACK
   ======================================== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}


.stack-item:hover {
  border-color: var(--accent-site);
  background: var(--bg-hover);
}

.stack-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.stack-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-site);
  fill: none;
  stroke-width: 1.5;
  transition: stroke 0.3s ease;
}

.stack-name {
  font-size: 13px;
  font-weight: 500;
}

/* ========================================
   ABOUT
   ======================================== */
.about-text h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 20px;
  line-height: 1.2;
}

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


.about-highlight p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

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

.about-identity {
  font-size: 17px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.about-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 32px;
}

/* ========================================
   CONTACT
   ======================================== */

.contact-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.contact-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.contact-title {
  position: relative;
  z-index: 1;
}

.contact-subtitle {
  position: relative;
  z-index: 1;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 14px 28px;
  border: 2px solid var(--accent-site);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  color: var(--accent-site);
  text-decoration: none;
  position: relative;
  z-index: 1;
  background: transparent;
}

.contact-btn:hover {
  background: var(--accent-site);
  color: var(--bg-primary);
}

.contact-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.contact-btn.secondary {
  border-color: var(--text-muted);
  color: var(--text-secondary);
  font-size: 14px;
  padding: 12px 24px;
}

.contact-btn.secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: transparent;
}

/* ========================================
   THEME DEEP-DIVE PAGE
   ======================================== */
.theme-page-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
}

.theme-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
  cursor: pointer;
  transition: color 0.2s;
}

.theme-back:hover {
  color: var(--text-primary);
}

.theme-back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.theme-page-number {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.theme-page-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 16px;
}

.theme-page-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

/* ── Product Cards (Theme Page) ── */
.product-card:hover {
  border-color: var(--card-accent);
}

.product-info h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.product-info p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.product-metric {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.product-metric-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
}

.product-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.product-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.2s;
  color: #fff;
}

.product-visit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.product-visit svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ========================================
   EMAIL COPY MODAL
   ======================================== */
.email-modal {
  max-width: 440px;
}

.email-display {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent-site);
  padding: 16px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 20px;
  user-select: all;
  letter-spacing: 0.3px;
}

.email-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 24px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-copy-btn:hover {
  border-color: var(--accent-site);
  color: var(--accent-site);
}

.email-copy-btn.copied {
  border-color: #22c55e;
  color: #22c55e;
  background: color-mix(in srgb, #22c55e 6%, transparent);
}

/* ========================================
   GOOGLE FORM MODAL
   ======================================== */
.form-modal {
  max-width: 680px;
  width: 100%;
  height: 85vh;
  display: flex;
  flex-direction: column;
}

.form-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.form-modal-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.form-modal-body {
  flex: 1;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  background: #fff;
}

.form-modal-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* ========================================
   LEARN MORE BUTTON & MODAL CONTENT
   ======================================== */
.learn-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.learn-more-btn:hover {
  border-color: var(--btn-accent);
  color: var(--btn-accent);
  background: color-mix(in srgb, var(--btn-accent) 6%, transparent);
}

.learn-more-modal {
  max-width: 720px;
}

.learn-more-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 28px;
}

.learn-more-section {
  margin-bottom: 24px;
}

.learn-more-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.learn-more-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.learn-more-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.learn-more-features li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.learn-more-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.learn-more-why {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-site);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin-top: 28px;
}

.learn-more-why p {
  font-style: italic;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 20px 24px 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.modal-body {
  padding: 16px 24px 32px;
}

/* ========================================
   404 PAGE
   ======================================== */
.four04-code {
  font-family: var(--font-mono);
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 700;
  color: var(--border-color);
  line-height: 1;
  margin-bottom: 24px;
  transition: color 0.3s ease;
}

.four04-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.four04-text {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

.four04-link {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-site);
  padding: 12px 24px;
  border: 1px solid var(--accent-site);
  border-radius: 10px;
  transition: all 0.2s;
  display: inline-block;
}

.four04-link:hover {
  background: var(--accent-site);
  color: var(--bg-primary);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  :root { --section-gap: 80px; }

  .counters {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-label {
    width: 120px;
    font-size: 10px;
  }

  .timeline-days {
    padding-left: 136px;
  }

  .nav {
    padding: 10px 16px;
    gap: 4px;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px 10px;
  }

  .nav-logo {
    margin-right: 8px;
  }
}

@media (max-width: 640px) {
  :root { --section-gap: 64px; }

  .themes-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 32px;
  }

  .counters {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .nav {
    top: 8px;
    border-radius: 12px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-label {
    width: 90px;
    font-size: 9px;
  }

  .timeline-days {
    padding-left: 106px;
  }

  .hero-title {
    letter-spacing: -2px;
  }

  .product-metrics {
    grid-template-columns: 1fr;
  }
}

/* ── Hide dropdown on mobile, simplify nav ── */
@media (max-width: 768px) {
  .nav-dropdown-menu {
    left: 0;
    transform: translateX(0) translateY(-4px);
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown.open .nav-dropdown-menu {
    transform: translateX(0) translateY(0);
  }

  .nav-link.desktop-only {
    display: none;
  }
}
