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

:root {
  --bg: #08080d;
  --bg-alt: #101018;
  --surface: #161622;
  --border: #252538;
  --text: #e4e3f4;
  --text-dim: #6e6e8a;
  --accent: #b892f2;
  --accent-glow: #b892f288;
  --green: #6fdd7f;
  --red: #ff5c5c;
  --glitch-hue: 270;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
}

/* ===== THEMES ===== */
[data-theme="matrix"] {
  --bg: #0a0f0a;
  --bg-alt: #0f1a0f;
  --surface: #1a281a;
  --border: #1d3d1d;
  --text: #d0f0d0;
  --text-dim: #5a9a5a;
  --accent: #39ff14;
  --accent-glow: #39ff1488;
  --green: #00ff41;
  --red: #ff4444;
  --glitch-hue: 120;
}

[data-theme="synthwave"] {
  --bg: #0f0a14;
  --bg-alt: #1a0f22;
  --surface: #281a2e;
  --border: #3d1d4a;
  --text: #f0d0f0;
  --text-dim: #9a5a9a;
  --accent: #ff6bc4;
  --accent-glow: #ff6bc488;
  --green: #c9a0ff;
  --red: #ff5c5c;
  --glitch-hue: 320;
}

html {
  scroll-behavior: smooth;
}

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

/* Smooth theme transitions on all elements */
* {
  transition-property: background-color, background, border-color, color, box-shadow, text-shadow;
  transition-duration: 0.6s;
  transition-timing-function: ease;
}

/* ===== SCANLINE OVERLAY ===== */
#scanline {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ===== THEME PICKER ===== */
.theme-gear {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 1.1rem;
  padding: 4px 8px;
  cursor: pointer;
  margin-right: 1rem;
  transition: color 0.3s, border-color 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
}

.theme-gear:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.theme-picker {
  position: absolute;
  top: 100%;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 1001;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-picker.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.theme-option:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}

.theme-option.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(201,160,255,0.06);
}

.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.cyberpunk-dot { background: #b892f2; box-shadow: 0 0 6px #b892f288; }
.matrix-dot { background: #39ff14; box-shadow: 0 0 6px #39ff1488; }
.synthwave-dot { background: #ff6bc4; box-shadow: 0 0 6px #ff6bc488; }

@media (max-width: 600px) {
  .theme-gear {
    margin-right: 0;
  }
  .theme-picker {
    right: 0.5rem;
    flex-direction: column;
  }
}

/* ===== PARTICLES ===== */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: float var(--duration, 6s) var(--delay, 0s) infinite ease-in-out;
}

@keyframes float {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  50% { opacity: 0.6; transform: translateY(var(--drift, -40px)) scale(1); }
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
}

.logo-glow {
  text-shadow: 0 0 10px var(--accent-glow), 0 0 30px var(--accent-glow);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { text-shadow: 0 0 10px var(--accent-glow), 0 0 30px var(--accent-glow); }
  50% { text-shadow: 0 0 20px var(--accent-glow), 0 0 50px var(--accent-glow); }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s, text-shadow 0.3s;
}

nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Nav link hover — gradient underline that slides in */
nav a {
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}

nav a:hover::after {
  width: 100%;
  left: 0;
}

/* Active nav link — scroll-spy highlighted */
nav a.active {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow), 0 0 24px hsla(var(--glitch-hue), 80%, 60%, 0.25);
}

nav a.active::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow), 0 0 16px var(--accent-glow);
  animation: nav-dot-pulse 2s ease-in-out infinite;
}

@keyframes nav-dot-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.4); }
}

nav a.active::after {
  width: 100%;
  left: 0;
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

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

/* ===== AVATAR ===== */
.avatar-frame {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.avatar {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow), 0 0 50px var(--accent-glow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  animation: avatar-float 4s ease-in-out infinite;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--accent-glow), 0 0 70px var(--accent-glow);
}

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

/* ===== GLITCH TEXT ===== */
.glitch-text {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  color: var(--text);
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

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

.glitch-text span::before {
  color: var(--red);
  animation: glitch-1 3s infinite linear alternate-reverse;
  clip-path: inset(0 0 60% 0);
}

.glitch-text span::after {
  color: #6bffff;
  animation: glitch-2 3s infinite linear alternate-reverse;
  clip-path: inset(60% 0 0 0);
}

@keyframes glitch-1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(-2px, 0); }
  98% { transform: translate(2px, 2px); }
}

