/* ============================================
   PROTOCORE — Presentation Site
   Dark theme with emerald/cyan/purple accents
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-deep: #070714;
  --bg-primary: #0c0c22;
  --bg-secondary: #12122e;
  --bg-card: rgba(255, 255, 255, 0.055);
  --bg-card-hover: rgba(255, 255, 255, 0.095);
  --bg-glass: rgba(10, 10, 30, 0.8);
  --border: rgba(255, 255, 255, 0.10);
  --border-hover: rgba(255, 255, 255, 0.20);
  --border-accent: rgba(52, 211, 153, 0.45);
  --text-primary: #f2f2fa;
  --text-secondary: #a8a8c0;
  --text-muted: #686888;
  --accent: #14d98a;
  --accent-light: #4eeaa8;
  --accent-glow: rgba(20, 217, 138, 0.18);
  --cyan: #22d3ee;
  --purple: #a78bfa;
  --gradient-main: linear-gradient(135deg, #14d98a, #22d3ee);
  --gradient-full: linear-gradient(135deg, #14d98a 0%, #22d3ee 50%, #a78bfa 100%);
  --gradient-text: linear-gradient(135deg, #4eeaa8, #38e8ff, #c4b5fd);
  --section-pad: clamp(5rem, 10vw, 8rem);
  --container: 1200px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.2s var(--ease);
  --t-normal: 0.35s var(--ease);
  --t-slow: 0.6s var(--ease);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); }

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* --- Container & Section --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 2.5rem);
}
section { padding: var(--section-pad) 0; position: relative; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(20, 217, 138, 0.2);
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header .section-subtitle { margin: 0 auto; }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Scroll Progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-main);
  z-index: 1100;
  transition: width 0.05s linear;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.85rem 0;
  transition: all var(--t-normal);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.nav-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast);
  position: relative;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  padding: 0.5rem 1.4rem !important;
  border-radius: 100px !important;
  background: var(--gradient-main);
  color: #fff !important;
  font-weight: 600 !important;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(4, 4, 12, 0.95);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.nav-mobile.active { display: flex; }
.nav-mobile a {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--t-fast);
}
.nav-mobile a:hover { color: var(--accent); }

/* --- Page Switch (pill toggle) --- */
.nav-page-switch {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}
.nav-page-switch-item {
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  white-space: nowrap;
}
.nav-page-switch-item:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.nav-page-switch-item.active {
  background: var(--gradient-main);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(20, 217, 138, 0.2);
}
[data-theme="light"] .nav-page-switch-item:hover:not(.active) {
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .nav-page-switch-item.active {
  box-shadow: 0 2px 8px rgba(13, 158, 106, 0.2);
}
.nav-page-switch--mobile {
  margin-bottom: 1rem;
}
.nav-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.25rem;
  list-style: none;
  align-self: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast);
}
.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 24px rgba(20, 217, 138, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 8px 40px rgba(20, 217, 138, 0.35);
  transform: translateY(-2px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}
.btn-arrow {
  transition: transform 0.2s;
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 2rem;
  overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 70% 55% at 10% 40%, rgba(20, 217, 138, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 45% at 90% 20%, rgba(34, 211, 238, 0.16), transparent 50%),
    radial-gradient(ellipse 50% 60% at 40% 95%, rgba(167, 139, 250, 0.14), transparent 50%);
  animation: meshFloat 30s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes meshFloat {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  33%  { transform: translate(30px, -20px) scale(1.03) rotate(1deg); }
  66%  { transform: translate(-20px, 15px) scale(0.97) rotate(-1deg); }
  100% { transform: translate(15px, -10px) scale(1.01) rotate(0.5deg); }
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-content { max-width: 560px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(20, 217, 138, 0.15);
  margin-bottom: 1.75rem;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 217, 138, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(20, 217, 138, 0); }
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 480px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-glow {
  position: absolute;
  width: 130%;
  height: 130%;
  top: -15%;
  left: -15%;
  background: radial-gradient(circle, rgba(20, 217, 138, 0.08) 0%, transparent 55%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}
.hero-screenshot-wrapper {
  border-radius: var(--r-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
  transition: transform var(--t-slow), box-shadow var(--t-slow);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(20, 217, 138, 0.12),
    0 0 100px rgba(20, 217, 138, 0.08);
}
.hero-screenshot-wrapper:hover {
  transform: perspective(1400px) rotateY(-2deg) rotateX(1deg);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(20, 217, 138, 0.2),
    0 0 120px rgba(20, 217, 138, 0.12);
}

/* --- Stats --- */
.stats {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  position: relative;
}
.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 217, 138, 0.03), rgba(34, 211, 238, 0.03), rgba(167, 139, 250, 0.03));
  pointer-events: none;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}
.stat-item { text-align: center; }
.stat-value {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* --- About --- */
.about { background: var(--bg-deep); }
.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-text .section-subtitle { margin-bottom: 1.5rem; }
.about-highlight {
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-md);
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.7;
}

/* Architecture Diagram */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}
.arch-layer {
  width: 100%;
  padding: 1.1rem 1.5rem;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--t-normal);
  position: relative;
}
.arch-layer:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: scale(1.03);
}
.arch-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
  margin-top: 0.2rem;
}
.arch-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0;
  color: var(--accent);
  font-size: 0.75rem;
  opacity: 0.5;
}
.arch-connector svg {
  width: 16px;
  height: 16px;
}
.arch-layer-accent {
  border-color: var(--border-accent);
  background: rgba(20, 217, 138, 0.06);
}

