/* ==========================================================================
   SHIVAM RAUT PORTFOLIO - HIGH-CRAFT DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep Obsidian, Cyber Neon, Tactile Glassmorphism, Retro CRT
   ========================================================================== */

:root {
  /* Dynamic Tokens - Modulated by Design Lab */
  --accent-neon: #00ffcc;
  --accent-glow: rgba(0, 255, 204, 0.28);
  --glass-blur: 16px;
  
  /* Core Obsidian Palette */
  --bg-deep: #06080d;
  --bg-surface: rgba(13, 17, 26, 0.72);
  --bg-surface-hover: rgba(22, 29, 44, 0.88);
  --bg-terminal: #070a10;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 255, 204, 0.45);
  --border-purple: rgba(168, 85, 247, 0.4);

  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #ff0055;
  --accent-emerald: #10b981;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-handwriting: 'Caveat', cursive, sans-serif;

  /* Transitions & Shadows */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-neon: 0 0 30px var(--accent-glow);
  --shadow-card: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
}

/* Solar Light Theme */
body.theme-solar {
  --bg-deep: #f6f4ee;
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-hover: rgba(255, 255, 255, 0.98);
  --bg-terminal: #111827;
  --border-subtle: rgba(15, 23, 42, 0.12);
  --border-glow: rgba(0, 135, 102, 0.4);
  --accent-neon: #008766;
  --accent-cyan: #0284c7;
  --accent-glow: rgba(0, 135, 102, 0.22);
  --accent-emerald: #059669;
  --text-pure: #0f172a;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;
  color-scheme: light;
}
body.theme-solar .cyber-grid {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}
body.theme-solar .system-telemetry-bar {
  background: rgba(246, 244, 238, 0.92);
  border-bottom: 1px solid var(--border-subtle);
}
body.theme-solar .telemetry-inner .mono-tag {
  color: #334155;
}
body.theme-solar .status-indicator.live {
  background-color: #008766;
  box-shadow: 0 0 8px rgba(0, 135, 102, 0.6);
}
body.theme-solar .telemetry-action {
  color: #008766;
  font-weight: 700;
}
body.theme-solar .telemetry-action:hover {
  color: #005c45;
}
body.theme-solar .navbar {
  background: rgba(246, 244, 238, 0.92);
  border-bottom: 1px solid var(--border-subtle);
}
body.theme-solar .nav-menu {
  background: rgba(246, 244, 238, 0.98);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}
