/* ============================================
   RETRO ARCADE PORTFOLIO — Steven Kang
   "Clean retro-arcade" design system — Light Theme
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
  /* Color Palette – Light Arcade inspired */
  --bg-deep:        #f5f3f0;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f0edfa;
  --accent-cyan:    #3a6cf4;
  --accent-magenta: #d4376e;
  --accent-gold:    #d4940a;
  --accent-green:   #1a9e42;
  --text-primary:   #1a1a2e;
  --text-secondary: #4a4a68;
  --text-muted:     #8888a4;
  --border-glow:    rgba(58, 108, 244, 0.18);

  /* Typography */
  --font-pixel: 'Press Start 2P', monospace;
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --container-max:  1100px;
  --section-py:     100px;
  --gap:            24px;

  /* Transitions */
  --fast:   0.15s ease;
  --medium: 0.35s ease;
  --slow:   0.7s  ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-color: var(--accent-cyan) var(--bg-deep);
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 4px;
}

/* ---- CRT Scanline Overlay ---- */
#crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.02) 0px,
    rgba(0, 0, 0, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.4;
}

/* Subtle screen flicker */
@keyframes crt-flicker {
  0%   { opacity: 0.4; }
  5%   { opacity: 0.38; }
  10%  { opacity: 0.4; }
  15%  { opacity: 0.42; }
  20%  { opacity: 0.4; }
  100% { opacity: 0.4; }
}
#crt-overlay {
  animation: crt-flicker 8s infinite;
}

/* ---- Cursor-Following Pixel Sprite ---- */
#pixel-sprite {
  position: fixed;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 9998;
  image-rendering: pixelated;
  transition: transform 0.08s linear;
  display: none; /* shown by JS on desktop */
}

/* ---- Utility ---- */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-label {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-magenta);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--accent-cyan);
  margin-bottom: 48px;
  line-height: 1.8;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

/* ---- Scroll-Triggered Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--slow), transform var(--slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--slow), transform var(--slow);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--slow), transform var(--slow);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children */
.stagger-children .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   1. LANDING / HERO
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 40px 20px;
  background: var(--bg-surface);
}

/* Decorative grid background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 108, 244, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 108, 244, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black, transparent);
}

.hero-name {
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  color: var(--text-primary);
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(58, 108, 244, 0.15);
}

.hero-subtitle {
  font-family: var(--font-pixel);
  font-size: clamp(0.5rem, 1.5vw, 0.7rem);
  color: var(--accent-gold);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 500px;
}

.hero-tagline .cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* PRESS START button */
.press-start-btn {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: #ffffff;
  background: var(--accent-cyan);
  border: none;
  padding: 16px 40px;
  cursor: pointer;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all var(--fast);
  animation: pulse-glow 2s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(58, 108, 244, 0.25), 0 0 30px rgba(58, 108, 244, 0.08); }
  50%      { box-shadow: 0 4px 30px rgba(58, 108, 244, 0.4), 0 0 50px rgba(58, 108, 244, 0.12); }
}

.press-start-btn:hover {
  background: var(--accent-gold);
  color: #ffffff;
  transform: scale(1.05);
  animation: none;
  box-shadow: 0 4px 25px rgba(212, 148, 10, 0.35);
}

.press-start-btn:active {
  transform: scale(0.96) translateY(2px);
}

.press-start-btn:focus-visible {
  outline: 3px solid var(--accent-magenta);
  outline-offset: 4px;
}

/* "Insert coin" hint below the button */
.insert-coin {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-muted);
  margin-top: 20px;
  animation: blink 1.5s step-end infinite;
}

/* Sound toggle */
.sound-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sound-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
}

.sound-toggle:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* ============================================
   NAV BAR (fixed, appears after scroll)
   ============================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  padding: 0 20px;
  transform: translateY(-100%);
  transition: transform var(--medium);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

#navbar.visible {
  transform: translateY(0);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent-cyan);
  text-decoration: none;
}

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

.nav-links a {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
  transition: color var(--fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--medium);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
}

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

.nav-links a:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--accent-cyan);
  transition: all var(--fast);
}

/* ============================================
   2. ABOUT SECTION
   ============================================ */
#about {
  background: var(--bg-deep);
}

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

.about-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  transition: all var(--fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-box:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(58, 108, 244, 0.1);
  transform: translateY(-2px);
}

.stat-value {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: var(--accent-gold);
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Terminal-style decorative box on right */
.about-terminal {
  background: #1e1e2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  font-family: 'Fira Code', 'SF Mono', monospace;
  font-size: 0.85rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.terminal-header {
  background: #2a2a3e;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green  { background: #28c840; }

.terminal-body {
  padding: 20px;
  line-height: 2;
  color: #b0b4c8;
}

.terminal-body .prompt {
  color: #39ff14;
}

.terminal-body .cmd {
  color: #66d9ef;
}

.terminal-body .output {
  color: #8888a4;
  padding-left: 16px;
}

/* ============================================
   3. EXPERIENCE — Level Select
   ============================================ */
#experience {
  background: var(--bg-surface);
}

.level-select-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.level-card {
  background: var(--bg-card);
  border: 2px solid rgba(58, 108, 244, 0.1);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--medium);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.level-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-cyan);
  opacity: 0;
  transition: opacity var(--fast);
}