/* --- Features (Bento Grid) --- */
.features {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.features::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 40%;
  height: 50%;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.05), transparent 70%);
  pointer-events: none;
}
.features::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 40%;
  height: 50%;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.04), transparent 70%);
  pointer-events: none;
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.bento-card {
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  opacity: 0;
  transition: opacity var(--t-normal);
  background: radial-gradient(
    circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(20, 217, 138, 0.07),
    transparent
  );
  pointer-events: none;
}
.bento-card:hover {
  border-color: rgba(20, 217, 138, 0.25);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 40px rgba(20, 217, 138, 0.06), 0 0 0 1px rgba(20, 217, 138, 0.08);
}
.bento-card:hover::before { opacity: 1; }
.bento-card.span-2 { grid-column: span 2; }
/* Colored top accent line on bento cards */
.bento-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity var(--t-normal);
  border-radius: 0 0 2px 2px;
}
.bento-card:hover::after { opacity: 0.7; }
.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--accent-glow);
  border: 1px solid rgba(20, 217, 138, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}
.bento-icon svg { width: 22px; height: 22px; }
.bento-icon.cyan {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}
.bento-icon.purple {
  color: var(--purple);
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.08);
}
.bento-icon {
  box-shadow: 0 0 20px rgba(20, 217, 138, 0.08);
}
.bento-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.bento-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Platform Showcase --- */
.platform { background: var(--bg-deep); }
.platform-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.platform-tab {
  padding: 0.55rem 1.4rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}
.platform-tab.active {
  background: var(--accent-glow);
  border-color: var(--border-accent);
  color: var(--accent);
}
.platform-tab:hover:not(.active) {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.platform-content { display: none; }
.platform-content.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.platform-featured {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.platform-featured:hover {
  border-color: var(--border-accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 60px rgba(20, 217, 138, 0.05);
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.screenshot-item {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}
.screenshot-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.screenshot-item img { transition: transform var(--t-slow); }
.screenshot-item:hover img { transform: scale(1.03); }
.screenshot-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

/* --- Technology --- */
.technology {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.technology::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(167, 139, 250, 0.25) 50%, transparent 90%);
}
.technology::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.04), transparent 70%);
  pointer-events: none;
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.tech-card {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}
.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--gradient-full);
  opacity: 0;
  transition: opacity var(--t-normal);
}
.tech-card:hover {
  border-color: rgba(167, 139, 250, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(167, 139, 250, 0.06);
}
.tech-card:hover::before { opacity: 1; }
.tech-number {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--purple);
  letter-spacing: -0.02em;
}
.tech-body { flex: 1; min-width: 0; }
.tech-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.tech-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--purple);
  opacity: 0.7;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}
.tech-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.tech-why {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(167, 139, 250, 0.06);
  border-left: 2px solid rgba(167, 139, 250, 0.3);
}
.tech-why strong {
  color: var(--purple);
  font-weight: 600;
}
.tech-summary {
  margin-top: 2.5rem;
  text-align: center;
  padding: 1.5rem 2rem;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(34, 211, 238, 0.06), rgba(20, 217, 138, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.15);
}
.tech-summary p {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .tech-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .tech-card { flex-direction: column; gap: 1rem; }
  .tech-number { width: 44px; height: 44px; font-size: 0.95rem; }
}