body.theme-solar .nav-item {
  color: var(--text-pure);
  border-bottom-color: var(--border-subtle);
}
body.theme-solar .nav-brand-logo {
  background: #0c111d;
  border-color: rgba(0, 135, 102, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
body.theme-solar .nav-brand-role {
  color: #008766;
  opacity: 1;
  font-weight: 700;
}
body.theme-solar .pixel-badge {
  background: rgba(0, 135, 102, 0.08);
  border-color: #008766;
  color: #008766;
  font-weight: 700;
}
body.theme-solar .pixel-badge.secondary {
  background: rgba(168, 85, 247, 0.08);
  border-color: #9333ea;
  color: #9333ea;
}
body.theme-solar .highlight-gtm {
  background: linear-gradient(135deg, #008766 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.theme-solar .stat-num {
  color: #008766;
}
body.theme-solar .persona-switcher {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
}
body.theme-solar .persona-btn {
  color: var(--text-main);
}
body.theme-solar .persona-btn.active {
  background: #008766;
  color: #ffffff;
  border-color: #008766;
  box-shadow: 0 2px 10px rgba(0, 135, 102, 0.25);
}
body.theme-solar .badge-award {
  background: rgba(0, 135, 102, 0.08);
  border-color: #008766;
  color: #008766;
}
body.theme-solar .card-visual-tag {
  background: rgba(0, 135, 102, 0.1);
  border-color: rgba(0, 135, 102, 0.3);
  color: #008766;
}
body.theme-solar .filter-pill.active {
  background: #008766;
  color: #ffffff;
  border-color: #008766;
  box-shadow: 0 2px 10px rgba(0, 135, 102, 0.25);
}
body.theme-solar .btn-cyber {
  background: #008766;
  color: #ffffff;
  border-color: #008766;
}
body.theme-solar .btn-cyber:hover {
  background: #006b52;
  border-color: #006b52;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 135, 102, 0.35);
}
body.theme-solar .sig-name,
body.theme-solar .mono-num {
  color: #008766;
}
body.theme-solar .btn-icon {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text-main);
}
body.theme-solar .btn-icon:hover {
  background: rgba(0, 180, 140, 0.1);
  border-color: #008766;
  color: #008766;
  box-shadow: 0 0 15px rgba(0, 180, 140, 0.25);
}
body.theme-solar .contact-pill {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text-main);
}
body.theme-solar .contact-pill:hover {
  border-color: #008766;
  color: #008766;
  background: rgba(0, 180, 140, 0.06);
}
body.theme-solar .footer {
  background: #edeae2;
  border-top-color: rgba(15, 23, 42, 0.12);
}
body.theme-solar .footer-code {
  color: var(--text-pure);
}
body.theme-solar .footer-socials a {
  color: var(--text-muted);
}
body.theme-solar .footer-socials a:hover {
  color: #008766;
}
body.theme-solar .card-info,
body.theme-solar .lab-card,
body.theme-solar .pillar-card,
body.theme-solar .cyber-portrait-card {
  box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
  background-color: var(--bg-deep);
  color-scheme: dark;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Cyber Matrix Grid & Scanline Background */
.cyber-grid {
  position: fixed;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.cyber-grid.hidden {
  opacity: 0;
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.scanline-overlay.hidden {
  opacity: 0;
}

.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s ease, background 0.4s ease;
  opacity: 0.45;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Telemetry Header Strip */
.system-telemetry-bar {
  background: rgba(8, 12, 19, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 0;
  position: relative;
  z-index: 100;
  letter-spacing: 0.05em;
}
.telemetry-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.telemetry-left, .telemetry-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.telemetry-divider {
  color: var(--text-dim);
}
.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-neon);
  box-shadow: 0 0 10px var(--accent-neon);
  animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.mono-tag {
  color: var(--text-muted);
}
.telemetry-action {
  color: var(--accent-neon);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}
.telemetry-action:hover {
  text-shadow: 0 0 8px var(--accent-neon);
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(6, 8, 13, 0.85);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
}
.nav-brand-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 16px var(--accent-glow), inset 0 0 10px rgba(0, 255, 204, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
  overflow: hidden;
}
.nav-brand-logo:hover {
  box-shadow: 0 0 26px var(--accent-neon), inset 0 0 14px rgba(0, 255, 204, 0.18);
  transform: translateY(-1px) scale(1.05);
  border-color: var(--accent-neon);
}
.brand-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.brand-logo-svg .logo-s-path {
  stroke: #00f5d4;
}
.brand-logo-svg .logo-r-path {
  stroke: #ffffff;
}
.brand-logo-svg .logo-bracket {
  stroke: #00f5d4;
}
.brand-logo-svg .logo-pulse-circle {
  fill: #00f5d4;
  animation: pulseDot 2s infinite ease-in-out;
  transform-origin: 33.5px 6.5px;
}
.logo-pulse-circle {
  animation: pulseDot 2s infinite ease-in-out;
  transform-origin: 33.5px 6.5px;
}
.nav-brand-logo .logo-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-neon);
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 0 10px var(--accent-neon);
}
.nav-brand-logo .logo-dot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-neon);
  box-shadow: 0 0 8px var(--accent-neon);
  animation: pulseDot 2s infinite ease-in-out;
}
.nav-brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-brand-name {
  font-family: var(--font-handwriting);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: 0.01em;
  line-height: 1;
  display: inline-block;
  transform: rotate(-1.5deg);
  transform-origin: left center;
  transition: transform 0.25s ease, color 0.25s ease;
}
.nav-brand:hover .nav-brand-name {
  transform: rotate(0deg) scale(1.05);
  color: var(--accent-neon);
}
.hero-human-name {
  font-family: var(--font-handwriting);
  font-size: 1.55em;
  font-weight: 700;
  color: var(--text-pure);
  display: inline-block;
  transform: rotate(-2deg);
  margin: 0 4px;
  vertical-align: -0.06em;
  text-shadow: 0 0 12px var(--accent-glow);
}
.nav-brand-role {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent-neon);
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.brand-bracket { color: var(--accent-neon); font-family: var(--font-mono); }
.brand-code { color: var(--accent-neon); }

