/* ==========================================================================
   LEARN WITH KRU ARM - MODERN DARK CYBER DESIGN SYSTEM
   Clean, Elegant, Structured & Distinctly Framed Layout
   Typography: Kanit, Prompt, JetBrains Mono
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&family=Prompt:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Core Dark Theme */
  --bg-primary: #080c14;
  --bg-secondary: #0d1424;
  --bg-surface: #121b2f;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-card-hover: rgba(22, 33, 58, 0.85);
  --bg-glass: rgba(13, 20, 36, 0.65);
  --glass-blur: blur(16px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.15);
  
  /* Cyber Accents */
  --tech-blue: #3b82f6;
  --tech-blue-hover: #2563eb;
  --tech-cyan: #06b6d4;
  --tech-indigo: #6366f1;
  --tech-purple: #8b5cf6;
  --tech-emerald: #10b981;
  --tech-amber: #f59e0b;
  --tech-rose: #f43f5e;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --grad-cyan-blue: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-amber: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  
  /* Distinct Borders & Frames */
  --border-frame: 1px solid rgba(255, 255, 255, 0.1);
  --border-focus: 1px solid rgba(59, 130, 246, 0.45);
  --border-glow: 1px solid rgba(6, 182, 212, 0.35);
  --glow-subtle: 0 4px 20px rgba(59, 130, 246, 0.15);
  --glow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.12);
  --shadow-deep: 0 20px 45px -12px rgba(0, 0, 0, 0.7);
  
  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-highlight: #60a5fa;
  
  /* Layout & Geometry */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --nav-height: 76px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   LIGHT MODE VARIABLES (WOW FEATURE)
   ========================================================================== */
:root[data-theme="light"] {
  /* Core Light Theme */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(0, 0, 0, 0.05);
  
  /* Distinct Borders & Frames - Light */
  --border-frame: 1px solid rgba(0, 0, 0, 0.08);
  --border-focus: 1px solid rgba(59, 130, 246, 0.35);
  --border-glow: 1px solid rgba(6, 182, 212, 0.25);
  --glow-subtle: 0 4px 20px rgba(59, 130, 246, 0.1);
  --glow-card: 0 12px 24px -8px rgba(0, 0, 0, 0.1), 0 0 15px rgba(59, 130, 246, 0.05);
  --shadow-deep: 0 15px 35px -10px rgba(0, 0, 0, 0.1);
  
  /* Typography Colors - Light */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-highlight: #2563eb;
}

/* Light Mode Overrides for Hardcoded Colors */
:root[data-theme="light"] body {
  color-scheme: light;
}

:root[data-theme="light"] h1, 
:root[data-theme="light"] h2, 
:root[data-theme="light"] h3, 
:root[data-theme="light"] h4, 
:root[data-theme="light"] h5, 
:root[data-theme="light"] h6,
:root[data-theme="light"] .brand-title,
:root[data-theme="light"] .hero-title,
:root[data-theme="light"] .stat-number,
:root[data-theme="light"] .hero-profile-info h3,
:root[data-theme="light"] .hero-tech-text h4,
:root[data-theme="light"] .course-title,
:root[data-theme="light"] .portfolio-title,
:root[data-theme="light"] .nav-menu .nav-link:hover,
:root[data-theme="light"] .nav-menu .nav-link.active,
:root[data-theme="light"] .mobile-menu-btn,
:root[data-theme="light"] .timeline-content h3 {
  color: var(--text-main) !important;
}

:root[data-theme="light"] .section-alt {
  background: var(--bg-secondary) !important;
}

