/* Hallmark · genre: atmospheric · theme: Midnight · paper: dark · display: modern-sans · accent: bioluminescent-violet
 * Pre-emit critique: P5 H5 E5 S5 R5 V5
 * Responsive targets verified: 320px, 375px, 414px, 768px, 1200px
 */

:root {
  /* Surface & Canvas Tokens (Midnight Palette) */
  --bg-void: #06070a;
  --bg-base: #0a0c12;
  --bg-surface: #11141f;
  --bg-surface-elevated: #181b2a;
  --bg-glass: rgba(17, 20, 31, 0.72);
  --bg-glass-hover: rgba(24, 27, 42, 0.88);

  /* Border & Stroke Tokens */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-muted: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(129, 140, 248, 0.55);
  --border-glow: rgba(129, 140, 248, 0.25);

  /* Bioluminescent Accent Tokens */
  --accent-violet: #818cf8;
  --accent-indigo: #6366f1;
  --accent-cyan: #22d3ee;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Accent Glows */
  --glow-violet: 0 0 35px -5px rgba(129, 140, 248, 0.4);
  --glow-cyan: 0 0 35px -5px rgba(34, 211, 238, 0.4);
  --glow-emerald: 0 0 35px -5px rgba(16, 185, 129, 0.4);

  /* Typography Tokens */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing Scale (4pt base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* CSS Reset & Non-Negotiable Mobile Protections */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip; /* Strict Hallmark mobile anti-scroll */
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

::selection {
  background: var(--accent-violet);
  color: var(--bg-void);
}

/* Background Interactive Particle Mesh */
#canvas-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

/* Atmospheric Glow Gradients */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: transform 0.8s var(--ease-spring);
}
.glow-orb-1 {
  top: -150px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
}
.glow-orb-2 {
  top: 45%;
  right: -100px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
}
.glow-orb-3 {
  bottom: 5%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-emerald) 0%, transparent 70%);
}

/* Container */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   NAVIGATION (Hallmark N5 Floating Pill + N13 Inline ⌘K)
   ========================================================================== */
.site-header {
  position: fixed;
  top: var(--space-4);
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-4);
  pointer-events: none;
}

.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-5);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s var(--ease-spring);
}

.nav-pill:hover {
  border-color: var(--border-focus);
  box-shadow: 0 14px 40px -10px rgba(129, 140, 248, 0.25);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  display: inline-block;
  animation: pulseDot 2.4s infinite ease-in-out;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-1);
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cmd-badge {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cmd-badge:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
}

/* ==========================================================================
   HERO SECTION (Atmospheric Kinetic Typography + Live Telemetry)
   ========================================================================== */
.hero-section {
  min-height: 94vh;
  padding-top: calc(var(--space-24) + var(--space-6));
  padding-bottom: var(--space-16);
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  max-width: 900px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.9rem;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-violet);
  margin-bottom: var(--space-6);
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: var(--space-6);
  color: #ffffff;
  overflow-wrap: anywhere;
  min-width: 0;
}

.hero-title .name-highlight {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-violet) 70%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 680px;
  line-height: 1.65;
  margin-bottom: var(--space-8);
}

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

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-12);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: var(--glow-violet);
  transition: all 0.3s var(--ease-spring);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px -2px rgba(129, 140, 248, 0.65);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  border: 1px solid var(--border-muted);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

/* Hero Stats Bar */
.hero-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stat-value .stat-unit {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ==========================================================================
   PROJECTS SECTION (Deep Interactive Showcase)
   ========================================================================== */
.section {
  padding: var(--space-20) 0;
  position: relative;
}

.section-header {
  margin-bottom: var(--space-12);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-top: var(--space-3);
}

/* Project Grid & Deep Interactive Cards */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.project-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card:hover {
  border-color: var(--border-focus);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8), 0 0 30px -5px var(--card-glow, rgba(129, 140, 248, 0.25));
}

.card-mouse-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--card-accent, rgba(129, 140, 248, 0.18)) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .card-mouse-glow {
  opacity: 1;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: center;
}

@media (max-width: 860px) {
  .project-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }
}