/* Persona Switcher Pill */
.persona-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}
.persona-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--ease-spring) 0.25s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.persona-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.06);
}
.persona-btn.active {
  background: var(--accent-neon);
  color: #000000;
  font-weight: 800;
  box-shadow: 0 0 16px var(--accent-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-item {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}
.nav-item:hover {
  color: var(--accent-neon);
}
.nav-item-cta {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 6px 16px;
  border-radius: 6px;
  color: var(--text-pure);
  font-weight: 700;
}
.nav-item-cta:hover {
  border-color: var(--accent-neon);
  box-shadow: 0 0 14px var(--accent-glow);
}
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-pure);
  font-size: 1.3rem;
  cursor: pointer;
}

/* Pixel Badges */
.pixel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(0, 255, 204, 0.1);
  color: var(--accent-neon);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 12px var(--accent-glow);
}
.pixel-badge.secondary {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
  border-color: var(--border-purple);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

/* Hero Section */
.hero-section {
  padding: 70px 0 60px 0;
  position: relative;
}
.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.hero-heading {
  font-family: var(--font-display);
  font-size: 3.1rem;
  line-height: 1.14;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.highlight-gtm {
  background: linear-gradient(135deg, var(--accent-neon) 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.highlight-design {
  background: linear-gradient(135deg, #f43f5e 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.highlight-ai {
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 620px;
}
.hero-desc strong {
  color: var(--text-pure);
}

/* Hero Stats Strip */
.hero-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 35px;
}
.stat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  backdrop-filter: blur(var(--glass-blur));
  transition: transform 0.2s, border-color 0.2s;
}
.stat-pill:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-neon);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-num.stat-rank {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  line-height: 1.3;
}

/* Button Styles */
.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-socials-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--ease-spring) 0.25s;
  border: 1px solid transparent;
}
.btn-cyber {
  background: var(--accent-neon);
  color: #06080d;
  box-shadow: 0 0 25px var(--accent-glow);
}
.btn-cyber:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px var(--accent-glow);
  background: #ffffff;
}
.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-pure);
  backdrop-filter: blur(var(--glass-blur));
}
.btn-glass:hover {
  border-color: var(--accent-neon);
  color: var(--accent-neon);
  background: rgba(0, 255, 204, 0.08);
}
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 1.1rem;
}
.btn-icon:hover {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  box-shadow: 0 0 15px var(--accent-glow);
}
.brand-svg-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.15em;
  fill: currentColor;
  flex-shrink: 0;
}

/* Cyber Portrait HUD Card */
.cyber-portrait-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
}
.cyber-portrait-card:hover {
  border-color: var(--accent-neon);
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-2px);
}
.portrait-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-subtle);
}
.hud-tag {
  color: var(--accent-neon);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.hud-coords {
  color: var(--text-dim);
}
.dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}
.portrait-image-wrapper {
  position: relative;
  width: 100%;
  height: 230px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-subtle);
}
.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transition: transform 0.5s var(--ease-spring);
}
.cyber-portrait-card:hover .portrait-photo {
  transform: scale(1.05);
}
.portrait-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.5;
}
.hud-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-neon);
  pointer-events: none;
  z-index: 2;
}
.hud-corner.top-left { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.hud-corner.top-right { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.hud-corner.bottom-left { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.hud-corner.bottom-right { bottom: 6px; right: 6px; border-left: none; border-top: none; }
.portrait-hud-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s var(--ease-spring);
}
.theme-toggle-btn:hover {
  border-color: var(--accent-neon);
  color: var(--accent-neon);
  box-shadow: 0 0 14px var(--accent-glow);
}

/* Cyber Window & Hero ASCII Art Terminal */
.cyber-window {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 30px rgba(0, 0, 0, 0.8);
  font-family: var(--font-mono);
  position: relative;
}
.cyber-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-neon), transparent);
}
.window-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.window-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.window-title {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.win-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s;
}
.win-btn:hover { color: var(--accent-neon); }