/* --- Use Cases --- */
.use-cases {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.use-cases::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(20, 217, 138, 0.2) 50%, transparent 90%);
}
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.use-case-card {
  padding: 2.5rem;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}
.use-case-card:hover {
  border-color: rgba(20, 217, 138, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(20, 217, 138, 0.06);
}
.use-case-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--accent-glow);
  border: 1px solid rgba(20, 217, 138, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}
.use-case-icon svg { width: 24px; height: 24px; }
.use-case-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.use-case-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Advantages --- */
.advantages {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}
.advantages::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(34, 211, 238, 0.2) 50%, transparent 90%);
}
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.advantage-card {
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--t-normal);
  text-align: center;
}
.advantage-card:hover {
  border-color: rgba(20, 217, 138, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(20, 217, 138, 0.06);
}
.advantage-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(20, 217, 138, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--accent);
}
.advantage-icon svg { width: 24px; height: 24px; }
.advantage-icon.cyan { color: var(--cyan); background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.15); }
.advantage-icon.purple { color: var(--purple); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.15); }
.advantage-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.advantage-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- How It Works --- */
.how-it-works {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(167, 139, 250, 0.2) 50%, transparent 90%);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 44px;
  left: calc(16.67% + 28px);
  right: calc(16.67% + 28px);
  height: 2px;
  background: var(--gradient-main);
  opacity: 0.25;
}
.step { text-align: center; position: relative; }
.step-number {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  position: relative;
  z-index: 1;
  transition: all var(--t-normal);
}
.step:hover .step-number {
  background: var(--accent-glow);
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(20, 217, 138, 0.15);
}
.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.65;
}

/* --- CTA Section --- */
.cta-section {
  padding: var(--section-pad) 0;
  text-align: center;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(20, 217, 138, 0.08), transparent),
    radial-gradient(ellipse 40% 60% at 30% 40%, rgba(34, 211, 238, 0.06), transparent),
    radial-gradient(ellipse 40% 60% at 70% 60%, rgba(167, 139, 250, 0.06), transparent);
  pointer-events: none;
  animation: ctaGlow 8s ease-in-out infinite alternate;
}
@keyframes ctaGlow {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}
.cta-section .container { position: relative; z-index: 1; }
.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.cta-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.footer .container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-brand { color: var(--text-secondary); font-weight: 600; }
.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--text-primary); }

/* Author / social row */
.footer-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-author-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-author-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}
.footer-author-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color var(--t-fast), background var(--t-fast);
}
.footer-social-link:hover {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
}
.footer-social-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--t-fast);
}
.footer-social-link:hover svg { opacity: 1; }

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: zoom-out;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
  z-index: 1;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
  z-index: 1;
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) translateX(-2px); }
.lightbox-next:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) translateX(2px); }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font);
}

.lightbox img {
  transition: opacity 0.12s ease;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }
.reveal-delay-7 { transition-delay: 0.56s; }
.reveal-delay-8 { transition-delay: 0.64s; }

/* Hero-specific reveals */
.hero-content { animation: heroFadeIn 1s var(--ease) both; }
.hero-visual { animation: heroFadeIn 1.2s var(--ease) 0.2s both; }
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Tech Teaser (main page) --- */
.tech-teaser {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.tech-teaser::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(167, 139, 250, 0.25) 50%, transparent 90%);
}
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.teaser-card {
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--t-normal);
  text-align: center;
}
.teaser-card:hover {
  border-color: rgba(167, 139, 250, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(167, 139, 250, 0.06);
}
.teaser-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(20, 217, 138, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--accent);
}
.teaser-icon svg { width: 24px; height: 24px; }
.teaser-icon.cyan { color: var(--cyan); background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.15); }
.teaser-icon.purple { color: var(--purple); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.15); }
.teaser-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.teaser-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.teaser-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Tech Hero (tech page) --- */
.tech-hero {
  min-height: auto;
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}
.tech-hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(167, 139, 250, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 50% at 30% 70%, rgba(20, 217, 138, 0.08), transparent 50%);
  pointer-events: none;
}
.tech-hero .hero-badge,
.tech-hero .hero-title,
.tech-hero .hero-subtitle {
  position: relative;
  z-index: 1;
}