:root[data-theme="light"] .hero-showcase-frame,
:root[data-theme="light"] .navbar,
:root[data-theme="light"] .course-card,
:root[data-theme="light"] .portfolio-card,
:root[data-theme="light"] .timeline-card,
:root[data-theme="light"] .hero-stats .stat-item,
:root[data-theme="light"] .pa-round-card,
:root[data-theme="light"] .modal-dialog,
:root[data-theme="light"] .game-tab,
:root[data-theme="light"] .circuit-btn {
  background: var(--bg-surface) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

:root[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

:root[data-theme="light"] .hero-tech-text span,
:root[data-theme="light"] .course-desc,
:root[data-theme="light"] .portfolio-desc,
:root[data-theme="light"] .timeline-content p {
  color: var(--text-muted) !important;
}

:root[data-theme="light"] .nav-menu .nav-link {
  color: var(--text-dim);
}

:root[data-theme="light"] .filter-btn {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
}
:root[data-theme="light"] .filter-btn.active {
  background: var(--tech-cyan) !important;
  color: #fff !important;
  border-color: var(--tech-cyan) !important;
}

:root[data-theme="light"] .portfolio-meta-row span,
:root[data-theme="light"] .portfolio-footer .text-dim {
  color: var(--text-dim) !important;
}

/* ==========================================================================
   TIMELINE (WOW FEATURE)
   ========================================================================== */
.timeline-section {
  position: relative;
  padding: 60px 0;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background: var(--tech-blue);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  opacity: 0; /* for animation */
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--bg-primary);
  border: 4px solid var(--tech-cyan);
  top: 24px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 10px var(--tech-cyan);
}

.timeline-item.right::after {
  left: -10px;
}

.timeline-content {
  padding: 24px 30px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  position: relative;
  border-radius: var(--radius-md);
  border: var(--border-frame);
  box-shadow: var(--glow-card);
  transition: var(--transition-bounce);
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
}

.timeline-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
}