.window-body {
  padding: 18px;
}
.ascii-art-hero {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--accent-neon);
  margin-bottom: 18px;
  white-space: pre;
  overflow-x: auto;
  text-shadow: 0 0 8px var(--accent-glow);
}
.terminal-quick-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.cmd-prompt { color: var(--accent-neon); font-weight: 700; }
.cmd-text { color: var(--text-main); }
.mono-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.terminal-output {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
}
.output-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.badge-mini {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
}
.badge-mini.success { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-mini.accent { background: rgba(0, 255, 204, 0.2); color: var(--accent-neon); }
.badge-mini.warning { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

/* Section Styling */
.section,
section[id] {
  padding: 85px 0;
  position: relative;
  scroll-margin-top: 80px;
}
.section-badge-center {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.section-heading {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.section-subheading {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 50px auto;
  line-height: 1.6;
}
.text-center { text-align: center; }

/* Design Lab Grid */
.design-lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.lab-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 24px;
  backdrop-filter: blur(var(--glass-blur));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.lab-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}
.lab-card-header {
  margin-bottom: 12px;
}
.mono-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-neon);
  letter-spacing: 0.1em;
}
.lab-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-pure);
  margin-top: 4px;
}
.lab-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.palette-swatches {
  display: flex;
  gap: 12px;
}
.swatch-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 2px solid transparent;
  background-color: var(--c);
  cursor: pointer;
  box-shadow: 0 0 12px var(--c);
  transition: transform 0.2s, border-color 0.2s;
}
.swatch-btn:hover, .swatch-btn.active {
  transform: scale(1.15);
  border-color: #ffffff;
}
.slider-control {
  display: flex;
  align-items: center;
  gap: 14px;
}
.slider-control input[type="range"] {
  flex: 1;
  accent-color: var(--accent-neon);
}
.slider-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-neon);
  min-width: 44px;
}
.toggle-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.toggle-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-pill.active {
  background: rgba(0, 255, 204, 0.15);
  border-color: var(--accent-neon);
  color: var(--accent-neon);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Builder's Ethos Banner */
.ethos-banner {
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.05), rgba(168, 85, 247, 0.05));
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 35px;
  backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -15px var(--accent-glow);
}
.ethos-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-neon), var(--accent-purple));
}
.ethos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-subtle);
}
.ethos-quote {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-pure);
  font-style: italic;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.ethos-signature {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sig-name {
  font-family: var(--font-handwriting);
  font-weight: 700;
  color: var(--accent-neon);
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  display: inline-block;
  transform: rotate(-1deg);
  line-height: 1;
}
.sig-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Philosophy Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 26px 22px;
  backdrop-filter: blur(var(--glass-blur));
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s, border-color 0.25s;
}
.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px -10px var(--accent-glow);
}
.pillar-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: rgba(0, 255, 204, 0.1);
  color: var(--accent-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.pillar-index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.pillar-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-pure);
  margin-bottom: 10px;
}
.pillar-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}
.pillar-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-neon);
  font-weight: 700;
}

/* Projects Section */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--ease-spring) 0.2s;
}
.filter-pill:hover {
  color: var(--text-pure);
  border-color: var(--border-glow);
}
.filter-pill.active {
  background: var(--accent-neon);
  color: #06080d;
  font-weight: 800;
  border-color: var(--accent-neon);
  box-shadow: 0 0 16px var(--accent-glow);
}

.projects-master-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.project-master-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 30px;
  backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, border-color 0.25s;
}
.project-master-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
}
.card-glow-edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  bottom: 0;
  background: var(--accent-neon);
  opacity: 0.8;
  box-shadow: 0 0 15px var(--accent-neon);
}
.card-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.badge-award {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-award.secondary {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.35);
}
.badge-award.live {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}
.mono-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.card-content-split {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: center;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.project-subtitle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-neon);
  font-weight: 600;
  margin-bottom: 16px;
}
.project-pitch {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}
.project-pitch strong {
  color: var(--text-pure);
}
.project-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.project-tech-badges span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.78rem;
}
.btn-live {
  background: #10b981;
  color: #06080d;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}
.btn-live:hover {
  background: #ffffff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.card-ascii-preview {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}
.mini-ascii {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--accent-neon);
  text-shadow: 0 0 6px var(--accent-glow);
  white-space: pre;
}
.card-visual-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-align: right;
}

/* Interactive Command Terminal */
.terminal-card {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 900px;
  margin: 0 auto;
}
.terminal-screen {
  padding: 24px;
  min-height: 240px;
  max-height: 380px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}
