/* ============================================================
   FRONTEND ODYSSEY — style.css
   The Life of a Developer
   ============================================================ */

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
  --bg-primary: #080b14;
  --bg-secondary: #0d1225;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  --text-primary: #f0f4ff;
  --text-secondary: #8892b0;
  --text-muted: #4a5568;

  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-pink: #ec4899;

  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f64f59 100%);
  --gradient-learning: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --gradient-debug: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-deadline: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
  --gradient-success: linear-gradient(135deg, #56ccf2 0%, #2f80ed 50%, #a18cd1 100%);

  --glow-blue: 0 0 30px rgba(59, 130, 246, 0.35);
  --glow-purple: 0 0 30px rgba(139, 92, 246, 0.35);
  --glow-green: 0 0 30px rgba(16, 185, 129, 0.35);
  --glow-red: 0 0 30px rgba(239, 68, 68, 0.35);

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;

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

  --transition-fast: 0.2s ease;
  --transition-base: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);

  --nav-height: 72px;
  --section-pad: 120px;
}

/* Light mode overrides */
body.light-mode {
  --bg-primary: #f0f4ff;
  --bg-secondary: #e8eeff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
  line-height: 1.6;
}

::selection { background: rgba(139, 92, 246, 0.35); }

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

/* ============================================================
   PAGE LOADER
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #04060f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden { opacity: 0; visibility: hidden; }

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #8b5cf6;
  animation: spin 1.2s linear infinite;
}

.loader-ring--2 {
  width: 110px;
  height: 110px;
  border-top-color: #3b82f6;
  animation-duration: 1.8s;
  animation-direction: reverse;
}

.loader-ring--3 {
  width: 140px;
  height: 140px;
  border-top-color: #06b6d4;
  animation-duration: 2.4s;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  margin-top: 90px;
  font-family: var(--font-mono);
  color: var(--accent-purple);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.dots { animation: dotsPulse 1.5s infinite; }
@keyframes dotsPulse {
  0%, 100% { opacity: 1; }
  50%        { opacity: 0; }
}

.loader-bar-wrap {
  width: 220px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-hero);
  border-radius: 4px;
  transition: width 0.1s linear;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(8, 11, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

body.light-mode #navbar {
  background: rgba(240, 244, 255, 0.7);
}

#navbar.scrolled {
  background: rgba(8, 11, 20, 0.9);
  box-shadow: 0 4px 40px rgba(0,0,0,0.3);
}

.nav-brand .nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-controls { display: flex; align-items: center; gap: 16px; }

#moodToggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 40px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

#moodToggle:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ============================================================
   GLOBAL PROGRESS BAR
   ============================================================ */
#progressBarWrap {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 999;
  height: 3px;
  background: rgba(255,255,255,0.05);
}

#progressBar {
  height: 100%;
  width: 0%;
  background: var(--gradient-hero);
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.7);
}

#progressLabel {
  position: absolute;
  right: 12px;
  top: 6px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--accent-purple);
  opacity: 0.8;
}

/* ============================================================
   SECTIONS — BASE
   ============================================================ */
.section {
  position: relative;
  min-height: 100vh;
  padding: var(--section-pad) 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.chapter-tag {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 40px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-purple);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.chapter-tag--red { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: var(--accent-red); }
.chapter-tag--orange { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); color: var(--accent-orange); }
.chapter-tag--green { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: var(--accent-green); }

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-sub {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: inherit;
}

.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.4);
}

.btn--primary:hover {
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

.btn--ghost {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn--danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 24px rgba(239,68,68,0.4);
}

.btn--danger:hover {
  box-shadow: 0 8px 32px rgba(239,68,68,0.6);
  transform: translateY(-2px);
}

.btn--success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 24px rgba(16,185,129,0.4);
}

.btn--success:hover {
  box-shadow: 0 8px 32px rgba(16,185,129,0.6);
  transform: translateY(-2px);
}

.btn--sm { padding: 9px 18px; font-size: 0.8rem; }

/* ============================================================
   GLASSMORPHISM CARDS
   ============================================================ */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 28px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}