.project-meta-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.project-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-hardware { background: rgba(129, 140, 248, 0.15); color: var(--accent-violet); border: 1px solid rgba(129, 140, 248, 0.3); }
.badge-fintech { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-audio { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-security { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-guide { background: rgba(34, 211, 238, 0.15); color: var(--accent-cyan); border: 1px solid rgba(34, 211, 238, 0.3); }

.project-name {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.project-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.btn-card-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--btn-accent, var(--accent-indigo));
  color: #ffffff;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-card-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.btn-card-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-card-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-muted);
  background: rgba(255, 255, 255, 0.09);
}

/* ==========================================================================
   INTERACTIVE PROJECT DEMO WIDGETS
   ========================================================================== */
.demo-widget-container {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
}

/* 1. Andromote Gyro Visualizer */
.gyro-stage {
  perspective: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gyro-phone-model {
  width: 140px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 2px solid var(--accent-violet);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  cursor: grab;
}

.gyro-telemetry {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.gyro-telemetry span strong {
  color: var(--accent-cyan);
}

/* 2. Green Journal Candlestick / Profit Streamer */
.market-streamer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.market-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.market-pnl {
  color: var(--accent-emerald);
  font-weight: 700;
}

.candles-canvas {
  width: 100%;
  height: 100px;
  background: rgba(16, 185, 129, 0.02);
  border-radius: var(--radius-sm);
}

/* 3. Thuddington Audio Waveform Visualizer */
.waveform-stage {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.waveform-canvas {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.03);
}

.waveform-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.waveform-trigger-btn:hover {
  background: rgba(245, 158, 11, 0.22);
}

/* 4. Interlude Defender Scanner */
.scanner-stage {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.scanner-radar {
  height: 60px;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.04);
  border: 1px solid rgba(244, 63, 94, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
}

.scanner-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(244, 63, 94, 0.45), transparent);
}

/* 5. Redmi Note 7 Pro Flash Shell */
.shell-stage {
  background: #000000;
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a7f3d0;
  line-height: 1.5;
}

.shell-prompt {
  color: var(--accent-cyan);
}

/* ==========================================================================
   TECHNICAL SKILLS / STACK SECTION
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

.skill-category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: all 0.3s ease;
}

.skill-category-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.skill-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(129, 140, 248, 0.1);
  color: var(--accent-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.skill-cat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.skill-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.skill-items li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.skill-items li::before {
  content: '▹';
  color: var(--accent-cyan);
}

/* ==========================================================================
   CONTACT SECTION & FOOTER (Hallmark Ft5 Statement)
   ========================================================================== */
.contact-card-banner {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.5) 0%, rgba(17, 20, 31, 0.8) 100%);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-headline {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: var(--space-3);
}

.contact-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-8);
}

.contact-button-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.site-footer {
  padding: var(--space-12) 0 var(--space-16);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-20);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.footer-domain {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* ==========================================================================
   INTERACTIVE MODAL / DRAWER (Deep Project Specs)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 7, 10, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  overflow-y: auto;
  padding: var(--space-8);
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), var(--glow-violet);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s var(--ease-spring);
}

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

.modal-close-btn {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.modal-tabs {
  display: flex;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-2);
}

.modal-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn.active {
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
}

.modal-tab-pane {
  display: none;
  line-height: 1.7;
}

.modal-tab-pane.active {
  display: block;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--accent-emerald);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transform: translateY(30px);
  opacity: 0;
}

/* Command Palette Modal */
.cmd-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #ffffff;
  width: 100%;
  font-family: var(--font-sans);
}

.cmd-list {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  padding: var(--space-2);
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.cmd-item:hover, .cmd-item.selected {
  background: rgba(129, 140, 248, 0.15);
  color: #ffffff;
}

/* Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile Navigation & Hero Refinements */
@media (max-width: 640px) {
  .site-header {
    top: var(--space-2);
    padding: 0 var(--space-2);
  }

  .nav-pill {
    gap: var(--space-2);
    padding: 0.35rem var(--space-3);
    width: 100%;
    max-width: 360px;
    justify-content: space-between;
  }

  .nav-brand {
    font-size: 0.85rem;
  }

  .nav-brand .brand-domain {
    display: none;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    font-size: 0.75rem;
    padding: 0.25rem 0.45rem;
  }

  .cmd-badge {
    display: none;
  }

  .hero-section {
    padding-top: calc(var(--space-20) + var(--space-4));
    padding-bottom: var(--space-10);
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .hero-cta-group a,
  .hero-cta-group button {
    justify-content: center;
    width: 100%;
  }

  .hero-stats-strip {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .project-card {
    padding: var(--space-5);
  }
}