.term-ascii {
  color: var(--accent-neon);
  font-size: 0.68rem;
  line-height: 1.2;
  margin-bottom: 14px;
  text-shadow: 0 0 8px var(--accent-glow);
}
.term-line {
  margin-bottom: 8px;
  color: var(--text-muted);
}
.term-line.cmd {
  color: var(--text-pure);
  font-weight: 700;
}
.term-line.res {
  color: var(--accent-neon);
}
.term-line .highlight {
  color: var(--accent-neon);
  font-weight: 800;
}
.terminal-input-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 16px;
  gap: 10px;
}
.term-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-neon);
  font-weight: 700;
}
.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.term-submit-btn {
  background: rgba(0, 255, 204, 0.15);
  border: 1px solid var(--border-glow);
  color: var(--accent-neon);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.term-submit-btn:hover {
  background: var(--accent-neon);
  color: #000000;
}

/* Contact Section */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 50px 30px;
  backdrop-filter: blur(var(--glass-blur));
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.contact-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 10px;
}
.contact-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 35px;
}
.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
#emailPill {
  grid-column: span 2;
}
.contact-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  transition: var(--ease-spring) 0.25s;
  position: relative;
  min-width: 0;
}
.contact-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-pill:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  background: rgba(0, 255, 204, 0.05);
  color: var(--accent-neon);
}
.contact-pill-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}
.contact-pill-email .email-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  transition: color 0.2s ease;
}
.contact-pill-email .email-link:hover {
  color: var(--accent-neon);
}
.copy-btn {
  margin-left: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.95rem;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.copy-btn:hover {
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  background: rgba(0, 255, 204, 0.1);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 8, 13, 0.95);
  padding: 30px 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-code {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-pure);
  margin-right: 14px;
}
.footer-sub {
  color: var(--text-dim);
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.footer-socials a {
  color: var(--text-dim);
  font-size: 1.15rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
}
.footer-socials a:hover {
  color: var(--accent-neon);
  transform: translateY(-2px);
}

/* Floating Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-glow);
  color: var(--accent-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px var(--accent-glow);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--accent-neon);
  color: #06080d;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 24px var(--accent-neon);
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 82px;
  right: 24px;
  background: rgba(6, 8, 13, 0.95);
  border: 1px solid var(--accent-neon);
  box-shadow: 0 0 25px var(--accent-glow);
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 12px 20px;
  border-radius: 6px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s var(--ease-spring);
  pointer-events: none;
}
.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================================
   RESPONSIVE SYSTEM — 5-breakpoint device optimization
   Wide ≥1440 | Desktop ≥1280 | Laptop ≤1024 | Tablet ≤768 | Mobile ≤480
   ============================================================ */

/* Wide screen — let content breathe more */
@media (min-width: 1440px) {
  .container { max-width: 1380px; }
  .hero-heading { font-size: 3.6rem; }
  .section-heading { font-size: 2.8rem; }
  .hero-layout { gap: 60px; }
}

/* Laptop / small desktop */
@media (max-width: 1024px) {
  .nav-brand-role { display: none; }
  .persona-btn .persona-label { display: none; } /* icon only on medium screens */
  .persona-btn { padding: 8px 12px; gap: 0; }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: left;
  }
  .hero-terminal-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }
  .cyber-portrait-card { margin-bottom: 0; }
  .design-lab-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .card-content-split { grid-template-columns: 1fr; }
  .card-ascii-preview { display: none; }
  .terminal-card { max-width: 100%; }
}