/* (nav-link-tech removed, replaced by page switch) */

/* --- Architecture Graph --- */
.architecture {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}
.architecture::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(20, 217, 138, 0.2) 50%, transparent 90%);
}

.graph-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  padding: 1rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.legend-dot--input { background: rgba(255, 255, 255, 0.25); border: 1px solid rgba(255, 255, 255, 0.4); }
.legend-dot--core { background: rgba(20, 217, 138, 0.3); border: 1px solid rgba(20, 217, 138, 0.5); }
.legend-dot--safety { background: rgba(239, 68, 68, 0.3); border: 1px solid rgba(239, 68, 68, 0.5); }
.legend-dot--optimization { background: rgba(167, 139, 250, 0.3); border: 1px solid rgba(167, 139, 250, 0.5); }
.legend-line {
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.legend-line--dashed {
  background: none;
  border-top: 2px dashed var(--cyan);
}

.graph-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
  min-height: 400px;
}

.graph-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.graph-path {
  fill: none;
  stroke-width: 2;
}
.graph-path--main {
  stroke: rgba(20, 217, 138, 0.4);
}
.graph-path--side {
  stroke: rgba(167, 139, 250, 0.3);
  stroke-dasharray: 6 4;
}
.graph-path--loop {
  stroke: rgba(34, 211, 238, 0.4);
  stroke-dasharray: 8 4;
  stroke-width: 2;
}

.graph-nodes {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.graph-loop-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-top: 0.5rem;
}

.graph-loop-area {
  position: relative;
  border: 1px dashed rgba(34, 211, 238, 0.2);
  border-radius: var(--r-xl);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: rgba(34, 211, 238, 0.02);
  width: 100%;
  max-width: 760px;
}

/* Graph rows inside loop */
.graph-loop-area > .graph-node[data-col="0"],
.graph-loop-area > .graph-node[data-col="2"] {
  /* Side nodes will be repositioned */
}

/* Create rows for side-by-side nodes */
.graph-loop-area {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-rows: auto auto auto auto auto;
  gap: 1.25rem 1rem;
  align-items: center;
  justify-items: center;
}

.graph-node[data-row="3"][data-col="0"] { grid-area: 1 / 1; }
.graph-node[data-row="3"][data-col="1"] { grid-area: 1 / 2; }
.graph-node[data-row="3"][data-col="2"] { grid-area: 1 / 3; }
.graph-node[data-row="4"][data-col="1"] { grid-area: 2 / 2; }
.graph-node[data-row="5"][data-col="0"] { grid-area: 3 / 1; }
.graph-node[data-row="5"][data-col="1"] { grid-area: 3 / 2; }
.graph-node[data-row="5"][data-col="2"] { grid-area: 3 / 3; }
.graph-node[data-row="6"][data-col="1"] { grid-area: 4 / 2; }
.graph-node[data-row="7"][data-col="1"] { grid-area: 5 / 2; }

.graph-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--t-normal);
  min-width: 140px;
  max-width: 200px;
  text-align: center;
  position: relative;
}
.graph-node:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.graph-node--active {
  transform: translateY(-3px) scale(1.03);
  z-index: 10;
}

/* Node type colors */
.graph-node--input {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}
.graph-node--input:hover,
.graph-node--input.graph-node--active {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.05);
}

.graph-node--core {
  border-color: rgba(20, 217, 138, 0.25);
  background: rgba(20, 217, 138, 0.06);
}
.graph-node--core:hover,
.graph-node--core.graph-node--active {
  border-color: rgba(20, 217, 138, 0.5);
  box-shadow: 0 8px 30px rgba(20, 217, 138, 0.1);
}

.graph-node--safety {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}
.graph-node--safety:hover,
.graph-node--safety.graph-node--active {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.1);
}

.graph-node--optimization {
  border-color: rgba(167, 139, 250, 0.25);
  background: rgba(167, 139, 250, 0.06);
}
.graph-node--optimization:hover,
.graph-node--optimization.graph-node--active {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 8px 30px rgba(167, 139, 250, 0.1);
}

.graph-node--decision {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  min-width: unset;
  max-width: unset;
  justify-content: center;
  padding: 0.75rem;
}