.level-card:hover {
  border-color: rgba(58, 108, 244, 0.3);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(58, 108, 244, 0.08);
}

.level-card:hover::before {
  opacity: 1;
}

.level-card:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.level-card.expanded {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 24px rgba(58, 108, 244, 0.1);
}

.level-card.expanded::before {
  opacity: 1;
}

/* Level card header */
.level-header {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.level-number {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: #ffffff;
  background: var(--accent-cyan);
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.level-card.complete .level-number {
  background: var(--accent-green);
}

.level-info {
  flex: 1;
  min-width: 0;
}

.level-role {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.level-org {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.level-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.level-date {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.level-status {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
}

.level-status.current {
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.level-status.complete {
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.level-expand-icon {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform var(--medium);
  flex-shrink: 0;
}

.level-card.expanded .level-expand-icon {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

/* Level card details (expandable) */
.level-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  padding: 0 28px;
  border-top: 0px solid transparent;
}

.level-card.expanded .level-details {
  max-height: 600px;
  padding: 0 28px 24px;
  border-top: 1px solid var(--border-glow);
}

.level-details ul {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}

.level-details li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.level-details li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 0.9rem;
}

.level-details .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tech-tag {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  padding: 4px 10px;
  background: rgba(58, 108, 244, 0.06);
  color: var(--accent-cyan);
  border: 1px solid rgba(58, 108, 244, 0.18);
  border-radius: 3px;
}

.level-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--accent-magenta);
  text-decoration: none;
  transition: color var(--fast);
}

.level-link:hover {
  color: var(--accent-gold);
}

/* ============================================
   4. SKILLS — Inventory / Stat Screen
   ============================================ */
#skills {
  background: var(--bg-deep);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  padding: 28px;
  transition: all var(--medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.skill-category:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 24px rgba(58, 108, 244, 0.1);
  transform: translateY(-2px);
}

.skill-category-title {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent-gold);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-category-icon {
  font-size: 1rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-name {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-xp {
  color: var(--accent-cyan);
  font-size: 0.4rem;
}

.skill-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.skill-bar-fill {
  height: 100%;
  border-radius: 6px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.skill-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 6px,
    rgba(255, 255, 255, 0.2) 6px,
    rgba(255, 255, 255, 0.2) 8px
  );
}

.skill-bar-fill.cyan    { background: linear-gradient(90deg, #3a6cf4, #5b8af7); }
.skill-bar-fill.magenta { background: linear-gradient(90deg, #d4376e, #e0608a); }
.skill-bar-fill.gold    { background: linear-gradient(90deg, #d4940a, #e5ad3a); }
.skill-bar-fill.green   { background: linear-gradient(90deg, #1a9e42, #3dbb62); }

/* Skill bars animated state */
.skill-bar-fill.animate {
  /* width set by JS */
}

/* Tools displayed as inventory grid */
.skill-inventory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.inventory-item {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 8px;
  text-align: center;
  border-radius: 8px;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-secondary);
  transition: all var(--fast);
  cursor: default;
}

.inventory-item:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(58, 108, 244, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58, 108, 244, 0.08);
}

.inventory-item .item-icon {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

/* ============================================
   5. PROJECTS
   ============================================ */
#projects {
  background: var(--bg-surface);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  overflow: hidden;
  transition: all var(--medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(58, 108, 244, 0.1);
}

.project-card-header {
  background: rgba(58, 108, 244, 0.04);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-icon {
  font-size: 1.2rem;
}

.project-name {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent-cyan);
  flex: 1;
}

.project-card-body {
  padding: 24px;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-description li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  list-style: none;
}

.project-description li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-family: var(--font-pixel);
  font-size: 0.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--accent-magenta);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--accent-magenta);
  border-radius: 4px;
  transition: all var(--fast);
}

.project-link:hover {
  background: var(--accent-magenta);
  color: #ffffff;
}

.project-link:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* ============================================
   6. EDUCATION & LEADERSHIP — Badges
   ============================================ */
#education {
  background: var(--bg-deep);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  transition: all var(--medium);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.badge-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 32px rgba(212, 148, 10, 0.1);
  transform: translateY(-4px);
}

.badge-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
}

/* Shield / medal shape behind icon */
.badge-icon::before {
  content: '';
  position: absolute;
  width: 56px;
  height: 56px;
  background: rgba(212, 148, 10, 0.08);
  border: 2px solid rgba(212, 148, 10, 0.2);
  border-radius: 50%;
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.15); opacity: 0.5; }
}

.badge-title {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
  line-height: 1.6;
}

.badge-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.badge-detail {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.badge-stat {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  margin-top: 12px;
  padding: 4px 16px;
  border: 1px solid var(--accent-cyan);
  border-radius: 3px;
}

/* Unlocked flash effect */
.badge-card .unlocked-label {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--accent-green);
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Leadership details */
.badge-details-list {
  text-align: left;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-glow);
}

.badge-details-list li {
  list-style: none;
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.badge-details-list li::before {
  content: '★';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-size: 0.6rem;
}

/* ============================================
   7. INTERESTS — Side Quests
   ============================================ */
#interests {
  background: var(--bg-surface);
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.interest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  transition: all var(--medium);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.interest-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 32px rgba(58, 108, 244, 0.1);
  transform: translateY(-4px);
}

.interest-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: inline-block;
  animation: interest-float 3s ease-in-out infinite;
}

@keyframes interest-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.interest-name {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

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

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.interest-tag {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  padding: 5px 12px;
  background: rgba(58, 108, 244, 0.06);
  color: var(--accent-cyan);
  border: 1px solid rgba(58, 108, 244, 0.18);
  border-radius: 3px;
  transition: all var(--fast);
}

.interest-card:hover .interest-tag {
  border-color: var(--accent-cyan);
  background: rgba(58, 108, 244, 0.1);
}

/* Chipotle order — receipt / terminal style */
.chipotle-card .interest-icon {
  animation-delay: 0.5s;
}

.chipotle-order {
  text-align: left;
  background: #1e1e2e;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.order-item {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: #b0b4c8;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.8;
}

.order-bullet {
  color: var(--accent-green);
  font-size: 0.6rem;
  flex-shrink: 0;
}

/* ============================================
   8. CONTACT
   ============================================ */
#contact {
  background: var(--bg-surface);
  text-align: center;
}

.contact-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 16px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  transition: all var(--fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(58, 108, 244, 0.1);
}

.contact-link:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
}

.contact-link-icon {
  font-size: 1.2rem;
}

/* Footer */
.footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-glow);
}

.footer-text {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-muted);
  line-height: 2;
}