/* ============================================================
   TABLET & MOBILE RESPONSIVE ENGINE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  html { scroll-padding-top: 68px; }
  .section, section[id] { padding: clamp(44px, 8vw, 60px) 0; scroll-margin-top: 68px; }
  .container { padding: 0 16px; width: 100%; max-width: 100%; }

  /* Telemetry Bar — Centered Minimal Ticker */
  .system-telemetry-bar { padding: 5px 0; font-size: 0.7rem; }
  .telemetry-inner { justify-content: center; }
  .telemetry-left { justify-content: center; width: 100%; gap: 8px; }
  .telemetry-right { display: none; }
  .telemetry-divider { display: none; }
  #currentPersonaTag { display: none; }

  /* Navbar */
  .navbar { padding: 10px 0; }
  .nav-container { gap: 10px; }
  .nav-brand-role { display: none; }
  .nav-brand-name { font-size: 1.45rem; }
  .persona-switcher { display: none; }

  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-pure);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .nav-mobile-toggle:hover,
  .nav-mobile-toggle:active {
    border-color: var(--accent-neon);
    color: var(--accent-neon);
    background: rgba(0, 255, 204, 0.08);
  }

  /* Slide-down Sheet Menu */
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 8, 13, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 16px 18px 24px;
    border-bottom: 2px solid var(--accent-neon);
    gap: 2px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    z-index: 200;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: menuSlideDown 0.25s var(--ease-spring);
  }
  @keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .nav-menu.open { display: flex; }
  .nav-item {
    padding: 13px 8px;
    font-size: 0.98rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    transition: padding-left 0.2s ease, color 0.2s ease;
  }
  .nav-item:hover, .nav-item:active {
    padding-left: 14px;
    color: var(--accent-neon);
  }
  .nav-item:last-child { border-bottom: none; }
  .nav-item-cta {
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
    margin-top: 10px;
    min-height: 46px;
    background: var(--accent-neon);
    color: #06080d;
    font-weight: 700;
    justify-content: center;
  }
  .theme-toggle-btn {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
    min-height: 44px;
    border-radius: 8px;
  }

  /* Hero Section */
  .hero-section { padding: clamp(36px, 8vw, 55px) 0 30px; }
  .hero-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-heading {
    font-size: clamp(1.85rem, 6.8vw, 2.45rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    word-break: break-word;
  }
  .hero-desc {
    font-size: clamp(0.92rem, 3.8vw, 1.02rem);
    line-height: 1.6;
    margin-bottom: 24px;
  }
  .hero-stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 24px;
  }
  .stat-pill {
    padding: 10px 12px;
    border-radius: 8px;
    min-width: 0;
  }
  .stat-num {
    font-size: clamp(1.15rem, 5vw, 1.35rem);
    margin-bottom: 2px;
  }
  .stat-label {
    font-size: 0.68rem;
    line-height: 1.25;
    word-break: normal;
  }
  .badge-row {
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .pixel-badge {
    font-size: 0.68rem;
    padding: 4px 9px;
  }

  /* Hero CTAs — full width main buttons + centered thumb-friendly icon row */
  .hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .hero-cta-group > .btn-cyber,
  .hero-cta-group > .btn-glass {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 8px;
    flex: 0 0 auto;
  }
  .hero-socials-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
  }
  .hero-socials-row .btn-icon {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
    border-radius: 8px;
    flex-shrink: 0;
  }

  /* Hero Terminal & Portrait Column */
  .hero-terminal-col { display: block; margin-top: 10px; }
  .cyber-portrait-card { padding: 12px; border-radius: 10px; }
  .portrait-image-wrapper { height: clamp(190px, 45vw, 230px); border-radius: 8px; }
  .cyber-window { margin-top: 14px; border-radius: 10px; }
  .ascii-art-hero {
    font-size: 0.58rem;
    line-height: 1.2;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding-bottom: 6px;
  }

  /* Design Lab */
  .design-lab-grid { grid-template-columns: 1fr; gap: 14px; }
  .lab-card { padding: 18px 16px; border-radius: 10px; }
  .palette-swatches { gap: 10px; justify-content: center; flex-wrap: wrap; }
  .swatch-btn { width: 38px; height: 38px; }
  .toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .toggle-pill { width: 100%; min-height: 44px; padding: 10px 8px; text-align: center; font-size: 0.8rem; border-radius: 6px; }

  /* Philosophy & Pillars */
  .pillars-grid { grid-template-columns: 1fr; gap: 12px; }
  .ethos-banner { padding: 18px 16px; border-radius: 10px; }
  .ethos-quote { font-size: 0.94rem; line-height: 1.6; }
  .pillar-card { padding: 18px 16px; border-radius: 10px; }
  .section-heading { font-size: clamp(1.65rem, 5.5vw, 2.1rem); }
  .section-subheading { font-size: 0.92rem; margin-bottom: 28px; }

  /* Flagship Projects */
  .project-filters { gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 22px; }
  .filter-pill { font-size: 0.74rem; padding: 7px 12px; min-height: 38px; border-radius: 20px; }
  .project-master-card { padding: 18px 14px; margin-bottom: 18px; border-radius: 12px; }
  .project-title { font-size: clamp(1.3rem, 4.8vw, 1.55rem); }
  .card-content-split { grid-template-columns: 1fr; }
  .card-ascii-preview { display: none; }
  .project-pitch { font-size: 0.9rem; }
  .project-tech-badges { gap: 5px; flex-wrap: wrap; }
  .project-tech-badges span { font-size: 0.68rem; padding: 3px 8px; }
  .project-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
  }
  .project-links .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-size: 0.84rem;
    border-radius: 8px;
  }

  /* Interactive Terminal */
  .terminal-screen { padding: 14px 12px; min-height: 180px; max-height: 280px; font-size: 0.78rem; }
  .term-ascii { display: none; }
  .terminal-input-bar { padding: 8px 10px; gap: 6px; }
  .term-input { font-size: 16px; min-width: 0; padding: 8px 10px; } /* Prevents iOS auto-zoom */
  .term-submit-btn { font-size: 0.75rem; padding: 8px 12px; min-height: 40px; border-radius: 6px; flex-shrink: 0; }

  /* Contact Section */
  .contact-box { padding: 24px 14px; border-radius: 12px; }
  .contact-title { font-size: clamp(1.5rem, 5.5vw, 1.85rem); }
  .contact-sub { font-size: 0.88rem; margin-bottom: 22px; }
  .contact-methods { display: flex; flex-direction: column; gap: 10px; width: 100%; }
  #emailPill { grid-column: span 1; }
  .contact-pill {
    width: 100%;
    font-size: 0.82rem;
    padding: 12px 14px;
    min-height: 48px;
    border-radius: 8px;
  }
  .contact-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
  }
  .copy-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  /* Footer */
  .footer-layout { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .footer-left { text-align: center; }
  .footer-code { font-size: 0.9rem; margin-right: 0; display: block; margin-bottom: 4px; }
  .footer-sub { font-size: 0.76rem; max-width: 320px; }
  .footer-socials { justify-content: center; gap: 16px; margin: 6px 0; }
  .footer-socials a { font-size: 1.25rem; min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }

  /* Floating UI Elements */
  .back-to-top { width: 42px; height: 42px; bottom: 16px; right: 16px; }
  .toast-notification {
    bottom: 68px;
    left: 14px;
    right: 14px;
    font-size: 0.8rem;
    padding: 10px 14px;
    max-width: calc(100vw - 28px);
    margin: 0 auto;
    text-align: center;
  }
}