.graph-node-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.graph-node--input .graph-node-icon { color: var(--text-primary); }
.graph-node--core .graph-node-icon { color: var(--accent); }
.graph-node--safety .graph-node-icon { color: #ef4444; }
.graph-node--optimization .graph-node-icon { color: var(--purple); }
.graph-node-icon svg { width: 24px; height: 24px; }

.graph-node-label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}
.graph-node-sub {
  font-size: 0.68rem;
  color: var(--text-secondary);
  opacity: 0.7;
}
.graph-node--decision .graph-node-label {
  font-size: 0.72rem;
}
.graph-node--decision .graph-node-sub {
  display: none;
}

/* Graph Tooltip */
.graph-tooltip {
  position: absolute;
  z-index: 100;
  max-width: 380px;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(20, 217, 138, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.graph-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.graph-tooltip-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--t-fast);
}
.graph-tooltip-close:hover { color: var(--text-primary); }
.graph-tooltip-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
  padding-right: 1.5rem;
}
.graph-tooltip-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-subtitle { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 720px; margin: 2rem auto 0; }
  .hero-screenshot-wrapper {
    transform: perspective(1400px) rotateY(0) rotateX(4deg);
  }
  .hero-screenshot-wrapper:hover {
    transform: perspective(1400px) rotateY(0) rotateX(2deg);
  }
  .about .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .about-visual { order: -1; }
  .about-highlight { text-align: left; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .graph-loop-area {
    grid-template-columns: 1fr 1.3fr 1fr;
    gap: 1rem 0.5rem;
    padding: 1.5rem 1rem;
  }
  .graph-node { min-width: 120px; max-width: 170px; padding: 0.75rem 0.75rem; }
  .graph-node-label { font-size: 0.75rem; }
  .graph-node-sub { font-size: 0.62rem; }
  .graph-tooltip { max-width: 320px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-sep { display: none; }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.span-2 { grid-column: span 1; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .use-cases-grid { grid-template-columns: 1fr; }
  .advantages-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 3rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .teaser-grid { grid-template-columns: 1fr; }
  .graph-loop-area {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1rem;
  }
  .graph-node[data-row="3"][data-col="0"],
  .graph-node[data-row="3"][data-col="1"],
  .graph-node[data-row="3"][data-col="2"],
  .graph-node[data-row="4"][data-col="1"],
  .graph-node[data-row="5"][data-col="0"],
  .graph-node[data-row="5"][data-col="1"],
  .graph-node[data-row="5"][data-col="2"],
  .graph-node[data-row="6"][data-col="1"],
  .graph-node[data-row="7"][data-col="1"] {
    grid-area: auto;
  }
  .graph-node { max-width: 100%; min-width: unset; width: 100%; }
  .graph-node--decision { width: 120px; }
  .graph-lines { display: none; }
  .graph-legend { gap: 0.75rem; padding: 0.75rem 1rem; }
  .graph-tooltip { max-width: calc(100vw - 2rem); left: 0 !important; right: 0; margin: 0 auto; }
  .legend-item { font-size: 0.72rem; }
  .footer-links { gap: 1rem; }
  .footer-author-links { gap: 0.25rem; }
  .footer-social-link { font-size: 0.72rem; padding: 0.2rem 0.35rem; }
  .section-header { margin-bottom: 2.5rem; }
  .hero-title { margin-bottom: 1rem; }
  .hero-subtitle { margin-bottom: 1.5rem; }
}

@media (max-width: 480px) {
  .stats .container { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat-value { font-size: 1.6rem; }
  .stat-label { font-size: 0.78rem; }
  .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
  .bento-card { padding: 1.5rem; }
  .use-case-card { padding: 1.5rem; }
  .advantage-card { padding: 1.5rem; }
  .tech-card { padding: 1.5rem; }
  .footer-author-sep { display: none; }
  .graph-container { padding: 1rem 0; }
}

/* ============================================
   LIGHT (BEIGE) THEME
   ============================================ */

/* --- Theme Toggle Button --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
#themeToggleMobile { display: none; }
@media (max-width: 768px) {
  #themeToggleMobile { display: flex; }
}

/* --- Light Theme Variables --- */
[data-theme="light"] {
  --bg-deep: #f5f0e8;
  --bg-primary: #ece7de;
  --bg-secondary: #e2dbd1;
  --bg-card: rgba(0, 0, 0, 0.04);
  --bg-card-hover: rgba(0, 0, 0, 0.07);
  --bg-glass: rgba(245, 240, 232, 0.88);
  --border: rgba(0, 0, 0, 0.09);
  --border-hover: rgba(0, 0, 0, 0.18);
  --border-accent: rgba(13, 158, 106, 0.4);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a60;
  --text-muted: #7a7a90;
  --accent: #0d9e6a;
  --accent-light: #10b981;
  --accent-glow: rgba(13, 158, 106, 0.1);
  --cyan: #0891b2;
  --purple: #7c3aed;
  --gradient-main: linear-gradient(135deg, #0d9e6a, #0891b2);
  --gradient-full: linear-gradient(135deg, #0d9e6a 0%, #0891b2 50%, #7c3aed 100%);
  --gradient-text: linear-gradient(135deg, #059669, #0891b2, #7c3aed);
}

/* --- Noise texture: soften for light --- */
[data-theme="light"] body::after {
  opacity: 0.012;
}

/* --- Navigation --- */
[data-theme="light"] .nav.scrolled {
  background: var(--bg-glass);
  border-bottom-color: var(--border);
}
[data-theme="light"] .nav-mobile {
  background: rgba(245, 240, 232, 0.97);
  backdrop-filter: blur(20px);
}
[data-theme="light"] .nav-cta {
  color: #fff !important;
}

/* --- Buttons --- */
[data-theme="light"] .btn-primary {
  color: #fff;
  box-shadow: 0 4px 20px rgba(13, 158, 106, 0.2);
}
[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 32px rgba(13, 158, 106, 0.3);
}
[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
}
[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.07);
  border-color: var(--border-hover);
}

/* --- Hero --- */
[data-theme="light"] .hero {
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}
[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse 70% 55% at 10% 40%, rgba(13, 158, 106, 0.1), transparent 60%),
    radial-gradient(ellipse 60% 45% at 90% 20%, rgba(8, 145, 178, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 60% at 40% 95%, rgba(124, 58, 237, 0.07), transparent 50%);
}
[data-theme="light"] .hero-badge {
  background: rgba(13, 158, 106, 0.08);
  border-color: rgba(13, 158, 106, 0.2);
}
@keyframes badgePulseLight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 158, 106, 0.12); }
  50% { box-shadow: 0 0 0 8px rgba(13, 158, 106, 0); }
}
[data-theme="light"] .hero-badge {
  animation-name: badgePulseLight;
}
[data-theme="light"] .hero-glow {
  background: radial-gradient(circle, rgba(13, 158, 106, 0.06) 0%, transparent 55%);
}
[data-theme="light"] .hero-screenshot-wrapper {
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(13, 158, 106, 0.15),
    0 0 80px rgba(13, 158, 106, 0.05);
}
[data-theme="light"] .hero-screenshot-wrapper:hover {
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(13, 158, 106, 0.25),
    0 0 100px rgba(13, 158, 106, 0.08);
}

/* --- Stats --- */
[data-theme="light"] .stats {
  background: var(--bg-primary);
}
[data-theme="light"] .stats::before {
  background: linear-gradient(90deg, rgba(13, 158, 106, 0.04), rgba(8, 145, 178, 0.04), rgba(124, 58, 237, 0.04));
}

/* --- About --- */
[data-theme="light"] .about-highlight {
  background: rgba(13, 158, 106, 0.06);
  border-left-color: var(--accent);
}
[data-theme="light"] .arch-layer-accent {
  border-color: rgba(13, 158, 106, 0.35);
  background: rgba(13, 158, 106, 0.06);
}
[data-theme="light"] .arch-layer:hover {
  border-color: rgba(13, 158, 106, 0.4);
}
[data-theme="light"] .section-badge {
  background: rgba(13, 158, 106, 0.08);
  border-color: rgba(13, 158, 106, 0.2);
}

/* --- Features (Bento Grid) --- */
[data-theme="light"] .features::before {
  background: radial-gradient(ellipse, rgba(8, 145, 178, 0.04), transparent 70%);
}
[data-theme="light"] .features::after {
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.03), transparent 70%);
}
[data-theme="light"] .bento-card::before {
  background: radial-gradient(
    circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(13, 158, 106, 0.06),
    transparent
  );
}
[data-theme="light"] .bento-card:hover {
  border-color: rgba(13, 158, 106, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(13, 158, 106, 0.1);
}
[data-theme="light"] .bento-icon {
  background: rgba(13, 158, 106, 0.08);
  border-color: rgba(13, 158, 106, 0.2);
  box-shadow: 0 0 16px rgba(13, 158, 106, 0.06);
}
[data-theme="light"] .bento-icon.cyan {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.25);
  box-shadow: 0 0 16px rgba(8, 145, 178, 0.06);
}
[data-theme="light"] .bento-icon.purple {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.06);
}