.timeline-year {
  display: inline-block;
  padding: 4px 12px;
  background: var(--grad-primary);
  color: white;
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.timeline-content h3 {
  color: var(--text-main);
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media screen and (max-width: 768px) {
  .timeline::after {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item.left::after, .timeline-item.right::after {
    left: 21px;
  }
  .timeline-item.right {
    left: 0%;
  }
}

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

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

body {
  font-family: 'Prompt', 'Kanit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Subtle background grid pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

.site-content {
  position: relative;
  z-index: 2;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

.font-code {
  font-family: 'JetBrains Mono', monospace;
}

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-blue { color: var(--tech-blue); }
.text-cyan { color: var(--tech-cyan); }
.text-indigo { color: var(--tech-indigo); }
.text-purple { color: var(--tech-purple); }
.text-green { color: var(--tech-emerald); }
.text-amber { color: var(--tech-amber); }
.text-rose { color: var(--tech-rose); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 85px 0;
  position: relative;
}

.section-alt {
  background: rgba(13, 20, 36, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tech-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.6;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatY {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@keyframes neonGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(6, 182, 212, 0.4), 0 0 20px rgba(59, 130, 246, 0.2); }
  50% { box-shadow: 0 0 25px rgba(6, 182, 212, 0.8), 0 0 45px rgba(59, 130, 246, 0.5); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-float {
  animation: floatY 4s ease-in-out infinite;
}

.animate-neon {
  animation: neonGlow 3s ease-in-out infinite;
}

/* ==========================================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: 'Kanit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--tech-blue);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.btn-indigo:hover {
  background: var(--tech-indigo);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.btn-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.btn-emerald:hover {
  background: var(--tech-emerald);
  color: #064e3b;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   NAVBAR (STICKY GLASS)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(8, 12, 20, 0.96);
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.65rem;
  color: var(--tech-cyan);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  transition: var(--transition-smooth);
  position: relative;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--tech-blue);
  transition: var(--transition-smooth);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.sound-toggle-btn.active {
  color: var(--tech-cyan);
  border-color: rgba(6, 182, 212, 0.4);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION (STRUCTURED & DISTINCTLY FRAMED)
   ========================================================================== */
.hero-section {
  min-height: 88vh;
  padding-top: calc(var(--nav-height) + 35px);
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero-badge .status-dot {
  width: 7px;
  height: 7px;
  background: var(--tech-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.hero-badge-text {
  font-size: 0.78rem;
  color: var(--tech-cyan);
  font-weight: 600;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-item {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-item:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(22, 33, 58, 0.85);
  transform: translateY(-2px);
}

.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Kanit', sans-serif;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* HERO SHOWCASE FRAME (RIGHT SIDE) */
.hero-showcase-frame {
  background: rgba(13, 20, 36, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-showcase-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
}

.hero-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.hero-profile-avatar-box {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.hero-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--tech-cyan);
}

.hero-profile-orbit {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(6, 182, 212, 0.6);
  animation: rotateOrbit 12s linear infinite;
}

@keyframes rotateOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-profile-info h3 {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 2px;
}

.hero-profile-info p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.hero-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
}

.hero-status-tag span:first-child {
  animation: pulseGlow 2s infinite;
}

/* 2x2 Tech Feature Cards Grid */
.hero-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-tech-card {
  background: var(--bg-card);
  border: var(--border-frame);
  border-radius: var(--radius-md);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: var(--transition-bounce);
  backdrop-filter: var(--glass-blur);
}

.hero-tech-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.45);
  transform: translateY(-6px);
  box-shadow: var(--glow-card);
}

.hero-tech-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero-tech-card.tech-blue .hero-tech-icon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.hero-tech-card.tech-cyan .hero-tech-icon { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.hero-tech-card.tech-indigo .hero-tech-icon { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
.hero-tech-card.tech-emerald .hero-tech-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.hero-tech-text h4 {
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 2px;
}

.hero-tech-text span {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   COURSES SECTION
   ========================================================================== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.course-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition-bounce);
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.course-card.theme-blue::before { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.course-card.theme-purple::before { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.course-card.theme-emerald::before { background: linear-gradient(90deg, #10b981, #3b82f6); }

.course-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(59, 130, 246, 0.3);
  animation: neonGlow 2s infinite alternate;
}

.course-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.course-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--tech-cyan);
}

.course-badge {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.course-grade {
  font-size: 0.78rem;
  color: var(--tech-cyan);
  margin-bottom: 6px;
  font-weight: 600;
}

.course-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #fff;
}

.course-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.course-objectives {
  background: rgba(13, 20, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.course-objectives strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.course-materials-count {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ==========================================================================
   EDU GAMES HUB
   ========================================================================== */
.games-hub {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: rgba(13, 20, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.games-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.game-tab:hover {
  background: rgba(22, 33, 58, 0.9);
  border-color: rgba(59, 130, 246, 0.3);
}

.game-tab.active {
  background: rgba(30, 48, 86, 0.95);
  border-color: var(--tech-cyan);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.game-tab-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--tech-cyan);
  flex-shrink: 0;
}

.game-tab-info h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 2px;
}

.game-tab-info span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.game-display {
  background: rgba(9, 13, 22, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 420px;
}

.game-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.game-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.game-stats-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-stat-chip {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.game-intro-screen, .game-over-screen {
  text-align: center;
  padding: 40px 20px;
}

.game-intro-screen h3, .game-over-screen h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #fff;
}

.game-intro-screen p, .game-over-screen p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* Question & Code challenge in Quiz */
.code-challenge-box {
  background: #090d16;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #38bdf8;
  white-space: pre-wrap;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-opt-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-main);
  font-family: 'Prompt', sans-serif;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quiz-opt-btn:hover {
  background: rgba(30, 48, 86, 0.85);
  border-color: var(--tech-blue);
  transform: translateY(-2px);
}

/* Circuit Gate Simulator */
.circuit-canvas-box {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.circuit-switches-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.circuit-btn {
  padding: 10px 24px;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #1e293b;
  color: #fff;
  transition: var(--transition-smooth);
}

.circuit-btn.active {
  background: #059669;
  border-color: #34d399;
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
}

/* Memory Match Grid */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 540px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.3s;
  color: var(--tech-cyan);
}

.memory-card.flipped {
  background: #0f172a;
  border-color: var(--tech-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.memory-card.matched {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.score-submit-box {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 380px;
  margin: 16px auto 0;
}

/* ==========================================================================
   PORTFOLIO SECTION
   ========================================================================== */
.portfolio-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  border-radius: var(--radius-lg);
}

.filter-btn, .filter-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Prompt', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover, .filter-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active, .filter-tab.active {
  background: var(--tech-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.portfolio-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.portfolio-nav-arrows {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(8px);
}

.portfolio-indicator-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--tech-cyan);
  min-width: 52px;
  text-align: center;
  font-weight: 600;
  user-select: none;
}

.portfolio-arrow-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--tech-cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.85rem;
}

.portfolio-arrow-btn:hover:not(:disabled) {
  background: var(--tech-blue);
  color: #fff;
  border-color: var(--tech-cyan);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
  transform: scale(1.08);
}

.portfolio-arrow-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.portfolio-carousel-wrapper {
  position: relative;
  width: 100%;
}

.portfolio-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 12px 4px 24px 4px;
}

.portfolio-carousel::-webkit-scrollbar {
  display: none;
}

.portfolio-carousel .portfolio-card {
  min-width: 320px;
  max-width: 335px;
  flex: 0 0 320px;
  scroll-snap-align: start;
  height: auto;
}

.portfolio-side-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 16, 30, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.2);
}

.portfolio-side-btn.prev {
  left: -20px;
}

.portfolio-side-btn.next {
  right: -20px;
}

.portfolio-side-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--tech-blue), var(--tech-indigo));
  border-color: var(--tech-cyan);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
  transform: translateY(-50%) scale(1.12);
}

.portfolio-side-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .portfolio-side-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  .portfolio-carousel .portfolio-card {
    min-width: 280px;
    max-width: 295px;
    flex: 0 0 280px;
  }
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portfolio-card {
  background: var(--bg-card);
  border: var(--border-frame);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-bounce);
  backdrop-filter: var(--glass-blur);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: var(--glow-card);
}

.portfolio-img-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  cursor: pointer;
  overflow: hidden;
  background: #090d16;
}

.portfolio-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.portfolio-card:hover .portfolio-img-wrap img {
  transform: scale(1.06);
}

.portfolio-category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--tech-cyan);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.portfolio-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.portfolio-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.portfolio-title {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.35;
}

.portfolio-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.portfolio-highlight {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.75rem;
  color: #93c5fd;
  margin-bottom: 14px;
}

.portfolio-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   PA EVALUATION SECTION (DISTINCT ROUNDS & POPUPS)
   ========================================================================== */
.pa-rounds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pa-round-card {
  background: var(--bg-card);
  border: var(--border-frame);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-bounce);
  backdrop-filter: var(--glass-blur);
}

.pa-round-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.pa-round-card.round-cyan::before { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.pa-round-card.round-indigo::before { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.pa-round-card.round-emerald::before { background: linear-gradient(90deg, #10b981, #06b6d4); }
.pa-round-card.round-amber::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }

.pa-round-card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: var(--glow-card);
}

.pa-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pa-round-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.15);
  color: var(--tech-cyan);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.pa-round-year {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.pa-round-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #fff;
}

.pa-round-status-pill {
  display: inline-block;
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.pa-round-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.pa-round-features {
  list-style: none;
  margin-bottom: 18px;
  padding: 0;
}

.pa-round-features li {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pa-round-features li i {
  color: var(--tech-cyan);
  font-size: 0.75rem;
}

.pa-round-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* PA Popup Sub-Aspect Items */
.pa-popup-item {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  transition: var(--transition-smooth);
}

.pa-popup-item:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(20, 31, 56, 0.9);
}

.pa-popup-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================
   ABOUT TEACHER SECTION
   ========================================== */
.about-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xl);
  padding: 36px;
}

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: center;
}

.about-avatar-frame {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
}

.about-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--tech-cyan);
}

.about-name {
  font-size: 1.8rem;
  color: #fff;
  margin: 6px 0 4px;
}

.about-role {
  font-size: 1rem;
  color: var(--tech-cyan);
  font-weight: 500;
  margin-bottom: 4px;
}

.about-school {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.about-bio {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.skill-chip {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.about-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  color: var(--tech-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.contact-item:hover {
  background: var(--tech-blue);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #05080e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.social-link:hover {
  background: var(--tech-blue);
  color: #fff;
  border-color: var(--tech-blue);
}

.footer-col-title {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--tech-cyan);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   MODALS & VIEWERS (FRAMED & CLEAN)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-dialog {
  background: #0d1424;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 1400px;
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(59, 130, 246, 0.2);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
}

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

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Material List Items in Modal */
.material-item {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition-smooth);
}

.material-item:hover {
  background: rgba(22, 33, 58, 0.95);
  border-color: rgba(59, 130, 246, 0.35);
}

.material-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
}

.file-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.file-type-icon.ext-pdf { background: rgba(244, 63, 94, 0.15); color: #f43f5e; border-color: rgba(244, 63, 94, 0.3); }
.file-type-icon.ext-docx, .file-type-icon.ext-doc { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.file-type-icon.ext-zip { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.file-type-icon.ext-ino, .file-type-icon.ext-py { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }

.material-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.material-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Universal Viewer Iframe */
.viewer-container {
  width: 100%;
  height: 100%;
  min-height: 75vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.viewer-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  animation: toastIn 0.3s ease;
}

.toast.success { border-color: #10b981; }
.toast.error { border-color: #ef4444; }

@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pa-rounds-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .games-hub {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-avatar-frame {
    margin: 0 auto 20px;
  }
  .about-skills-list, .about-contact-row {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(8, 12, 20, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
  }
  .nav-menu.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .courses-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .pa-rounds-grid {
    grid-template-columns: 1fr;
  }
  .hero-tech-grid {
    grid-template-columns: 1fr;
  }
  .quiz-options-grid {
    grid-template-columns: 1fr;
  }
  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