/* ============================================================
   COMPACT SMARTPHONES (≤360px — iPhone SE, Galaxy Z Flip, Fold)
   ============================================================ */
@media (max-width: 360px) {
  .container { padding: 0 10px; }
  .nav-brand-logo { width: 34px; height: 34px; }
  .nav-brand-name { font-size: 1.3rem; }
  .nav-mobile-toggle { width: 36px; height: 36px; font-size: 1rem; }

  /* Hero */
  .hero-heading { font-size: 1.62rem; }
  .hero-desc { font-size: 0.88rem; }
  .hero-stats-strip { gap: 6px; }
  .stat-pill { padding: 8px 8px; }
  .stat-num { font-size: 1.05rem; }
  .stat-label { font-size: 0.62rem; }

  /* Social Icons */
  .hero-socials-row { gap: 6px; }
  .hero-socials-row .btn-icon { width: 38px; height: 38px; font-size: 0.95rem; }
  .portrait-image-wrapper { height: 170px; }

  /* Buttons & Pills */
  .filter-pill { font-size: 0.68rem; padding: 5px 8px; min-height: 34px; }
  .contact-pill { padding: 10px 10px; font-size: 0.75rem; min-height: 44px; }
  .copy-btn { width: 30px; height: 30px; font-size: 0.85rem; margin-left: 6px; }
  .swatch-btn { width: 34px; height: 34px; }
  .toggle-pill { font-size: 0.75rem; padding: 8px 4px; }
}

/* ============================================================
   ULTRA-COMPACT PHONES (≤320px — Original iPhone SE, Tiny Covers)
   ============================================================ */
@media (max-width: 320px) {
  .container { padding: 0 8px; }
  .hero-heading { font-size: 1.48rem; }
  .hero-socials-row .btn-icon { width: 35px; height: 35px; font-size: 0.9rem; }
  .hero-socials-row { gap: 5px; }
  .stat-pill { padding: 7px 6px; }
  .stat-num { font-size: 0.98rem; }
  .stat-label { font-size: 0.6rem; }
}

/* ============================================================
   MOBILE LANDSCAPE ORIENTATION (Short Height Devices)
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .section, section[id] { padding: 36px 0; }
  .hero-section { padding: 30px 0 20px; }
  .nav-menu { max-height: calc(100vh - 50px); overflow-y: auto; }
  .portrait-image-wrapper { height: 160px; }
  .terminal-screen { min-height: 140px; max-height: 200px; }
}