/* --- Platform Showcase --- */
[data-theme="light"] .platform-tab.active {
  background: rgba(13, 158, 106, 0.08);
  border-color: rgba(13, 158, 106, 0.3);
}
[data-theme="light"] .platform-featured {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .platform-featured:hover {
  border-color: rgba(13, 158, 106, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), 0 0 40px rgba(13, 158, 106, 0.04);
}
[data-theme="light"] .screenshot-item:hover {
  border-color: rgba(13, 158, 106, 0.3);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .screenshot-label {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: rgba(255, 255, 255, 0.9);
}

/* --- Technology --- */
[data-theme="light"] .technology::before {
  background: linear-gradient(90deg, transparent 10%, rgba(124, 58, 237, 0.15) 50%, transparent 90%);
}
[data-theme="light"] .technology::after {
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.03), transparent 70%);
}
[data-theme="light"] .tech-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(124, 58, 237, 0.08);
}
[data-theme="light"] .tech-number {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(8, 145, 178, 0.08));
  border-color: rgba(124, 58, 237, 0.2);
}
[data-theme="light"] .tech-why {
  background: rgba(124, 58, 237, 0.04);
  border-left-color: rgba(124, 58, 237, 0.3);
}
[data-theme="light"] .tech-summary {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(8, 145, 178, 0.04), rgba(13, 158, 106, 0.04));
  border-color: rgba(124, 58, 237, 0.12);
}