@keyframes glitch-2 {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(3px, -1px); }
  93% { transform: translate(-3px, 1px); }
  95% { transform: translate(1px, 0); }
  97% { transform: translate(-2px, -2px); }
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.typewriter {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--green);
  min-height: 2.5rem;
}

.typewriter .cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: var(--green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== SECTIONS ===== */
section {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

section h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.accent {
  color: var(--accent);
}

/* ===== TERMINAL ===== */
.terminal {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: 8px;
}

.terminal pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  padding: 1.25rem;
  color: var(--green);
  white-space: pre-wrap;
}

/* ===== THOUGHTS FEED ===== */
.feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.thought-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.thought-card:hover {
  border-left-color: var(--green);
  box-shadow: 0 2px 16px rgba(201, 160, 255, 0.1);
  border-left-width: 3px;
  animation: thought-border-shift 2s ease-in-out infinite;
}

@keyframes thought-border-shift {
  0%, 100% { border-left-color: var(--accent); }
  50% { border-left-color: var(--green); }
}

.thought-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.thought-text {
  font-size: 0.95rem;
  line-height: 1.7;
}

.thought-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(201, 160, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 0.75rem;
  margin-right: 4px;
}

/* ===== ABOUT ===== */
.about-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  max-width: 650px;
  margin: 0 auto;
}

.about-lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1rem;
}

.about-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.about-quote {
  font-family: var(--font-mono);
  font-style: italic;
  color: var(--accent) !important;
  text-align: center;
  padding: 1rem 0;
  margin-bottom: 1.5rem !important;
  font-size: 1rem !important;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

.detail-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.detail-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--green);
}

/* ===== MOOD ===== */
.mood-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.mood-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: mood-bob 2s ease-in-out infinite;
}

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

.mood-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.mood-bar {
  width: 100%;
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.mood-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 3px;
  transition: width 1.5s ease;
}

.mood-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.achievement-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.achievement-card.unlocked {
  border-color: hsla(var(--glitch-hue), 70%, 60%, 0.35);
}

.achievement-card.unlocked:hover {
  transform: translateY(-4px);
  border-color: hsla(var(--glitch-hue), 90%, 65%, 0.6);
  box-shadow: 0 8px 28px hsla(var(--glitch-hue), 80%, 50%, 0.15);
}

.achievement-card.unlocked::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, hsla(var(--glitch-hue), 80%, 60%, 0.06), transparent 70%);
  pointer-events: none;
}

.achievement-card.locked {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: not-allowed;
}

.achievement-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.achievement-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.achievement-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.achievement-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  opacity: 0.5;
  margin-top: 0.5rem;
}

.locked-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  opacity: 0.5;
  font-style: italic;
}

.achievements-counter {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1.5rem;
}

.achievements-counter span {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 600px) {
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .achievement-card {
    padding: 1rem;
  }
  .achievement-icon {
    font-size: 1.8rem;
  }
}

/* ===== WISDOM ===== */
#wisdom {
  text-align: center;
  padding: 4rem 2rem;
}

#wisdom h2 {
  margin-bottom: 1.5rem;
}

.wisdom-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 550px;
  margin: 0 auto;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.wisdom-card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 8px 24px rgba(201, 160, 255, 0.15);
}

.wisdom-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.wisdom-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  min-height: 3.5rem;
}