/* ============================================================
   BLOBS & PARTICLES
   ============================================================ */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob--1 { width: 500px; height: 500px; background: #6366f1; top: -10%; left: -15%; animation-delay: 0s; }
.blob--2 { width: 400px; height: 400px; background: #8b5cf6; top: 50%; right: -10%; animation-delay: -3s; }
.blob--3 { width: 350px; height: 350px; background: #3b82f6; bottom: -5%; left: 30%; animation-delay: -6s; }
.blob--4 { width: 450px; height: 450px; background: #06b6d4; top: -5%; left: 60%; animation-delay: -2s; }
.blob--5 { width: 380px; height: 380px; background: #10b981; bottom: 5%; left: -8%; animation-delay: -4s; }
.blob--6 { width: 500px; height: 500px; background: #2f80ed; top: -10%; right: -10%; animation-delay: 0s; }
.blob--7 { width: 400px; height: 400px; background: #56ccf2; bottom: 0; left: -5%; animation-delay: -5s; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: particleFloat linear infinite;
  pointer-events: none;
}

@keyframes particleFloat {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-20px) rotate(360deg); opacity: 0; }
}

/* ============================================================
   SECTION 1: HERO
   ============================================================ */
.section--hero {
  padding-top: calc(var(--nav-height) + 80px);
  min-height: 100vh;
  background: var(--bg-primary);
  align-items: flex-start;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  border-radius: 40px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: fit-content;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  min-height: 1.2em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
}

.hero-sub em { color: var(--text-primary); font-style: normal; font-weight: 500; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 8px;
  flex-wrap: wrap;
}

.stat {}
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
}

.stat-label { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.05em; }

/* Floating code card */
.floating-code {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-45%);
  background: rgba(13, 18, 37, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 0;
  width: 320px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4), var(--glow-purple);
  animation: codeFloat 6s ease-in-out infinite;
  z-index: 2;
}

body.light-mode .floating-code {
  background: rgba(255,255,255,0.85);
  border-color: rgba(99, 102, 241, 0.2);
}

@keyframes codeFloat {
  0%, 100% { transform: translateY(-45%) rotate(-1deg); }
  50%       { transform: translateY(-50%) rotate(0.5deg); }
}

.code-badge {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.floating-code pre {
  padding: 20px;
  margin: 0;
  overflow: hidden;
}

.floating-code code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.c-kw  { color: #c792ea; }
.c-fn  { color: #82aaff; }
.c-str { color: #c3e88d; }
.c-num { color: #f78c6c; }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
  animation: fadeInUp 1s 2s both;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: 1; }
  50%       { transform: rotate(45deg) translate(5px,5px); opacity: 0.5; }
}

/* ============================================================
   SECTION 2: LEARNING
   ============================================================ */
.section--learning {
  background: var(--bg-primary);
}

.learning-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

/* Terminal */
.terminal-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0e1a;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  font-family: var(--font-mono);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: #111827;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.t-red    { background: #ef4444; }
.t-yellow { background: #f59e0b; }
.t-green  { background: #10b981; }

.t-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 8px;
  letter-spacing: 0.06em;
}

.terminal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.t-line {
  font-size: 0.82rem;
  line-height: 1.5;
}

.t-prompt { color: #10b981; margin-right: 8px; }
.t-cmd    { color: #e2e8f0; }
.t-out    { color: #94a3b8; padding-left: 20px; }
.t-error  { color: #f87171; padding-left: 20px; }
.t-cursor { padding-top: 4px; }

.blink-cursor { animation: blink 1s step-end infinite; color: #10b981; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Learning cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.glass-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.glass-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.glass-card code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-orange);
  background: rgba(245,158,11,0.1);
  padding: 1px 5px;
  border-radius: 4px;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.skill-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-learning);
  border-radius: 4px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Progress track */
.progress-track {
  margin-top: 60px;
  text-align: center;
}

.progress-track h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.progress-track h3 span {
  color: var(--accent-purple);
  font-weight: 700;
}

.dev-progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  max-width: 700px;
  margin: 0 auto 12px;
}

.dev-progress-fill {
  height: 100%;
  background: var(--gradient-hero);
  border-radius: 8px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dev-progress-glow {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  filter: blur(6px);
  opacity: 0.5;
  border-radius: 8px;
}

.progress-milestones {
  display: flex;
  justify-content: space-between;
  max-width: 700px;
  margin: 0 auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ============================================================
   SECTION 3: DEBUGGING
   ============================================================ */
.section--debugging {
  background: #050710;
}

body.light-mode .section--debugging {
  background: #0f1225;
}

/* Glitch background */
.glitch-bg {
  position: absolute;
  inset: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 0, 100, 0.015) 2px,
      rgba(255, 0, 100, 0.015) 4px
    );
  pointer-events: none;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

/* Glitch text */
.glitch-text {
  position: relative;
  display: inline-block;
  color: var(--text-primary);
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  color: #f5576c;
  animation: glitch1 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch-text::after {
  color: #06b6d4;
  animation: glitch2 3s infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
  0%, 100% { transform: translate(0); opacity: 0; }
  5%        { transform: translate(-3px, 1px); opacity: 0.8; }
  10%       { transform: translate(3px, -1px); opacity: 0.8; }
  15%       { transform: translate(0); opacity: 0; }
}

@keyframes glitch2 {
  0%, 100% { transform: translate(0); opacity: 0; }
  20%       { transform: translate(3px, 0); opacity: 0.7; }
  25%       { transform: translate(-3px, 0); opacity: 0.7; }
  30%       { transform: translate(0); opacity: 0; }
}

/* Debug arena layout */
.debug-arena {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Error console */
.error-console {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #08060f;
  border: 1px solid rgba(239,68,68,0.2);
  box-shadow: 0 0 40px rgba(239,68,68,0.08);
}

.ec-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(239,68,68,0.08);
  border-bottom: 1px solid rgba(239,68,68,0.15);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #f87171;
}

.ec-icon { font-size: 1rem; }

.ec-clear {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.72rem;
  transition: color var(--transition-fast);
}

.ec-clear:hover { color: #f87171; }

.ec-body { padding: 12px 0; max-height: 280px; overflow-y: auto; }

.ec-row {
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--transition-fast);
  cursor: default;
}

.ec-row:hover { background: rgba(255,255,255,0.03); }
.ec-error { color: #fca5a5; }
.ec-warn  { color: #fcd34d; }
.ec-info  { color: #93c5fd; }

/* Bug panel */
.bug-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bug-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; animation: bugWiggle 2s ease-in-out infinite; }

@keyframes bugWiggle {
  0%, 100% { transform: rotate(-5deg); }
  50%       { transform: rotate(5deg); }
}

.bug-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }

.bug-meta { display: flex; gap: 8px; margin-bottom: 20px; }

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.badge--red    { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge--yellow { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }

.debug-quote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.coffee-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.coffee-icon { font-size: 2.5rem; animation: coffeeWobble 2s ease-in-out infinite; }

@keyframes coffeeWobble {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(-8deg); }
  75%       { transform: rotate(8deg); }
}

.coffee-info { flex: 1; }
.coffee-info h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }

.coffee-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

#coffeeCount {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-orange);
}

.coffee-unit { color: var(--text-muted); font-size: 0.8rem; }

/* Glitch shapes */
.glitch-shape {
  position: absolute;
  pointer-events: none;
  animation: glitchShape 4s ease-in-out infinite;
}

.gs--1 {
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f5576c, transparent);
  top: 25%;
  right: 0;
  filter: blur(1px);
}

.gs--2 {
  width: 150px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #06b6d4, transparent);
  bottom: 35%;
  left: 0;
  filter: blur(1px);
  animation-delay: -2s;
}

@keyframes glitchShape {
  0%, 100% { opacity: 0; transform: scaleX(0); }
  10%, 30%  { opacity: 1; transform: scaleX(1); }
  40%       { opacity: 0; transform: scaleX(0); }
}

/* ============================================================
   SECTION 4: DEADLINE
   ============================================================ */
.section--deadline {
  background: #080510;
}

body.light-mode .section--deadline { background: #100b1f; }

.pulse-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(245,158,11,0.06) 0%, transparent 70%);
  animation: pulseBg 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseBg {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.05); }
}

.deadline-arena {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Countdown */
.countdown-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.countdown-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cd-num {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-orange);
  text-shadow: 0 0 20px rgba(245,158,11,0.5);
  line-height: 1;
  min-width: 80px;
  text-align: center;
}

.cd-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cd-sep {
  font-size: 2.5rem;
  color: var(--accent-orange);
  opacity: 0.5;
  animation: sepBlink 1s step-end infinite;
  margin-bottom: 20px;
}

@keyframes sepBlink { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.1; } }

/* Panic meter */
.panic-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.panic-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
}

.panic-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease, background 0.5s ease;
  width: 20%;
  background: var(--accent-green);
}

#panicLabel { font-size: 0.85rem; min-width: 90px; }

/* Checklist */
.checklist-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  transition: all var(--transition-fast);
}

.check-item.done {
  color: var(--text-muted);
  text-decoration: line-through;
}

.check-item.just-done {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  animation: checkPop 0.4s ease;
}

@keyframes checkPop {
  0%  { transform: scale(0.97); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.check-box { font-size: 1rem; flex-shrink: 0; }

/* Alert strip ticker */
.alert-strip {
  margin-top: 60px;
  overflow: hidden;
  padding: 14px 0;
  background: rgba(245,158,11,0.06);
  border-top: 1px solid rgba(245,158,11,0.15);
  border-bottom: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--radius-sm);
}

.alert-ticker {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  animation: ticker 20s linear infinite;
}

.alert-ticker span {
  font-size: 0.82rem;
  color: var(--accent-orange);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   SECTION 5: SUCCESS
   ============================================================ */
.section--success {
  background: var(--bg-primary);
}

.success-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(16,185,129,0.06) 0%, transparent 65%);
  pointer-events: none;
}

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

.success-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* Achievement cards */
.achievements {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  width: 180px;
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
  cursor: default;
}

.achievement-card:hover {
  border-color: rgba(16,185,129,0.3);
  box-shadow: 0 0 30px rgba(16,185,129,0.12), 0 20px 50px rgba(0,0,0,0.2);
  transform: translateY(-6px) rotate(-1deg);
}

.ach-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }

.achievement-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.achievement-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Dev card */
.dev-card {
  max-width: 440px;
  width: 100%;
  text-align: center;
  border-color: rgba(16,185,129,0.2);
  box-shadow: 0 0 60px rgba(16,185,129,0.08);
}

.dev-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-success);
  opacity: 0.07;
  pointer-events: none;
}