/* --- Use Cases --- */
[data-theme="light"] .use-cases::before {
  background: linear-gradient(90deg, transparent 10%, rgba(13, 158, 106, 0.15) 50%, transparent 90%);
}
[data-theme="light"] .use-case-card:hover {
  border-color: rgba(13, 158, 106, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(13, 158, 106, 0.08);
}
[data-theme="light"] .use-case-icon {
  background: rgba(13, 158, 106, 0.08);
  border-color: rgba(13, 158, 106, 0.2);
}

/* --- Advantages --- */
[data-theme="light"] .advantages::before {
  background: linear-gradient(90deg, transparent 10%, rgba(8, 145, 178, 0.15) 50%, transparent 90%);
}
[data-theme="light"] .advantage-card:hover {
  border-color: rgba(13, 158, 106, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(13, 158, 106, 0.08);
}
[data-theme="light"] .advantage-icon {
  background: rgba(13, 158, 106, 0.08);
  border-color: rgba(13, 158, 106, 0.2);
}
[data-theme="light"] .advantage-icon.cyan {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.2);
}
[data-theme="light"] .advantage-icon.purple {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
}

/* --- How It Works --- */
[data-theme="light"] .how-it-works::before {
  background: linear-gradient(90deg, transparent 10%, rgba(124, 58, 237, 0.15) 50%, transparent 90%);
}
[data-theme="light"] .step-number {
  border-color: rgba(13, 158, 106, 0.35);
}
[data-theme="light"] .step:hover .step-number {
  background: rgba(13, 158, 106, 0.08);
  box-shadow: 0 0 24px rgba(13, 158, 106, 0.1);
}

/* --- CTA Section --- */
[data-theme="light"] .cta-section::before {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(13, 158, 106, 0.06), transparent),
    radial-gradient(ellipse 40% 60% at 30% 40%, rgba(8, 145, 178, 0.04), transparent),
    radial-gradient(ellipse 40% 60% at 70% 60%, rgba(124, 58, 237, 0.04), transparent);
}