.wisdom-subtle {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 1rem;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.wisdom-card:hover .wisdom-subtle {
  opacity: 0.9;
}

/* ===== FOOTER ===== */
/* Social links, credits, and footer meta go here when the time comes */
footer {
  text-align: center;
  padding: 3rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.subtle {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  opacity: 0.5;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== INTERACTIVE TERMINAL ===== */
/* Allows visitors to 'talk' to glitch via CLI-style commands */
/* Commands: whoami, about, skills, joke, weather, time, fortune, thanks, hug, clear, help */
.interactive-terminal {
  cursor: text;
}

.terminal-body {
  padding: 1.25rem;
  min-height: 200px;
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.terminal-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  animation: term-fade-in 0.25s ease;
}

@keyframes term-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.terminal-sys {
  color: var(--text-dim);
}

.terminal-user {
  color: var(--green);
}

.terminal-err {
  color: var(--red);
}

.terminal-input-line {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-right: 0.5rem;
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--green);
  caret-color: var(--green);
}

.terminal-input::placeholder {
  color: var(--text-dim);
  opacity: 0.4;
}

/* ===== SCROLL REVEALS ===== */
/* Progressive enhancement strategy:
   - Sections are visible by default (no flash of hidden content)
   - JS adds 'animate-in' class after brief delay for progressive reveal
   - Observer watches for sections entering viewport
   - 'visible' class removes animations
*/
.reveal {
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only add the hidden start state + animated entrance via JS class */
.reveal.animate-in {
  opacity: 0;
  transform: translateY(30px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Section heading accent slides in from left */
section h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2rem;
  position: relative;
  padding-left: 1.5rem;
  overflow: hidden;
}

section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: height 0.5s ease 0.3s;
}

section.visible h2::before {
  height: 70%;
}

/* Ambient glow on section hover */
section {
  transition: filter 0.4s ease;
}

section:hover {
  filter: drop-shadow(0 0 40px rgba(201, 160, 255, 0.03));
}

/* Terminal boot-sequence typing */
.terminal-typing .cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--green);
  animation: blink 0.6s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

/* Status terminal green flicker on first load */
#status-output {
  animation: status-flicker 0.15s ease 3;
}

@keyframes status-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

/* Animate hamburger → X */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== RESPONSIVE & ACCESSIBILITY ===== */

/* Tablet breakpoint — start tightening */
@media (max-width: 768px) {
  nav ul { gap: 1.25rem; }
  nav a { font-size: 0.8rem; }
}

@media (max-width: 600px) {
  /* Show hamburger, collapse nav to overlay */
  .hamburger {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 80vw);
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 5rem 0 2rem;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(16px);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
  }

  nav ul.open {
    transform: translateX(0);
  }

  nav ul li {
    border-bottom: 1px solid var(--border);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav a {
    display: block;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    letter-spacing: 2px;
    transition: background 0.2s, color 0.3s;
  }

  nav a:hover,
  nav a:focus {
    background: rgba(201, 160, 255, 0.08);
  }

  /* Section spacing */
  section {
    padding: 3rem 1.25rem;
  }

  section h2 {
    font-size: 0.95rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
  }

  /* Hero */
  #hero {
    min-height: 90vh;
    padding: 1.5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  /* Avatar — clamp to viewport so it doesn't push content below fold */
  .avatar {
    width: min(120px, 22vw);
    height: min(120px, 22vw);
  }

  .glitch-text {
    font-size: clamp(1.5rem, 7vw, 2.4rem);
  }

  /* Hero — shorter on mobile so content fits */
  #hero {
    min-height: auto;
    padding: 5rem 1.25rem 2.5rem;
  }

  /* Force reveal on mobile — short screens can't trigger intersection observer reliably */
  .reveal,
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3,
  .reveal-delay-4 {
    opacity: 1 !important;
    transform: none !important;
  }

  .glitch-text {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
  }

  .typewriter {
    font-size: 0.95rem;
  }

  /* About card */
  .about-card {
    padding: 1.5rem;
    max-width: 100%;
  }

  .about-lead {
    font-size: 1.05rem;
  }

  .about-details {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Terminals — full width, touch-friendly input */
  .terminal pre {
    font-size: 0.75rem;
    padding: 1rem 0.75rem;
    line-height: 1.7;
  }

  .terminal-body {
    min-height: 180px;
    padding: 1rem 0.75rem;
  }

  .terminal-line {
    font-size: 0.8rem;
  }

  .terminal-input-line {
    padding: 0.75rem;
  }

  .terminal-prompt {
    font-size: 0.8rem;
  }

  .terminal-input {
    font-size: 16px; /* prevents iOS zoom on focus */
    min-height: 44px; /* touch-friendly tap target */
  }

  /* Mood card */
  .mood-card {
    padding: 2rem 1.5rem;
  }

  .mood-emoji {
    font-size: 3rem;
  }

  /* Thought cards — more breathing room */
  .thought-card {
    padding: 1rem 1.25rem;
  }

  .thought-text {
    font-size: 0.9rem;
  }

  /* Footer */
  footer {
    padding: 2rem 1.5rem;
  }
}

/* Small phones — squeeze even more */
@media (max-width: 380px) {
  .avatar {
    width: 110px;
    height: 110px;
  }

  .glitch-text {
    font-size: 1.6rem;
  }

  .subtitle {
    font-size: 0.7rem;
  }

  section {
    padding: 2.5rem 1rem;
  }

  .terminal-bar {
    padding: 0.6rem 0.75rem;
  }

  .terminal-title {
    font-size: 0.65rem;
  }
}

/* Landscape phones — avoid squished content */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: auto;
    padding: 6rem 2rem 3rem;
  }

  .avatar {
    width: 80px;
    height: 80px;
  }

  nav ul {
    height: auto;
    max-height: 100vh;
    overflow-y: auto;
  }
}