/* ============================================
   EASTER EGG — Konami Code
   ============================================ */
.konami-active {
  animation: rainbow-border 2s linear infinite;
}

@keyframes rainbow-border {
  0%   { border-color: #ff0000; }
  17%  { border-color: #ff8800; }
  33%  { border-color: #ffff00; }
  50%  { border-color: #00ff00; }
  67%  { border-color: #0088ff; }
  83%  { border-color: #8800ff; }
  100% { border-color: #ff0000; }
}

/* Confetti container */
#konami-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  top: -10px;
  animation: confetti-fall 3s ease-in forwards;
}

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

/* Glitch text effect for easter egg */
.glitch-text {
  position: relative;
}

.glitch-text.active {
  animation: glitch 0.5s ease;
}

@keyframes glitch {
  0%   { transform: translate(0); }
  20%  { transform: translate(-3px, 3px); filter: hue-rotate(90deg); }
  40%  { transform: translate(3px, -3px); filter: hue-rotate(180deg); }
  60%  { transform: translate(-2px, -2px); filter: hue-rotate(270deg); }
  80%  { transform: translate(2px, 2px); filter: hue-rotate(360deg); }
  100% { transform: translate(0); filter: hue-rotate(0deg); }
}

/* ============================================
   SCROLLING MARQUEE
   ============================================ */
.marquee-wrapper {
  overflow: hidden;
  padding: 12px 0;
  border-top: 1px solid var(--border-glow);
  border-bottom: 1px solid var(--border-glow);
  margin-bottom: 48px;
  background: rgba(58, 108, 244, 0.02);
}

.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.marquee-item .coin {
  color: var(--accent-gold);
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --section-py: 72px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-terminal {
    order: -1;
  }

  .level-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
  }

  .level-meta {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }

  .level-details {
    padding: 0 20px;
  }

  .level-card.expanded .level-details {
    padding: 0 20px 20px;
  }

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

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

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

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

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border-glow);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --section-py: 56px;
  }

  .hero-name {
    font-size: 1.1rem;
  }

  .hero-subtitle {
    font-size: 0.45rem;
  }

  .section-title {
    font-size: 0.8rem;
  }

  .level-header {
    padding: 16px;
  }

  .level-role {
    font-size: 0.5rem;
  }

  .level-number {
    font-size: 0.5rem;
    padding: 6px 10px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-box {
    padding: 14px;
  }

  .stat-value {
    font-size: 0.9rem;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
  }
}

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

  .marquee-track {
    animation: none;
  }

  .fade-in,
  .fade-in-left,
  .fade-in-right {
    opacity: 1;
    transform: none;
  }
}

/* ---- Focus management ---- */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* ---- Selection ---- */
::selection {
  background: rgba(58, 108, 244, 0.2);
  color: #1a1a2e;
}