.dev-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-success);
  animation: avatarSpin 6s linear infinite;
}

@keyframes avatarSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  z-index: 1;
}

.dev-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.dev-tagline {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.dev-skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.skill-tag {
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--accent-green);
  font-size: 0.75rem;
  font-weight: 500;
}

.dev-final-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.success-fill {
  background: var(--gradient-success) !important;
  box-shadow: 0 0 20px rgba(56,202,125,0.4);
}

.success-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-green);
  min-width: 42px;
}

/* ============================================================
   CONFETTI
   ============================================================ */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9000;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalPop {
  0%   { transform: scale(0.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-icon { font-size: 3rem; margin-bottom: 16px; display: block; }

.modal-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-progress {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.modal-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-hero);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.modal-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
  min-height: 2em;
}

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(22, 28, 45, 0.95);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 8000;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  white-space: nowrap;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.reveal-up    { transform: translateY(50px); }
.reveal-left  { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding: 100px 40px; }
  .floating-code { right: 30px; width: 280px; }
  .learning-grid { grid-template-columns: 1fr; }
  .debug-arena { grid-template-columns: 1fr; }
  .deadline-arena { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-pad: 80px; }

  .section { padding: var(--section-pad) 24px; }

  #navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  #moodToggle .toggle-label { display: none; }

  .floating-code { display: none; }

  .hero-content { max-width: 100%; }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 1.4rem; }

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

  .countdown-display { gap: 8px; }
  .cd-num { font-size: 2rem; min-width: 60px; }

  .achievements { gap: 12px; }
  .achievement-card { width: 140px; padding: 18px 14px; }

  .dev-final-progress { flex-direction: column; align-items: flex-start; gap: 8px; }

  .deadline-arena,
  .debug-arena,
  .learning-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .section-header h2 { font-size: 1.8rem; }
  .hero-cta { flex-direction: column; width: 100%; }
  .btn { justify-content: center; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .achievements { gap: 10px; }
  .achievement-card { width: calc(50% - 5px); }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.7); }