/* --- Lightbox --- */
[data-theme="light"] .lightbox {
  background: rgba(30, 30, 30, 0.85);
}
[data-theme="light"] .lightbox img {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .lightbox-close,
[data-theme="light"] .lightbox-prev,
[data-theme="light"] .lightbox-next {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
[data-theme="light"] .lightbox-close:hover,
[data-theme="light"] .lightbox-prev:hover,
[data-theme="light"] .lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Tech Teaser --- */
[data-theme="light"] .tech-teaser::before {
  background: linear-gradient(90deg, transparent 10%, rgba(124, 58, 237, 0.15) 50%, transparent 90%);
}
[data-theme="light"] .teaser-card:hover {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(124, 58, 237, 0.08);
}
[data-theme="light"] .teaser-icon {
  background: rgba(13, 158, 106, 0.08);
  border-color: rgba(13, 158, 106, 0.2);
}
[data-theme="light"] .teaser-icon.cyan {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.2);
}
[data-theme="light"] .teaser-icon.purple {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
}
/* (nav-link-tech light override removed) */

/* --- Tech Hero (tech page) --- */
[data-theme="light"] .tech-hero {
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}
[data-theme="light"] .tech-hero::before {
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(124, 58, 237, 0.06), transparent 60%),
    radial-gradient(ellipse 50% 50% at 30% 70%, rgba(13, 158, 106, 0.05), transparent 50%);
}

/* --- Architecture Graph --- */
[data-theme="light"] .architecture::before {
  background: linear-gradient(90deg, transparent 10%, rgba(13, 158, 106, 0.15) 50%, transparent 90%);
}
[data-theme="light"] .graph-legend {
  background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .legend-dot--input {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .legend-dot--core {
  background: rgba(13, 158, 106, 0.25);
  border-color: rgba(13, 158, 106, 0.5);
}
[data-theme="light"] .legend-dot--safety {
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.5);
}
[data-theme="light"] .legend-dot--optimization {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(124, 58, 237, 0.5);
}

[data-theme="light"] .graph-path--main { stroke: rgba(13, 158, 106, 0.4); }
[data-theme="light"] .graph-path--side { stroke: rgba(124, 58, 237, 0.3); }
[data-theme="light"] .graph-path--loop { stroke: rgba(8, 145, 178, 0.4); }

[data-theme="light"] .graph-loop-label {
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.06);
  border-color: rgba(8, 145, 178, 0.2);
}
[data-theme="light"] .graph-loop-area {
  border-color: rgba(8, 145, 178, 0.2);
  background: rgba(8, 145, 178, 0.02);
}

[data-theme="light"] .graph-node {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .graph-node:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .graph-node--input {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .graph-node--input:hover,
[data-theme="light"] .graph-node--input.graph-node--active {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .graph-node--input .graph-node-icon { color: var(--text-primary); }

[data-theme="light"] .graph-node--core {
  border-color: rgba(13, 158, 106, 0.25);
  background: rgba(13, 158, 106, 0.05);
}
[data-theme="light"] .graph-node--core:hover,
[data-theme="light"] .graph-node--core.graph-node--active {
  border-color: rgba(13, 158, 106, 0.5);
  box-shadow: 0 8px 24px rgba(13, 158, 106, 0.08);
}

[data-theme="light"] .graph-node--safety {
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.04);
}
[data-theme="light"] .graph-node--safety:hover,
[data-theme="light"] .graph-node--safety.graph-node--active {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.06);
}
[data-theme="light"] .graph-node--safety .graph-node-icon { color: #dc2626; }

[data-theme="light"] .graph-node--optimization {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.04);
}
[data-theme="light"] .graph-node--optimization:hover,
[data-theme="light"] .graph-node--optimization.graph-node--active {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.06);
}

[data-theme="light"] .graph-tooltip {
  background: var(--bg-deep);
  border-color: rgba(13, 158, 106, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(13, 158, 106, 0.06);
}

/* --- Smooth transition for theme switch --- */
[data-theme="light"],
[data-theme="light"] body,
[data-theme="light"] .nav,
[data-theme="light"] .hero,
[data-theme="light"] .stats,
[data-theme="light"] .about,
[data-theme="light"] .features,
[data-theme="light"] .platform,
[data-theme="light"] .technology,
[data-theme="light"] .tech-teaser,
[data-theme="light"] .use-cases,
[data-theme="light"] .advantages,
[data-theme="light"] .how-it-works,
[data-theme="light"] .cta-section,
[data-theme="light"] .footer,
[data-theme="light"] .architecture,
[data-theme="light"] .tech-hero {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