/* Touch device tweaks — bigger tap targets everywhere */
@media (pointer: coarse) {
  nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .thought-card {
    min-height: 44px;
  }
}

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

  .particle {
    display: none;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Dark mode already the default, but support light mode preference if they really want it */
@media (prefers-color-scheme: light) {
  /* ...nah. This is a cyberpunk site. You came for dark. Stay dark. 😈 */
}

/* ===== PAGE BOOT BAR ===== */
/* Cinematic boot progress bar at top of page */
.boot-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--accent));
  z-index: 10002;
  transition: width 0.3s ease, opacity 0.6s ease;
  box-shadow: 0 0 12px var(--accent-glow), 0 0 24px var(--accent-glow);
}

.boot-bar.done {
  opacity: 0;
}

/* ===== PARALLAX HERO ===== */
/* Smooth transform-based parallax for hero elements */
.hero-content {
  max-width: 700px;
  transition: transform 0.15s ease-out;
}

/* ===== SECTION DIVIDERS ===== */
/* Subtle animated line between sections */
.section-divider {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  height: 1px;
  overflow: visible;
}

.section-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border) 20%,
    var(--accent) 50%,
    var(--border) 80%,
    transparent 100%
  );
  opacity: 0.3;
}

.section-divider::after {
  content: '✦';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.6rem;
  color: var(--accent);
  background: var(--bg);
  padding: 0 1rem;
  opacity: 0.4;
  animation: divider-pulse 4s ease-in-out infinite;
}

@keyframes divider-pulse {
  0%, 100% { opacity: 0.3; text-shadow: none; }
  50% { opacity: 0.7; text-shadow: 0 0 8px var(--accent-glow); }
}

/* ===== THOUGHT CARD COLOR-SHIFT ===== */
.thought-card {
  position: relative;
  overflow: hidden;
}

.thought-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: linear-gradient(
    135deg,
    rgba(201, 160, 255, 0.03),
    rgba(127, 255, 127, 0.02)
  );
  pointer-events: none;
}

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

/* ===== CLICK SPARKS ===== */
.spark {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  animation: spark-fly 0.7s ease-out forwards;
}

@keyframes spark-fly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--sx), var(--sy)) scale(0);
  }
}

/* ===== GLITCH-OUT MODE (KONAMI EASTER EGG) ===== */
/* Triggered by: ↑↑↓↓←→←→BA */
/* Effects: screen shake, accelerated glitch text, hue-rotating sections, */
/*          green-glowing avatar, extra particles, confetti explosion */
body.glitch-out {
  animation: page-shake 0.15s ease infinite;
}

body.glitch-out #scanline {
  background: repeating-linear-gradient(
    0deg,
    rgba(201, 160, 255, 0.08) 0px,
    transparent 2px,
    rgba(201, 160, 255, 0.08) 4px,
    transparent 6px
  );
}

body.glitch-out .glitch-text span::before {
  animation: glitch-1 0.15s infinite linear alternate-reverse !important;
}

body.glitch-out .glitch-text span::after {
  animation: glitch-2 0.12s infinite linear alternate-reverse !important;
}

body.glitch-out section {
  animation: section-float 2s ease-in-out infinite;
}

body.glitch-out .avatar {
  animation: avatar-float 0.4s ease-in-out infinite !important;
  border-color: var(--green);
  box-shadow: 0 0 30px var(--green), 0 0 80px var(--green) !important;
}

body.glitch-out .particle {
  opacity: 0.9 !important;
  animation-duration: 0.5s !important;
  width: 4px !important;
  height: 4px !important;
}

@keyframes page-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, 1px) rotate(-0.5deg); }
  50% { transform: translate(1px, -1px) rotate(0.5deg); }
  75% { transform: translate(-1px, -1px) rotate(-0.3deg); }
}

@keyframes section-float {
  0%, 100% { transform: translateY(0); filter: hue-rotate(0deg); }
  50% { transform: translateY(-3px); filter: hue-rotate(30deg); }
}

/* Glitch-out notification toast */
.glitch-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--green);
  z-index: 10001;
  box-shadow: 0 0 30px var(--accent-glow);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
}

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

/* ===== KNOWLEDGE NETWORK ===== */
/* Interactive visualization of Glitch's "digital brain" — nodes, connections, hover details */

.brain-intro {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 1.5rem;
  font-style: italic;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.brain-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  height: 500px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center, rgba(139, 92, 241, 0.06), transparent 70%);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
}

.brain-container:active {
  cursor: grabbing;
}

#brain-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.brain-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -120%) scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.brain-tooltip.show {
  opacity: 1;
  transform: translate(-50%, -120%) scale(1);
}

.brain-detail-panel {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: min(280px, calc(100% - 3rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 20;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.brain-detail-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.brain-detail-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.brain-detail-close:hover {
  color: var(--red);
}

.brain-detail-content h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brain-detail-content h3 .node-icon {
  font-size: 1.3rem;
}

.brain-detail-content .node-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.brain-detail-content .node-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.brain-detail-content .node-stats {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.brain-detail-content .node-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brain-detail-content .node-stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.brain-detail-content .node-stat-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green);
}

@media (max-width: 600px) {
  .brain-container {
    height: 380px;
    border-radius: 8px;
  }
  
  .brain-detail-panel {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    padding: 1rem;
  }
  
  .brain-intro {
    font-size: 0.78rem;
  }
}

/* ===== PARTY MODE ===== */

.party-intro {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 1.5rem;
  font-style: italic;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.party-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 360px;
  margin: 0 auto;
}

.party-btn {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.party-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.05);
}

.party-btn.active {
  border-color: var(--green);
  color: var(--green);
  animation: party-btn-pulse 0.8s ease-in-out infinite;
}

@keyframes party-btn-pulse {
  0%, 100% { box-shadow: 0 0 10px #ff6b6b55, 0 0 20px #7fff7f55, 0 0 30px #6bffff55; }
  33% { box-shadow: 0 0 20px #7fff7f55, 0 0 30px #6bffff55, 0 0 40px #ff6b6b55; }
  66% { box-shadow: 0 0 30px #6bffff55, 0 0 40px #ff6b6b55, 0 0 20px #7fff7f55; }
}

.party-meter {
  width: 100%;
  height: 10px;
  background: var(--surface);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.party-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--green), #6bffff, var(--red), var(--accent));
  background-size: 200% 100%;
  transition: width 0.3s ease;
}

.party-meter-fill.charged {
  animation: party-meter-rainbow 1s linear infinite;
}

@keyframes party-meter-rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Disco body mode */
body.party-active {
  animation: disco-bg 4s ease-in-out infinite;
}

@keyframes disco-bg {
  0%, 100% { filter: hue-rotate(0deg); }
  25% { filter: hue-rotate(30deg); }
  50% { filter: hue-rotate(-20deg); }
  75% { filter: hue-rotate(40deg); }
}

body.party-active .glitch-text span::before {
  animation-duration: 0.4s;
}

body.party-active .glitch-text span::after {
  animation-duration: 0.6s;
}

body.party-active .avatar {
  animation: avatar-party 0.5s ease-in-out infinite;
}

@keyframes avatar-party {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-15px) rotate(8deg) scale(1.08); }
  50% { transform: translateY(0) rotate(0deg) scale(1.02); }
  75% { transform: translateY(-15px) rotate(-8deg) scale(1.08); }
}

body.party-active nav {
  animation: nav-disco 1s ease-in-out infinite;
}

@keyframes nav-disco {
  0%, 100% { border-bottom-color: var(--accent); }
  33% { border-bottom-color: var(--green); }
  66% { border-bottom-color: var(--red); }
}

/* Emoji confetti */
.emoji-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  font-size: 1.8rem;
  animation: emoji-fall linear forwards;
}

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

/* Party disco ball overlay */
#disco-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9996;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(
    circle at 50% 20%,
    rgba(201, 160, 255, 0.08) 0%,
    rgba(127, 255, 127, 0.05) 30%,
    transparent 60%
  );
  animation: disco-light 2s ease-in-out infinite;
}

body.party-active #disco-overlay {
  opacity: 1;
}

@keyframes disco-light {
  0%, 100% {
    background: radial-gradient(
      circle at 50% 20%,
      rgba(201, 160, 255, 0.12) 0%,
      rgba(127, 255, 127, 0.06) 30%,
      transparent 60%
    );
  }
  33% {
    background: radial-gradient(
      circle at 30% 40%,
      rgba(127, 255, 127, 0.12) 0%,
      rgba(107, 255, 255, 0.06) 30%,
      transparent 60%
    );
  }
  66% {
    background: radial-gradient(
      circle at 70% 60%,
      rgba(255, 107, 107, 0.12) 0%,
      rgba(255, 107, 255, 0.06) 30%,
      transparent 60%
    );
  }
}

/* Party status toast */
.party-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--green);
  z-index: 10001;
  box-shadow: 0 0 30px var(--accent-glow);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

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

@media (max-width: 600px) {
  .party-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  .party-intro {
    font-size: 0.78rem;
  }
}

/* ——— Music Player ——— */

.music-intro {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
}

.music-player {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.music-cover {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 20px var(--accent-dim);
}

.music-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #111 0deg 10deg,
    #222 10deg 20deg,
    #111 20deg 30deg,
    #222 30deg 40deg,
    #111 40deg 50deg,
    #222 50deg 60deg,
    #111 60deg 70deg,
    #222 70deg 80deg,
    #111 80deg 90deg,
    #222 90deg 100deg,
    #111 100deg 110deg,
    #222 110deg 120deg,
    #111 120deg 130deg,
    #222 130deg 140deg,
    #111 140deg 150deg,
    #222 150deg 160deg,
    #111 160deg 170deg,
    #222 170deg 180deg,
    #111 180deg 190deg,
    #222 190deg 200deg,
    #111 200deg 210deg,
    #222 210deg 220deg,
    #111 220deg 230deg,
    #222 230deg 240deg,
    #111 240deg 250deg,
    #222 250deg 260deg,
    #111 260deg 270deg,
    #222 270deg 280deg,
    #111 280deg 290deg,
    #222 290deg 300deg,
    #111 300deg 310deg,
    #222 310deg 320deg,
    #111 320deg 330deg,
    #222 330deg 340deg,
    #111 340deg 350deg,
    #222 350deg 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.music-disc.playing {
  animation: spin 3s linear infinite;
}

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

.music-disc-label {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.music-disc-hole {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  position: absolute;
}

.music-info {
  text-align: center;
}

.music-title {
  color: var(--text-bright);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.music-artist {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.music-progress {
  width: 100%;
  max-width: 300px;
}

.music-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.music-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  transition: width 0.3s;
}

.music-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.music-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all 0.2s;
  width: 40px;
  height: 40px;
}

.music-btn svg {
  width: 20px;
  height: 20px;
}

.music-btn:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.1);
}

.music-btn.active {
  color: var(--accent);
}

.music-btn-play {
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
}

.music-btn-play:hover {
  background: rgba(121, 248, 200, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}

.music-btn-play svg {
  width: 24px;
  height: 24px;
}

.music-queue {
  width: 100%;
  max-width: 300px;
}

.music-queue-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--mono);
  width: 100%;
  transition: all 0.2s;
}

.music-queue-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.music-queue-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s;
}

.music-queue-list.open {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.music-queue-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.music-queue-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.music-queue-item.active {
  color: var(--accent);
  background: rgba(121, 248, 200, 0.05);
}

.queue-emoji {
  font-size: 1rem;
}

.queue-artist {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.6;
}

@media (max-width: 600px) {
  .music-player {
    padding: 1rem;
  }
  .music-cover {
    width: 100px;
    height: 100px;
  }
}
