/* ============================================================
   LEO PROTOCOL — style.css
   ============================================================ */

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

:root {
  --bg:          #f5f7fc;
  --bg-2:        #ffffff;
  --bg-3:        #eef1f8;
  --blue:        #0891b2;
  --green:       #059669;
  --purple:      #7c3aed;
  --red:         #dc2626;
  --yellow:      #d97706;
  --text:        #374151;
  --text-dim:    #6b7280;
  --text-bright: #111827;
  --border:      rgba(0, 0, 0, 0.09);
  --border-glow: rgba(8, 145, 178, 0.35);
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-body:   'Inter', system-ui, sans-serif;
  --nav-h:       64px;
  --radius:      6px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Grid background ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ---- Selection ---- */
::selection { background: rgba(0, 212, 255, 0.25); color: var(--blue); }

/* ---- Utility ---- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--bg-2);
}

/* ---- Glow helpers (light-mode tuned) ---- */
.glow-blue  { text-shadow: 0 2px 12px rgba(8,145,178,0.25); }
.glow-green { text-shadow: 0 2px 12px rgba(5,150,105,0.25); }
.glow-purple{ text-shadow: 0 2px 12px rgba(124,58,237,0.25); }

/* ---- Fade-in animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Stagger children ---- */
.stagger > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger > *:nth-child(2)  { transition-delay: 0.12s; }
.stagger > *:nth-child(3)  { transition-delay: 0.19s; }
.stagger > *:nth-child(4)  { transition-delay: 0.26s; }
.stagger > *:nth-child(5)  { transition-delay: 0.33s; }
.stagger > *:nth-child(6)  { transition-delay: 0.40s; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#nav.scrolled {
  border-bottom-color: rgba(0,0,0,0.14);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

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

/* Logo */
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue);
  text-decoration: none;
  transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.75; }

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  border-color: var(--border-glow);
  background: rgba(8,145,178,0.07);
}

/* Folder upload button */
.folder-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.folder-upload-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* Email link */
.nav-email {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-email:hover { color: var(--cyan); }

/* Status badge */
.nav-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--green);
  border: 1px solid rgba(5,150,105,0.35);
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(5,150,105,0.07);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.nav-status::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Canvas sits behind everything in the hero */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue);
  letter-spacing: 0.2em;
  border: 1px solid var(--border-glow);
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 28px;
  background: rgba(0,212,255,0.05);
  animation: fadeUp 0.8s ease 0.1s both;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-bright);
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease 0.25s both;
}

.hero-title .accent-blue  { color: var(--blue);   text-shadow: 0 0 20px rgba(0,212,255,0.6); }
.hero-title .accent-green { color: var(--green);  text-shadow: 0 0 20px rgba(0,255,136,0.6); }

.hero-subtitle {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  color: var(--text);
  max-width: 560px;
  margin: 0 auto 28px;
  animation: fadeUp 0.8s ease 0.4s both;
}

.hero-typing-wrap {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--green);
  height: 2em;
  margin-bottom: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: fadeUp 0.8s ease 0.55s both;
}

#typing-text {
  display: inline-block;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--green);
  margin-left: 3px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--green);
}

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

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--blue);
  border: none;
  padding: 14px 36px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(0,212,255,0.4), 0 0 40px rgba(0,212,255,0.15);
  transition: all var(--transition);
  animation: fadeUp 0.8s ease 0.7s both;
}
.hero-cta:hover {
  background: #1adeff;
  box-shadow: 0 0 30px rgba(0,212,255,0.6), 0 0 60px rgba(0,212,255,0.25);
  transform: translateY(-2px);
}
.hero-cta .arrow {
  transition: transform var(--transition);
}
.hero-cta:hover .arrow { transform: translateX(4px); }

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  animation: fadeUp 1s ease 1.2s both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

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

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  margin-bottom: 60px;
}

.section-layer-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.section-title .sep { color: var(--blue); margin: 0 6px; opacity: 0.6; }

.section-subtitle {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 6px;
}

.section-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.section-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(to right, var(--blue), transparent);
  margin-top: 16px;
}

/* ============================================================
   LAYER 0 — SIGNAL (Course Cards)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.course-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--blue), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.course-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,212,255,0.12);
}
.course-card:hover::after { opacity: 1; }

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

.card-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

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

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 12px;
}

.card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-uploading {
  color: var(--yellow);
  border: 1px solid rgba(255,211,42,0.4);
  background: rgba(255,211,42,0.06);
}
.badge-coming {
  color: var(--text-dim);
  border: 1px solid rgba(90,96,112,0.4);
  background: rgba(90,96,112,0.06);
}
.badge-active {
  color: var(--green);
  border: 1px solid rgba(0,255,136,0.4);
  background: rgba(0,255,136,0.06);
}
.badge-wip {
  color: var(--blue);
  border: 1px solid rgba(0,212,255,0.4);
  background: rgba(0,212,255,0.06);
}
.badge-archived {
  color: var(--purple);
  border: 1px solid rgba(155,89,182,0.4);
  background: rgba(155,89,182,0.06);
}

/* ============================================================
   LAYER 1 — SYSTEM (Project Cards)
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0,212,255,0.1);
}
.project-card:hover::before { opacity: 1; }

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
}

.project-desc {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--blue);
  border: 1px solid rgba(0,212,255,0.25);
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(0,212,255,0.04);
  letter-spacing: 0.04em;
}
.tech-tag.green { color: var(--green); border-color: rgba(0,255,136,0.25); background: rgba(0,255,136,0.04); }
.tech-tag.purple{ color: var(--purple); border-color: rgba(155,89,182,0.25); background: rgba(155,89,182,0.04); }

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color var(--transition);
}
.project-link:hover { color: var(--blue); }

/* ============================================================
   LAYER 2 — INTELLIGENCE (Roadmap / Tree)
   ============================================================ */
.roadmap-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.roadmap-domain {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.roadmap-domain:hover { border-color: var(--border-glow); }

.domain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(0,212,255,0.04);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.domain-header:hover { background: rgba(0,212,255,0.07); }

.domain-title {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 10px;
}
.domain-title .d-icon { font-size: 1.1rem; }

.domain-toggle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
  transition: transform var(--transition);
}
.roadmap-domain.open .domain-toggle { transform: rotate(90deg); }

.domain-body {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s ease;
}
.roadmap-domain.open .domain-body {
  max-height: 1000px;
  padding: 20px 24px;
}

.node-tree {
  list-style: none;
  padding-left: 0;
}

.node-tree li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 0.83rem;
  color: var(--text-dim);
  border-left: 1px solid var(--border);
}
.node-tree li::before {
  content: '▸';
  position: absolute;
  left: 8px;
  color: var(--blue);
  font-size: 0.6rem;
}
.node-tree li.done { color: var(--green); }
.node-tree li.done::before { content: '✓'; color: var(--green); }
.node-tree li.wip  { color: var(--yellow); }
.node-tree li.wip::before { content: '◉'; color: var(--yellow); }

.node-tree .sub {
  list-style: none;
  padding-left: 0;
  margin-top: 4px;
}
.node-tree .sub li {
  padding-left: 32px;
  font-size: 0.78rem;
  border-left: none;
}
.node-tree .sub li::before {
  left: 20px;
  content: '·';
  font-size: 1rem;
}

.domain-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.progress-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--blue), var(--green));
  border-radius: 2px;
  transition: width 1s ease 0.3s;
}
.progress-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green);
}

/* ============================================================
   LAYER ∞ — META (Timeline)
   ============================================================ */
.meta-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 8px; left: 7px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--blue), var(--border), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -25px; top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--blue);
  box-shadow: 0 0 8px rgba(0,212,255,0.5);
  transition: all var(--transition);
}
.timeline-item:hover::before {
  background: var(--blue);
  box-shadow: 0 0 16px var(--blue);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.timeline-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}
.timeline-body {
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.t-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--purple);
  border: 1px solid rgba(155,89,182,0.3);
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(155,89,182,0.05);
}

/* Manifesto panel */
.manifesto-panel {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.manifesto-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.manifesto-quote {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 20px;
}
.manifesto-quote em { color: var(--blue); font-style: normal; }

.manifesto-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manifesto-items li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.manifesto-items li::before {
  content: '//';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 0.68rem;
}

.meta-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.stat-box {
  text-align: center;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue);
  display: block;
  text-shadow: 0 0 10px rgba(0,212,255,0.4);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  text-shadow: 0 0 8px rgba(0,212,255,0.4);
}
.footer-brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 4px;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--blue); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ============================================================
   ADD BUTTON
   ============================================================ */
.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--blue);
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.35);
  border-radius: var(--radius);
  padding: 10px 22px;
  cursor: pointer;
  transition: all var(--transition);
}
.add-btn:hover {
  background: rgba(0,212,255,0.12);
  border-color: var(--blue);
  box-shadow: 0 0 16px rgba(0,212,255,0.25);
  transform: translateY(-1px);
}
.add-btn-green { color: var(--green); background: rgba(0,255,136,0.06); border-color: rgba(0,255,136,0.35); }
.add-btn-green:hover { background: rgba(0,255,136,0.12); border-color: var(--green); box-shadow: 0 0 16px rgba(0,255,136,0.25); }
.add-btn-purple { color: var(--purple); background: rgba(155,89,182,0.06); border-color: rgba(155,89,182,0.35); }
.add-btn-purple:hover { background: rgba(155,89,182,0.12); border-color: var(--purple); box-shadow: 0 0 16px rgba(155,89,182,0.25); }
.add-btn-meta { color: var(--yellow); background: rgba(255,211,42,0.06); border-color: rgba(255,211,42,0.35); }
.add-btn-meta:hover { background: rgba(255,211,42,0.12); border-color: var(--yellow); box-shadow: 0 0 16px rgba(255,211,42,0.25); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.empty-state .empty-icon { font-size: 2rem; display: block; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { margin-top: 6px; font-size: 0.72rem; opacity: 0.6; }

/* ============================================================
   CARD DELETE BUTTON
   ============================================================ */
.card-delete {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255,71,87,0.0);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition);
}
.course-card:hover .card-delete,
.project-card:hover .card-delete,
.roadmap-domain:hover .card-delete,
.timeline-item:hover .card-delete { opacity: 1; }
.card-delete:hover {
  color: var(--red);
  background: rgba(255,71,87,0.12);
  border-color: rgba(255,71,87,0.4);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,10,0.82);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-3);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s ease;
  box-shadow: 0 0 60px rgba(0,212,255,0.1);
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--red); border-color: rgba(255,71,87,0.5); }

.modal-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-bright);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title .modal-tag { color: var(--blue); }

/* Form elements */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-bright);
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus { border-color: var(--border-glow); box-shadow: 0 0 0 2px rgba(0,212,255,0.08); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-3); }

.form-hint {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 4px;
  opacity: 0.7;
}

.modal-submit {
  width: 100%;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--blue);
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0,212,255,0.3);
  transition: all var(--transition);
}
.modal-submit:hover { background: #1adeff; box-shadow: 0 0 24px rgba(0,212,255,0.5); transform: translateY(-1px); }

/* ============================================================
   TERMINAL BLOCK (decorative)
   ============================================================ */
.terminal-block {
  background: #f0f4ff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}
.terminal-bar {
  background: var(--bg-3);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.t-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.t-dot-r { background: #ff5f57; }
.t-dot-y { background: #ffbd2e; }
.t-dot-g { background: #28c840; }
.t-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 6px;
  letter-spacing: 0.06em;
}
.terminal-body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-dim);
}
.terminal-body .cmd { color: var(--green); }
.terminal-body .out { color: var(--text-dim); }
.terminal-body .val { color: var(--blue); }
.terminal-body .cmt { color: #3a4055; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .meta-layout {
    grid-template-columns: 1fr;
  }
  .manifesto-panel { position: static; }
}

@media (max-width: 700px) {
  .section { padding: 70px 0; }

  .nav-links, .nav-status {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav-toggle { display: flex; }

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

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .meta-stats { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   HERO — WHITE THEME OVERRIDES
   ============================================================ */
#hero.hero-white {
  background: #ffffff;
}
/* Suppress the global grid-dots overlay inside hero */
#hero.hero-white::before { display: none; }

#hero-video {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  height: 115%;
  width: auto;
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.6) 80%);
  z-index: 0;
}

/* Light-mode text variants */
.hero-tag-light {
  color: #444;
  border-color: rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.6);
}

.hero-title-light { color: #1a1a2e; text-shadow: 0 2px 20px rgba(0,0,0,0.12); }
.accent-blue-light { color: #0099cc; text-shadow: 0 0 16px rgba(0,153,204,0.5); }

.hero-subtitle-light { color: #333; }

.hero-typing-light { color: #0099cc; }

.cursor-dark {
  background: #0099cc;
  box-shadow: 0 0 6px #0099cc;
}

.hero-cta-light {
  background: #1a1a2e;
  color: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.hero-cta-light:hover {
  background: #333;
  box-shadow: 0 6px 32px rgba(0,0,0,0.35);
}

.hero-scroll-light { color: #888; }
.hero-scroll-light .scroll-line { background: linear-gradient(to bottom, #888, transparent); }

/* Nav light override when at top */
#nav.nav-light {
  background: rgba(255,255,255,0.88);
  border-bottom-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}
#nav.nav-light .nav-logo { color: #0099cc; text-shadow: none; }
#nav.nav-light .nav-links a { color: #555; }
#nav.nav-light .nav-links a:hover,
#nav.nav-light .nav-links a.active { color: #0099cc; border-color: rgba(0,153,204,0.4); background: rgba(0,153,204,0.06); }
#nav.nav-light .nav-status { color: #2a9d5c; border-color: rgba(42,157,92,0.4); background: rgba(42,157,92,0.06); }
#nav.nav-light .nav-toggle span { background: #333; }

/* ============================================================
   CHARACTER STICKER BADGES
   ============================================================ */
.stickers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Each sticker badge */
.char-sticker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: all;
  cursor: pointer;
  animation: floatSticker 4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  user-select: none;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.18));
}
.char-sticker:hover { transform: scale(1.2) rotate(-4deg) !important; filter: drop-shadow(0 5px 14px rgba(0,0,0,0.28)); }

@keyframes floatSticker {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(3deg); }
}

/* Character body container */
.cs-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 5px 7px 6px;
  border: 2px solid rgba(0,0,0,0.12);
  box-shadow: 2px 3px 0 rgba(0,0,0,0.15);
}

/* Shared face/hat parts */
.cs-hat {
  width: 28px; height: 13px;
  border-radius: 4px 4px 0 0;
  border: 2px solid;
  border-bottom: none;
}
.cs-hat-dome {
  border-radius: 50% 50% 0 0 / 80% 80% 0 0;
}
.cs-face {
  width: 28px; height: 26px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
}
.cs-eyes {
  display: flex;
  gap: 5px;
}
.cs-eyes::before, .cs-eyes::after {
  content: '';
  width: 5px; height: 5px;
  background: #fff;
  border-radius: 50%;
  border: 1.5px solid #222;
  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.5);
}
.cs-eyes-sm::before, .cs-eyes-sm::after { width: 4px; height: 4px; }
.cs-smile {
  width: 10px; height: 5px;
  border: 1.5px solid #333;
  border-top: none;
  border-radius: 0 0 8px 8px;
}
.cs-frown {
  width: 10px; height: 5px;
  border: 1.5px solid #333;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.cs-frown.cs-small { width: 8px; }
.cs-worried {
  width: 10px; height: 4px;
  border: 1.5px solid #c05050;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  margin-top: 1px;
}
.cs-torso {
  width: 30px; height: 20px;
  border-radius: 3px 3px 5px 5px;
  border: 2px solid rgba(0,0,0,0.15);
  margin-top: -2px;
}

/* Kenny: hood covers face */
.cs-head-kenny {
  width: 30px; height: 24px;
  border-radius: 50% 50% 40% 40%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-kenny-eyes {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.cs-kenny-eyes::before, .cs-kenny-eyes::after {
  content: '•';
  font-size: 8px;
  color: #111;
  line-height: 1;
}

/* Rick: spiky silver hair */
.cs-hair-rick {
  width: 34px; height: 12px;
  background: #c8c8c8;
  border-radius: 50% 50% 0 0;
  position: relative;
  margin-bottom: -1px;
}
.cs-hair-rick::before, .cs-hair-rick::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 8px; height: 14px;
  background: #c8c8c8;
  border-radius: 50%;
}
.cs-hair-rick::before { left: -4px; }
.cs-hair-rick::after  { right: -4px; }

/* Morty: brown hair bump */
.cs-hair-morty {
  width: 28px; height: 10px;
  background: #8B6914;
  border-radius: 50% 50% 0 0;
  margin-bottom: -1px;
}

/* Pickle Rick */
.pickle-rick .cs-pickle {
  width: 22px; height: 40px;
  background: linear-gradient(135deg, #4caf50, #2d7a2d);
  border-radius: 40% 40% 35% 35%;
  border: 2px solid #1e5c1e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 3px;
}
.cs-pickle-face { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cs-pickle-mouth {
  width: 8px; height: 4px;
  border: 1.5px solid #fff;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}
.cs-pickle-bumps::before, .cs-pickle-bumps::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  background: #3a9c3a;
  border-radius: 50%;
  border: 1px solid #1e5c1e;
}
.cs-pickle-bumps::before { top: 4px; left: -2px; }
.cs-pickle-bumps::after  { top: 14px; right: -2px; }

/* Mr. Meeseeks: taller blue face */
.cs-meeseeks-face {
  width: 28px; height: 32px !important;
  border-radius: 40% 40% 35% 35%;
}
.cs-meeseeks-mouth {
  width: 12px; height: 5px;
  border: 1.5px solid #1a6688;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* Label */
.cs-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* ============================================================
   SOUTH PARK CHARACTERS — Layer 0
   ============================================================ */
.sp-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 32px;
  margin-top: 48px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
}

.sp-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}
.sp-char:hover { transform: scale(1.15) translateY(-4px); }
.sp-char:active { transform: scale(0.95); }

/* --- Shared parts --- */
.sp-head {
  border-radius: 50%;
  width: 34px; height: 34px;
  position: relative;
  z-index: 2;
}
.sp-body {
  width: 38px; height: 32px;
  border-radius: 4px 4px 6px 6px;
  margin-top: -4px;
}
.sp-feet {
  width: 40px; height: 10px;
  border-radius: 0 0 6px 6px;
  background: #111;
}
.sp-hat {
  width: 36px; height: 18px;
  border-radius: 4px 4px 0 0;
  margin-bottom: -2px;
  z-index: 3;
}

/* Cartman — red parka, yellow hat, beige face */
.sp-hat-cartman  { background: #f5c518; border: 2px solid #e0a800; }
.sp-head-cartman { background: #f5d5a0; border: 2px solid #d4a574; }
.sp-body-cartman { background: #cc2200; border: 2px solid #aa1a00; }

/* Kenny — orange parka, hood up, tiny eyes only */
.sp-head-kenny {
  background: #e8621a;
  border: 3px solid #c4500e;
  border-radius: 50% 50% 40% 40%;
  width: 34px; height: 28px;
  /* Only tiny eyes peek out */
  display: flex; align-items: center; justify-content: center;
}
.sp-head-kenny::before {
  content: '• •';
  color: #1a1a1a;
  font-size: 8px;
  letter-spacing: 4px;
  margin-top: 4px;
}
.sp-body-kenny { background: #e8621a; border: 2px solid #c4500e; }

/* Kyle — green ushanka, green jacket, red hair */
.sp-hat-kyle {
  background: #2d8c2d;
  border: 2px solid #1a5c1a;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  width: 40px; height: 22px;
}
.sp-hat-kyle::after {
  content: '';
  position: absolute;
  top: 4px;
  width: 8px; height: 8px;
  background: #ff6666;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
}
.sp-head-kyle { background: #f5d5a0; border: 2px solid #d4a574; }
.sp-body-kyle { background: #2d8c2d; border: 2px solid #1a5c1a; }

/* Stan — blue/red pom-pom hat, blue jacket */
.sp-hat-stan {
  background: #1a4ecc;
  border: 2px solid #0e34a0;
  border-radius: 4px 4px 0 0;
}
.sp-hat-stan::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 10px; height: 10px;
  background: #cc1a1a;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
}
.sp-head-stan { background: #f5d5a0; border: 2px solid #d4a574; }
.sp-body-stan { background: #1a4ecc; border: 2px solid #0e34a0; }

/* Speech bubble */
.sp-bubble {
  font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
  font-size: 0.88rem;
  color: #1a1a1a;
  background: #fff;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 10px 16px;
  max-width: 280px;
  margin: 12px auto 0;
  position: relative;
  text-align: center;
  box-shadow: 3px 3px 0 #333;
  line-height: 1.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sp-bubble::before {
  content: '';
  position: absolute;
  bottom: -12px; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
}
.sp-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #fff;
}
.sp-bubble-hidden { opacity: 0; transform: scale(0.85); pointer-events: none; }

/* ============================================================
   RICK AND MORTY SCENE — Layer 1
   ============================================================ */
.rm-scene {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  margin-top: 48px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Portal */
.rm-portal-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.rm-portal {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: conic-gradient(#00ff88 0%, #00d4ff 30%, #7bed9f 60%, #00ff88 100%);
  animation: rmSpin 2s linear infinite;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 30px rgba(0,255,136,0.6), 0 0 60px rgba(0,212,255,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rm-portal:hover { transform: scale(1.1); box-shadow: 0 0 50px rgba(0,255,136,0.8); }

.rm-portal-inner {
  position: absolute;
  top: 15%; left: 15%; right: 15%; bottom: 20%;
  background: #08080f;
  border-radius: 50%;
}

@keyframes rmSpin { to { transform: rotate(360deg); } }
.rm-portal-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--green); letter-spacing: 0.1em; }

/* Rick CSS art */
.rm-rick { display: flex; flex-direction: column; align-items: center; position: relative; }

.rm-rick-hair {
  width: 46px; height: 16px;
  background: #c8c8c8;
  border-radius: 50% 50% 0 0;
  position: relative;
}
.rm-rick-hair::before, .rm-rick-hair::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 10px; height: 18px;
  background: #c8c8c8;
  border-radius: 50%;
}
.rm-rick-hair::before { left: -4px; }
.rm-rick-hair::after  { right: -4px; }

.rm-rick-head {
  width: 40px; height: 38px;
  background: #b8d4f0;
  border-radius: 50% 50% 40% 40%;
  border: 2px solid #90b0d8;
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
}
.rm-rick-eyes {
  display: flex; gap: 8px;
}
.rm-rick-eyes::before, .rm-rick-eyes::after {
  content: '';
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  border: 1.5px solid #333;
  box-shadow: inset 2px 2px 0 #3399ff;
}
.rm-rick-mouth {
  width: 16px; height: 5px;
  background: #c04040;
  border-radius: 0 0 8px 8px;
}

.rm-rick-coat {
  width: 48px; height: 44px;
  background: #f0f0f0;
  border: 2px solid #ccc;
  border-radius: 4px 4px 6px 6px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.rm-rick-tie {
  width: 8px; height: 20px;
  background: #a0a0a0;
  border-radius: 2px;
}
.rm-rick-legs {
  width: 40px; height: 20px;
  background: #555;
  border-radius: 0 0 4px 4px;
}

/* Morty CSS art */
.rm-morty { display: flex; flex-direction: column; align-items: center; }

.rm-morty-hair {
  width: 38px; height: 14px;
  background: #8B6914;
  border-radius: 50% 50% 0 0;
}
.rm-morty-head {
  width: 36px; height: 36px;
  background: #fde0a0;
  border-radius: 50%;
  border: 2px solid #d4b070;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
}
.rm-morty-eyes {
  display: flex; gap: 6px;
}
.rm-morty-eyes::before, .rm-morty-eyes::after {
  content: '';
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  border: 1.5px solid #333;
  box-shadow: inset 1px 1px 0 #333;
}
.rm-morty-mouth {
  width: 12px; height: 4px;
  background: #e07070;
  border-radius: 0 0 6px 6px;
  border-top: 1px solid #c05050;
}
.rm-morty-shirt {
  width: 40px; height: 40px;
  background: #f5e642;
  border: 2px solid #d4c430;
  border-radius: 4px 4px 6px 6px;
}
.rm-morty-legs {
  width: 36px; height: 18px;
  background: #6688cc;
  border-radius: 0 0 4px 4px;
}

/* R&M Quote */
.rm-quote-wrap { display: flex; flex-direction: column; justify-content: flex-end; max-width: 200px; }
.rm-quote {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--green);
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
  font-style: italic;
  transition: all 0.4s ease;
}

/* Dimension hop flash */
.rm-flash {
  position: fixed;
  inset: 0;
  background: rgba(0,255,136,0.15);
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.1s ease;
}
.rm-flash.flashing { opacity: 1; }

/* ============================================================
   LAYER 2 — Garrison + Chalkboard + Mini Portal
   ============================================================ */
.cartoon-bar {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.garrison-scene {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

/* Mr. Garrison CSS art */
.css-garrison { display: flex; flex-direction: column; align-items: center; }

.garrison-hat {
  width: 32px; height: 14px;
  background: #cc3300;
  border-radius: 4px 4px 0 0;
  position: relative;
}
.garrison-hat::after {
  content: '';
  position: absolute;
  bottom: 0; left: -3px; right: -3px;
  height: 5px;
  background: #aa2200;
  border-radius: 2px;
}
.garrison-head {
  width: 30px; height: 30px;
  background: #fde0a0;
  border-radius: 50%;
  border: 2px solid #d4b070;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
}
.garrison-eyes {
  display: flex; gap: 5px;
}
.garrison-eyes::before, .garrison-eyes::after {
  content: '';
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  border: 1.5px solid #333;
  box-shadow: inset 1px 1px 0 #3366cc;
}
.garrison-mouth {
  width: 10px; height: 3px;
  background: #cc7070;
  border-radius: 2px;
}
.garrison-body {
  width: 34px; height: 36px;
  background: #2244aa;
  border: 2px solid #1a3388;
  border-radius: 4px 4px 6px 6px;
}
.garrison-legs {
  width: 30px; height: 14px;
  background: #222;
  border-radius: 0 0 4px 4px;
}

/* Chalkboard */
.chalkboard {
  background: #2d6a2d;
  border: 4px solid #5a3010;
  border-radius: 6px;
  padding: 14px 18px;
  cursor: pointer;
  min-width: 200px;
  transition: transform 0.2s ease;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}
.chalkboard:hover { transform: rotate(-1deg) scale(1.02); }
.chalk-border {
  border: 1px dashed rgba(255,255,255,0.3);
  padding: 8px 12px;
  border-radius: 3px;
}
#garrison-text {
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
  display: block;
  min-height: 2em;
}

/* Mini portal scene */
.mini-portal-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mini-portal {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: conic-gradient(#00ff88, #00d4ff, #7bed9f, #00ff88);
  animation: rmSpin 3s linear infinite;
  position: relative;
  box-shadow: 0 0 20px rgba(0,255,136,0.5);
}
.mini-portal::before {
  content: '';
  position: absolute;
  top: 18%; left: 18%; right: 18%; bottom: 22%;
  background: #08080f;
  border-radius: 50%;
}

/* Rick peeking through mini portal */
.rick-peek {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -50px;
}
.rick-peek-hair {
  width: 24px; height: 10px;
  background: #c8c8c8;
  border-radius: 50% 50% 0 0;
}
.rick-peek-face {
  width: 22px; height: 20px;
  background: #b8d4f0;
  border-radius: 50%;
  border: 1.5px solid #90b0d8;
}
.rick-peek-coat {
  width: 28px; height: 18px;
  background: #f0f0f0;
  border-radius: 2px;
  border: 1.5px solid #ccc;
}
.mini-portal-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--green);
  letter-spacing: 0.06em;
}


/* ============================================================
   EXTRA INTERACTIONS
   ============================================================ */

/* Sticker speak bubble (floats above sticker) */
.sticker-bubble {
  position: fixed;
  background: #fff;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 8px 14px;
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.82rem;
  color: #1a1a1a;
  max-width: 220px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 3px 3px 0 #333;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sticker-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.sticker-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
}

/* Kenny death animation */
@keyframes kennyDie {
  0%   { transform: scale(1) rotate(0); opacity: 1; }
  40%  { transform: scale(1.2) rotate(-15deg); opacity: 1; }
  100% { transform: scale(0) rotate(90deg); opacity: 0; }
}
@keyframes kennyRevive {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.kenny-dying { animation: kennyDie 0.5s ease forwards !important; }
.kenny-reviving { animation: kennyRevive 0.4s ease forwards !important; }

/* "OH MY GOD THEY KILLED KENNY" toast */
.omg-toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: #cc2200;
  color: #fff;
  font-family: 'Comic Sans MS', cursive;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 4px 4px 0 #881100;
  z-index: 9500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}
.omg-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Card hover wobble */
.course-card:hover, .project-card:hover {
  animation: cardWobble 0.4s ease;
}
@keyframes cardWobble {
  0%,100% { transform: translateY(-4px) rotate(0); }
  25%      { transform: translateY(-4px) rotate(-0.5deg); }
  75%      { transform: translateY(-4px) rotate(0.5deg); }
}

/* Rick burp bubble */
.burp-bubble {
  position: absolute;
  background: rgba(0,255,136,0.15);
  border: 2px solid var(--green);
  border-radius: 12px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--green);
  max-width: 180px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
  bottom: 110%;
  left: 50%;
  transform-origin: bottom center;
}
.burp-bubble.show {
  opacity: 1;
  transform: scale(1) translateX(-30%);
}
.rm-rick { position: relative; cursor: pointer; }
.rm-rick:hover .rm-rick-coat { filter: brightness(1.05); }

/* Garrison mood indicator */
.garrison-mood {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

/* Konami portal explosion */
@keyframes konamiPortal {
  0%   { transform: scale(1); }
  50%  { transform: scale(20); opacity: 0.6; }
  100% { transform: scale(50); opacity: 0; }
}
.konami-explode { animation: konamiPortal 1.2s ease forwards !important; }

/* ══════════════════════════════════════════════
   COURSE CARD — clickable + file count
   ══════════════════════════════════════════════ */
.course-card { cursor: pointer; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.10); }
.course-file-count {
  margin-top: 8px; font-size: 0.72rem; color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Course detail modal */
.course-detail-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.course-detail-icon { font-size: 2.4rem; flex-shrink: 0; }
.course-detail-meta h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-bright); margin: 0 0 4px; }
.course-detail-meta p { font-size: 0.82rem; color: var(--text-dim); margin: 0; line-height: 1.5; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-glow);
  border-radius: 10px; padding: 24px 16px;
  text-align: center; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 14px;
  background: rgba(8,145,178,0.03);
}
.upload-zone:hover, .upload-zone.drag-over {
  background: rgba(8,145,178,0.08);
  border-color: var(--blue);
}
.upload-zone input[type=file] { display: none; }
.upload-zone-icon { font-size: 1.8rem; margin-bottom: 6px; }
.upload-zone p { font-size: 0.82rem; color: var(--text-dim); margin: 0; }
.upload-zone strong { color: var(--blue); }
.upload-zone small { display: block; font-size: 0.7rem; color: var(--text-dim); margin-top: 4px; }

/* File list */
.file-list { display: flex; flex-direction: column; gap: 7px; }
.file-item {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-3); border-radius: 8px;
  padding: 7px 11px; border: 1px solid var(--border);
}
.file-item-icon { font-size: 1.3rem; flex-shrink: 0; }
.file-item-name { flex: 1; font-size: 0.82rem; color: var(--text-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { font-size: 0.7rem; color: var(--text-dim); flex-shrink: 0; }
.file-item-del, .file-item-dl {
  background: none; border: none; cursor: pointer;
  font-size: 0.88rem; padding: 2px 5px; border-radius: 4px;
  flex-shrink: 0; transition: color 0.15s;
}
.file-item-del { color: var(--text-dim); text-decoration: none; }
.file-item-del:hover { color: #e74c3c; }
.file-item-dl { color: var(--blue); text-decoration: none; }
.file-item-dl:hover { opacity: 0.75; }
.file-empty { text-align: center; padding: 18px; color: var(--text-dim); font-size: 0.84rem; }

/* ══════════════════════════════════════════════
   WHITEBOARD — domain accordion
   ══════════════════════════════════════════════ */
.wb-container {
  margin-top: 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-2); overflow: hidden;
}
.wb-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--bg-3); }
.wb-tab-btn {
  flex: 1; padding: 8px 0; border: none; background: none; cursor: pointer;
  font-size: 0.8rem; color: var(--text-dim); font-family: var(--font-mono);
  letter-spacing: 0.03em; transition: color 0.15s, background 0.15s;
  border-bottom: 2px solid transparent;
}
.wb-tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--bg-2); }
.wb-tab-btn:hover:not(.active) { color: var(--text-bright); background: var(--bg-2); }
.wb-panel { display: none; padding: 12px; }
.wb-panel.active { display: block; }

/* Draw tab */
.wb-draw-toolbar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 9px;
}
.wb-tool-btn {
  padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-3); cursor: pointer; font-size: 0.76rem; color: var(--text);
  font-family: var(--font-mono); transition: background 0.15s, border-color 0.15s;
}
.wb-tool-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.wb-tool-btn:hover:not(.active) { border-color: var(--blue); color: var(--blue); }
.wb-color-picker { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.wb-size-range { width: 70px; cursor: pointer; accent-color: var(--blue); }
.wb-canvas {
  display: block; width: 100%; border-radius: 6px; background: #fff; cursor: crosshair;
  border: 1px solid var(--border); touch-action: none;
}

/* Text tab */
.wb-text-toolbar { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.wb-fmt-btn {
  width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg-3); cursor: pointer; font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; color: var(--text);
}
.wb-fmt-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.wb-text-editor {
  min-height: 140px; padding: 11px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text-bright); font-family: var(--font-sans);
  font-size: 0.88rem; line-height: 1.6; outline: none; white-space: pre-wrap;
}
.wb-text-editor:focus { border-color: var(--blue); }
.wb-text-save {
  margin-top: 8px; padding: 5px 14px; background: var(--blue); color: #fff;
  border: none; border-radius: 6px; cursor: pointer; font-size: 0.78rem;
  font-family: var(--font-mono); transition: opacity 0.15s;
}
.wb-text-save:hover { opacity: 0.85; }

/* Links tab */
.wb-link-form { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 11px; }
.wb-link-input {
  flex: 1; min-width: 110px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg-3); color: var(--text-bright);
  font-size: 0.82rem; font-family: var(--font-mono); outline: none;
}
.wb-link-input:focus { border-color: var(--blue); }
.wb-link-add {
  padding: 6px 13px; background: var(--blue); color: #fff; border: none;
  border-radius: 6px; cursor: pointer; font-size: 0.78rem;
  font-family: var(--font-mono); white-space: nowrap; transition: opacity 0.15s;
}
.wb-link-add:hover { opacity: 0.85; }
.wb-links-list { display: flex; flex-direction: column; gap: 6px; }
.wb-link-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--bg-3); border-radius: 6px; border: 1px solid var(--border);
}
.wb-link-item a {
  flex: 1; font-size: 0.82rem; color: var(--blue);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wb-link-item a:hover { text-decoration: underline; }
.wb-link-del {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 0.85rem; padding: 2px 4px; border-radius: 3px;
  transition: color 0.15s;
}
.wb-link-del:hover { color: #e74c3c; }

/* ══════════════════════════════════════════════
   PRIVACY TOGGLE — Layer ∞
   ══════════════════════════════════════════════ */
.privacy-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 99px; font-size: 0.7rem;
  font-family: var(--font-mono); font-weight: 600; white-space: nowrap;
}
.privacy-badge.public  { background: rgba(5,150,105,0.1); color: #059669; border: 1px solid rgba(5,150,105,0.3); }
.privacy-badge.private { background: rgba(124,58,237,0.1); color: #7c3aed; border: 1px solid rgba(124,58,237,0.3); }
.privacy-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 9px; font-size: 0.72rem; cursor: pointer; color: var(--text-dim);
  font-family: var(--font-mono); transition: border-color 0.15s, color 0.15s; white-space: nowrap;
}
.privacy-toggle:hover { border-color: var(--blue); color: var(--blue); }
.timeline-item.private-entry { opacity: 0.7; }
.timeline-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.timeline-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   OWNER / GUEST MODE
   ══════════════════════════════════════════════ */

/* Hide all editing controls in guest mode (default) */
body:not(.owner-mode) .edit-only { display: none !important; }
/* Hide private journal entries from guests */
body:not(.owner-mode) .private-entry { display: none !important; }

/* Owner toggle button */
.owner-toggle-btn {
  padding: 4px 12px; border-radius: 99px; background: var(--bg-3);
  border: 1px solid var(--border); cursor: pointer; font-size: 0.75rem;
  font-family: var(--font-mono); color: var(--text-dim);
  transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
}
.owner-toggle-btn:hover { border-color: var(--blue); color: var(--blue); }
.owner-toggle-btn.owner-active {
  background: rgba(8,145,178,0.1); border-color: var(--blue); color: var(--blue);
}

/* ══════════════════════════════════════════════
   COURSE DETAIL PAGE  (course.html)
   ══════════════════════════════════════════════ */
.course-main {
  padding: calc(var(--nav-h, 64px) + 48px) 0 80px;
  min-height: 100vh; background: var(--bg);
}

.back-link {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim);
  text-decoration: none; transition: color 0.15s; flex-shrink: 0;
}
.back-link:hover { color: var(--blue); }

.cp-breadcrumb {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0;
}

/* Course header card */
.course-header {
  display: flex; align-items: flex-start; gap: 20px; margin-bottom: 32px;
  padding: 28px 32px; background: var(--bg-2); border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.cp-header-icon { font-size: 3rem; flex-shrink: 0; line-height: 1; }
.cp-header-meta { flex: 1; min-width: 0; }
.cp-title {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700;
  color: var(--text-bright); margin: 0 0 8px; line-height: 1.2;
}
.cp-desc { font-size: 0.9rem; color: var(--text-dim); line-height: 1.65; margin: 0 0 12px; }

/* Course tabs */
.course-tabs-wrap {
  display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px;
}
.course-tab-btn {
  padding: 10px 22px; border: none; background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-dim);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color 0.15s; white-space: nowrap;
}
.course-tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.course-tab-btn:hover:not(.active) { color: var(--text-bright); }

.course-tab-panel { display: none; }
.course-tab-panel.active { display: block; animation: fadeSlideIn 0.2s ease; }

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

/* Notes panel overrides */
.cp-notes-editor {
  min-height: 360px; font-size: 0.92rem; background: #fff;
  border-radius: 8px; transition: background 0.2s;
}
body:not(.owner-mode) .cp-notes-editor {
  background: var(--bg-3); cursor: default; color: var(--text-dim);
}
.cp-notes-footer {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
}
.cp-guest-hint { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); }
.cp-autosave-hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--green); }

/* guest-only elements (reverse of edit-only) */
.guest-only { display: none; }
body:not(.owner-mode) .guest-only { display: inline; }
body:not(.owner-mode) .guest-only-block { display: block; }

/* Canvas panel */
.cp-canvas { height: 520px !important; }
body:not(.owner-mode) .cp-canvas { cursor: default !important; pointer-events: none; }
.cp-canvas-wrap { position: relative; }
.cp-canvas-guest-mask {
  display: none;
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.45); color: #fff; padding: 6px 16px;
  border-radius: 99px; font-size: 0.75rem; font-family: var(--font-mono);
  pointer-events: none; white-space: nowrap;
}
body:not(.owner-mode) .cp-canvas-guest-mask { display: flex; align-items: center; gap: 6px; }

/* ============================================================
   CARTOON RESIDENTS — cartoon.js styles
   ============================================================ */

/* ── Portal cursor trail ── */
.portal-trail-dot {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  opacity: 0.85;
  animation: trailFade 0.7s ease-out forwards;
}
@keyframes trailFade {
  0%   { transform: translate(-50%,-50%) scale(1); opacity: 0.85; }
  100% { transform: translate(-50%,-50%) scale(0.1); opacity: 0; }
}

/* ── Resident Morty ── */
#resident-morty {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 72px;
  height: 104px;
  z-index: 9000;
  cursor: pointer;
  transform-origin: bottom center;
  will-change: transform;
  user-select: none;
}
.morty-body { position: relative; width: 72px; }

/* Head */
.morty-head {
  position: relative;
  width: 44px; height: 46px;
  margin: 0 auto;
}
.morty-hair {
  position: absolute;
  top: -8px; left: 4px;
  width: 36px; height: 18px;
  background: #8B5E3C;
  border-radius: 50% 50% 0 0;
}
.morty-face {
  position: absolute;
  top: 4px; left: 0;
  width: 44px; height: 42px;
  background: #f5d98a;
  border-radius: 48% 48% 44% 44%;
  border: 2px solid #c9a84c;
  overflow: visible;
}
.morty-eye {
  position: absolute;
  width: 8px; height: 10px;
  background: #222;
  border-radius: 50%;
  top: 14px;
}
.morty-eye::after {
  content: '';
  position: absolute;
  width: 3px; height: 3px;
  background: #fff;
  border-radius: 50%;
  top: 1px; left: 1px;
}
.morty-eye-l { left: 7px; }
.morty-eye-r { right: 7px; }
.morty-eyebrow {
  position: absolute;
  width: 9px; height: 3px;
  background: #5a3e1b;
  border-radius: 2px;
  top: 8px;
}
.morty-brow-l { left: 6px; transform: rotate(-8deg); }
.morty-brow-r { right: 6px; transform: rotate(8deg); }
.morty-mouth {
  position: absolute;
  bottom: 7px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 6px;
  border-bottom: 3px solid #c96b3a;
  border-radius: 0 0 8px 8px;
}
.morty-blush {
  position: absolute;
  width: 8px; height: 5px;
  background: rgba(230,120,100,0.45);
  border-radius: 50%;
  bottom: 10px;
}
.morty-blush-l { left: 2px; }
.morty-blush-r { right: 2px; }

/* Shirt */
.morty-shirt {
  position: relative;
  width: 48px; height: 32px;
  margin: 0 auto;
  background: #f7f0c8;
  border-radius: 4px 4px 0 0;
  border: 2px solid #ccc5a0;
}
.morty-arm {
  position: absolute;
  width: 12px; height: 26px;
  background: #f7f0c8;
  border: 2px solid #ccc5a0;
  top: 2px;
  border-radius: 4px;
}
.morty-arm-l { left: -13px; transform-origin: top center; }
.morty-arm-r { right: -13px; transform-origin: top center; }

/* Pants */
.morty-pants {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 0;
}
.morty-leg {
  width: 18px; height: 28px;
  background: #4a90d9;
  border-radius: 0 0 4px 4px;
  border: 2px solid #2e6db4;
  transform-origin: top center;
}

/* Walking animation */
#resident-morty.morty-walking .morty-arm-l { animation: swingArm 0.55s ease-in-out infinite alternate; }
#resident-morty.morty-walking .morty-arm-r { animation: swingArm 0.55s ease-in-out infinite alternate-reverse; }
#resident-morty.morty-walking .morty-leg:first-child { animation: swingLeg 0.55s ease-in-out infinite alternate; }
#resident-morty.morty-walking .morty-leg:last-child  { animation: swingLeg 0.55s ease-in-out infinite alternate-reverse; }
@keyframes swingArm {
  from { transform: rotate(-18deg); }
  to   { transform: rotate(18deg); }
}
@keyframes swingLeg {
  from { transform: rotate(-14deg); }
  to   { transform: rotate(14deg); }
}

/* Scared flash */
#resident-morty.morty-scared .morty-face { background: #ffe0e0; }

/* Speech bubble */
.morty-bubble {
  position: absolute;
  bottom: 110px; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #333;
  border-radius: 10px;
  padding: 7px 11px;
  font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
  font-size: 0.72rem;
  color: #222;
  white-space: nowrap;
  max-width: 200px;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 9001;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.18);
}
.morty-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px; left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
  filter: drop-shadow(0 2px 0 #333);
}
.morty-bubble.visible { opacity: 1; }

/* ── BMO Widget ── */
#bmo-widget {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 68px;
  z-index: 8800;
  cursor: pointer;
  user-select: none;
}
.bmo-body {
  width: 68px;
  background: #56c1b0;
  border-radius: 10px 10px 6px 6px;
  border: 3px solid #2e9b87;
  padding: 6px 6px 4px;
  box-shadow: 3px 4px 0 #1f7060;
  position: relative;
}
.bmo-screen {
  background: #c3f0d8;
  border: 2px solid #2e9b87;
  border-radius: 5px;
  height: 42px;
  position: relative;
  overflow: hidden;
  margin-bottom: 5px;
}
.bmo-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
}
.bmo-eye {
  width: 8px; height: 10px;
  background: #1a6b58;
  border-radius: 50%;
  display: inline-block;
}
.bmo-eye + .bmo-eye { margin-left: 8px; }
.bmo-face { flex-direction: row; align-items: center; justify-content: center; gap: 0; }
.bmo-eye-l { position: absolute; left: 10px; top: 10px; }
.bmo-eye-r { position: absolute; right: 10px; top: 10px; }
.bmo-bmo-mouth {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 6px;
  border-bottom: 3px solid #1a6b58;
  border-radius: 0 0 9px 9px;
}
.bmo-pixel {
  position: absolute;
  width: 4px; height: 4px;
  background: #7ee8c0;
  border-radius: 1px;
}
.bmo-px1 { top: 3px; left: 3px; }
.bmo-px2 { top: 3px; right: 3px; }
.bmo-px3 { bottom: 3px; right: 3px; }
.bmo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
}
.bmo-dpad { position: relative; width: 22px; height: 22px; }
.bmo-dpad-h, .bmo-dpad-v {
  position: absolute;
  background: #2e9b87;
  border-radius: 2px;
}
.bmo-dpad-h { width: 100%; height: 8px; top: 50%; transform: translateY(-50%); }
.bmo-dpad-v { height: 100%; width: 8px; left: 50%; transform: translateX(-50%); }
.bmo-btns { display: flex; gap: 4px; }
.bmo-btn {
  width: 13px; height: 13px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.4rem; font-weight: 700; color: #fff;
  font-family: var(--font-mono);
}
.bmo-btn-a { background: #e85d75; }
.bmo-btn-b { background: #f0a830; }
.bmo-ports {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 3px 0 0;
}
.bmo-port {
  width: 10px; height: 5px;
  background: #2e9b87;
  border-radius: 2px;
}
.bmo-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 2px solid #2e9b87;
  border-radius: 10px;
  padding: 7px 10px;
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.68rem;
  color: #1a6b58;
  white-space: normal;
  max-width: 160px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
  z-index: 8801;
}
.bmo-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px; right: 18px;
  border: 8px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
  filter: drop-shadow(0 2px 0 #2e9b87);
}
.bmo-bubble.visible { opacity: 1; }
#bmo-widget.bmo-bounce { animation: bmoBounce 0.5s ease; }
@keyframes bmoBounce {
  0%,100% { transform: translateY(0); }
  30%      { transform: translateY(-14px); }
  60%      { transform: translateY(-6px); }
}

/* ── Flying Saucer ── */
#flying-saucer {
  position: fixed;
  top: 15vh;
  left: -180px;
  width: 160px;
  z-index: 9500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
#flying-saucer.visible { opacity: 1; }
.saucer-body { position: relative; }
.saucer-dome {
  width: 54px; height: 32px;
  background: radial-gradient(ellipse at 35% 35%, #b0f0ff, #50c8e8);
  border-radius: 50% 50% 0 0;
  margin: 0 auto;
  border: 2px solid #30a8cc;
  position: relative;
  z-index: 2;
}
.saucer-disk {
  width: 140px; height: 36px;
  background: radial-gradient(ellipse at 50% 40%, #d0d0d0, #888);
  border-radius: 50%;
  margin: -8px auto 0;
  border: 2px solid #666;
  position: relative;
  z-index: 1;
  box-shadow: 0 6px 20px rgba(0,200,255,0.3);
}
.saucer-lights {
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 14px;
}
.saucer-lights span {
  width: 7px; height: 7px;
  background: #00ff88;
  border-radius: 50%;
  animation: blink 0.8s ease-in-out infinite;
}
.saucer-lights span:nth-child(2) { animation-delay: 0.2s; background: #ffee00; }
.saucer-lights span:nth-child(3) { animation-delay: 0.4s; background: #ff6060; }
.saucer-lights span:nth-child(4) { animation-delay: 0.6s; background: #00ff88; }
@keyframes blink {
  0%,100% { opacity: 1; } 50% { opacity: 0.2; }
}
.saucer-beam {
  width: 60px; height: 50px;
  margin: 0 auto;
  background: linear-gradient(to bottom, rgba(0,255,136,0.35), transparent);
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  position: relative;
  top: 0;
  animation: beamPulse 1.5s ease-in-out infinite;
}
@keyframes beamPulse {
  0%,100% { opacity: 0.7; } 50% { opacity: 0.2; }
}

/* ── Rick Edge Peek ── */
/* ── Rick Side Wanderer ── */
#rick-wander {
  position: fixed;
  z-index: 9200;
  cursor: pointer;
  user-select: none;
  width: 62px;
}
#rick-wander.rick-side-left  { left: 0; }
#rick-wander.rick-side-right { right: 0; }

.rick-wander-art {
  position: relative;
  width: 58px;
}

/* ── BMO (Adventure Time) CSS art — side wanderer ── */
.bmo-wander { position: relative; width: 58px; }

/* Arms */
.bmow-arm {
  position: absolute;
  width: 9px; height: 26px;
  background: #7ecec4;
  border: 2px solid #4aada0;
  border-radius: 4px;
  top: 18px; z-index: 0;
}
.bmow-arm-l { left: -9px; transform: rotate(12deg); }
.bmow-arm-r { right: -9px; transform: rotate(-12deg); }

/* Main body */
.bmow-body {
  width: 54px;
  background: #5ecfbe;
  border: 2.5px solid #2e9e8e;
  border-radius: 10px;
  padding: 5px 5px 6px;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.2);
}

/* Screen */
.bmow-screen {
  width: 38px; height: 30px;
  background: #d8f5e8;
  border: 2px solid #2c8c7c;
  border-radius: 4px;
  margin: 0 auto 4px;
  position: relative;
}
.bmow-eye {
  position: absolute;
  width: 7px; height: 9px;
  background: #111;
  border-radius: 50%;
  top: 8px;
}
.bmow-eye-l { left: 6px; }
.bmow-eye-r { right: 6px; }
.bmow-eye::after {
  content: '';
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  top: 2px; left: 2px;
}
.bmow-mouth {
  position: absolute;
  width: 14px; height: 6px;
  border: 2px solid #111;
  border-top: none;
  border-radius: 0 0 8px 8px;
  bottom: 6px;
  left: 50%; transform: translateX(-50%);
}

/* Speaker dots */
.bmow-speaker {
  position: absolute;
  top: 8px; right: 5px;
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 2px;
}
.bmow-speaker span {
  width: 3px; height: 3px;
  background: #2e9e8e;
  border-radius: 50%;
  display: block;
}

/* Card slot */
.bmow-slot {
  width: 34px; height: 5px;
  background: #2e9e8e;
  border-radius: 2px;
  margin: 0 auto 4px;
}

/* Controls row */
.bmow-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}
.bmow-dpad { position: relative; width: 18px; height: 18px; }
.bmow-dpad-h, .bmow-dpad-v {
  position: absolute;
  background: #e8c840;
  border-radius: 2px;
}
.bmow-dpad-h { width: 18px; height: 6px; top: 6px; left: 0; }
.bmow-dpad-v { width: 6px; height: 18px; top: 0; left: 6px; }

.bmow-btns { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.bmow-btn {
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.3);
}
.bmow-btn-tri {
  width: 0; height: 0;
  border-radius: 0;
  border: none;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid #5ab4e8;
  background: transparent;
}
.bmow-btn-grn { width: 9px; height: 9px; background: #44cc44; }
.bmow-btn-red { width: 9px; height: 9px; background: #e83a5e; }

/* BMO label */
.bmow-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.5rem;
  font-weight: 800;
  color: #1a6e64;
  letter-spacing: 0.1em;
  text-align: center;
  margin-top: 3px;
  opacity: 0.8;
}

/* Legs */
.bmow-legs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}
.bmow-leg {
  width: 12px; height: 14px;
  background: #5ecfbe;
  border: 2px solid #2e9e8e;
  border-radius: 2px 2px 5px 5px;
}
/* Rick hair */
.rick-pk-hair {
  width: 50px; height: 22px;
  background: #c8c8e8;
  border-radius: 50% 50% 0 0;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  box-shadow: -4px -4px 0 #a8a8cc, 4px -4px 0 #a8a8cc;
}
/* Rick head */
.rick-pk-head {
  width: 50px; height: 50px;
  background: #d4e8f0;
  border-radius: 44% 44% 40% 40%;
  border: 2px solid #90b8c8;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}
.rick-pk-eye {
  position: absolute;
  width: 9px; height: 11px;
  background: #222;
  border-radius: 50%;
  top: 14px;
}
.rick-pk-eye::after {
  content: '';
  position: absolute;
  width: 3px; height: 3px;
  background: #fff;
  border-radius: 50%;
  top: 1px; left: 1px;
}
.rick-pk-eye-l { left: 7px; }
.rick-pk-eye-r { right: 7px; }
.rick-pk-nose {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 12px;
  background: #b8d0dc;
  border-radius: 40% 40% 50% 50%;
  border-bottom: 2px solid #90b8c8;
}
.rick-pk-mouth {
  position: absolute;
  bottom: 7px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 6px;
  border-bottom: 3px solid #7a9cac;
  border-radius: 0 0 10px 10px;
}
.rick-pk-drool {
  position: absolute;
  bottom: 2px; left: 38%;
  width: 4px; height: 8px;
  background: #60b8d8;
  border-radius: 0 0 4px 4px;
  opacity: 0.7;
}
/* Rick coat */
.rick-pk-coat {
  width: 58px; height: 28px;
  background: #f4f4f4;
  border-radius: 4px 4px 0 0;
  border: 2px solid #ccc;
  margin: 0 auto;
}

.rick-wander-bubble {
  position: absolute;
  top: 10px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 10px;
  padding: 7px 11px;
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.7rem;
  color: #222;
  white-space: normal;
  max-width: 180px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 9201;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.18);
}
#rick-wander.rick-side-left  .rick-wander-bubble { left: 66px; }
#rick-wander.rick-side-right .rick-wander-bubble { right: 66px; }
.rick-wander-bubble.visible { opacity: 1; }


/* ── Plumbus Widget ── */
#plumbus-widget {
  position: fixed;
  bottom: 20px;
  left: 90px; /* leave room for Rick wanderer */
  z-index: 8700;
  cursor: pointer;
  user-select: none;
  width: 52px;
}
.plumbus-art {
  position: relative;
  width: 52px;
  transition: transform 0.2s;
}
#plumbus-widget:hover .plumbus-art { transform: scale(1.1) rotate(-5deg); }
.plumbus-top {
  width: 20px; height: 20px;
  background: radial-gradient(circle at 40% 35%, #d4a8e0, #8b4aad);
  border-radius: 50% 50% 30% 30%;
  margin: 0 auto;
  border: 2px solid #6a2e8a;
}
.plumbus-body {
  width: 48px; height: 60px;
  background: radial-gradient(ellipse at 45% 40%, #c090d8, #7a3a9a);
  border-radius: 46% 46% 40% 40%;
  border: 2px solid #5a2a7a;
  margin: -4px auto 0;
  position: relative;
  overflow: visible;
}
.plumbus-eye {
  position: absolute;
  width: 8px; height: 8px;
  background: #ffee88;
  border-radius: 50%;
  top: 14px;
  border: 1px solid #cc9900;
}
.plumbus-eye-l { left: 8px; }
.plumbus-eye-r { right: 8px; }
.plumbus-bump {
  position: absolute;
  background: #9a5abf;
  border-radius: 50%;
  border: 1px solid #7a3a9a;
}
.plumbus-bump-1 { width: 10px; height: 10px; bottom: 12px; left: 4px; }
.plumbus-bump-2 { width: 12px; height: 12px; bottom: 8px; left: 50%; transform: translateX(-50%); }
.plumbus-bump-3 { width: 10px; height: 10px; bottom: 12px; right: 4px; }
.plumbus-bottom {
  width: 28px; height: 16px;
  background: linear-gradient(to bottom, #7a3a9a, #5a2a6a);
  border-radius: 0 0 50% 50%;
  border: 2px solid #5a2a7a;
  margin: 0 auto;
}
.plumbus-handle {
  width: 8px; height: 24px;
  background: linear-gradient(to bottom, #8b4aad, #5a2a7a);
  border-radius: 0 0 4px 4px;
  border: 1px solid #5a2a7a;
  margin: 0 auto;
}
.plumbus-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: #fff;
  border: 2px solid #8b4aad;
  border-radius: 10px;
  padding: 7px 10px;
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.68rem;
  color: #5a2a7a;
  white-space: normal;
  max-width: 170px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 8701;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
}
.plumbus-bubble.visible { opacity: 1; }

/* ── Meeseeks Box ── */
#meeseeks-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 8750;
  cursor: pointer;
  user-select: none;
}
.meeseeks-box-art {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #00d4ff, #00a8cc);
  border: 3px solid #0088aa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 8px rgba(0,0,0,0.4);
  box-shadow: 0 4px 12px rgba(0,180,220,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}
#meeseeks-box:hover .meeseeks-box-art { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,180,220,0.6); }
#meeseeks-box.pressed .meeseeks-box-art { transform: scale(0.94); }

#meeseeks-char {
  position: fixed;
  bottom: 148px;
  right: 10px;
  z-index: 8749;
  width: 70px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
#meeseeks-char.visible { opacity: 1; transform: translateY(0); }

.meeseeks-art { position: relative; width: 70px; }
.meeseeks-hair {
  width: 52px; height: 18px;
  background: #00c8e8;
  border-radius: 50% 50% 0 0;
  margin: 0 auto;
  box-shadow: -4px -4px 0 #009ab0, 4px -4px 0 #009ab0;
}
.meeseeks-head {
  width: 52px; height: 52px;
  background: radial-gradient(ellipse at 40% 35%, #40e0f8, #00b8d8);
  border-radius: 48% 48% 44% 44%;
  border: 2px solid #009ab0;
  margin: 0 auto;
  position: relative;
}
.meeseeks-eye {
  position: absolute;
  width: 10px; height: 12px;
  background: #fff;
  border-radius: 50%;
  top: 16px;
  border: 1px solid #009ab0;
}
.meeseeks-eye::after {
  content: '';
  position: absolute;
  width: 5px; height: 6px;
  background: #222;
  border-radius: 50%;
  top: 3px; left: 2px;
}
.meeseeks-eye-l { left: 8px; }
.meeseeks-eye-r { right: 8px; }
.meeseeks-smile {
  position: absolute;
  bottom: 9px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 10px;
  border-bottom: 3px solid #007a9a;
  border-radius: 0 0 14px 14px;
}
.meeseeks-body {
  width: 54px; height: 40px;
  background: linear-gradient(to bottom, #20c8e8, #00a8c8);
  border-radius: 6px 6px 2px 2px;
  border: 2px solid #009ab0;
  margin: 0 auto;
  position: relative;
}
.meeseeks-arm {
  position: absolute;
  width: 14px; height: 30px;
  background: linear-gradient(to bottom, #20c8e8, #00a8c8);
  border: 2px solid #009ab0;
  border-radius: 4px;
  top: 2px;
}
.meeseeks-arm-l { left: -14px; transform: rotate(15deg); transform-origin: top; }
.meeseeks-arm-r { right: -14px; transform: rotate(-15deg); transform-origin: top; }
.meeseeks-legs { display: flex; gap: 4px; justify-content: center; }
.meeseeks-leg {
  width: 20px; height: 26px;
  background: #00a8c8;
  border-radius: 0 0 4px 4px;
  border: 2px solid #009ab0;
}
.meeseeks-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 2px solid #009ab0;
  border-radius: 10px;
  padding: 7px 10px;
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.68rem;
  color: #005a70;
  white-space: normal;
  max-width: 170px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 8751;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
}
.meeseeks-bubble.visible { opacity: 1; }

/* ── Dimensional Rift ── */
.dim-rift {
  position: fixed;
  width: 6px;
  height: 0;
  background: linear-gradient(to bottom, transparent, #00ff88, #00d4ff, #00ff88, transparent);
  border-radius: 3px;
  z-index: 9300;
  pointer-events: none;
  box-shadow: 0 0 12px #00ff88, 0 0 30px rgba(0,255,136,0.4);
  opacity: 0;
  transition: height 0.4s ease-out, opacity 0.4s ease-out;
}
.dim-rift.rift-open {
  height: clamp(60px, 12vh, 140px);
  opacity: 1;
}
.dim-rift::before, .dim-rift::after {
  content: '';
  position: absolute;
  left: -8px;
  width: 22px;
  height: 3px;
  background: linear-gradient(to right, transparent, #00ff88, transparent);
  border-radius: 2px;
  box-shadow: 0 0 8px #00ff88;
}
.dim-rift::before { top: 20%; transform: rotate(-25deg); }
.dim-rift::after  { bottom: 20%; transform: rotate(25deg); }

/* ============================================================
   ACCORDION LIST
   ============================================================ */
.acc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.acc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  transition: border-color 0.2s;
}
.acc-item:hover { border-color: var(--cyan); }

.acc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.acc-header:hover { background: var(--bg-3); }

.acc-icon  { font-size: 1.2rem; flex-shrink: 0; }
.acc-date  { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; }
.acc-title { font-family: var(--font-mono); font-size: 0.88rem; font-weight: 600; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-badges { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.acc-filecount { font-size: 0.72rem; color: var(--text-dim); flex-shrink: 0; }
.file-item-view { background:none; border:1px solid var(--border); border-radius:5px; cursor:pointer; color:var(--text-muted); padding:2px 6px; font-size:0.82rem; transition:all 0.15s; flex-shrink:0; }
.file-item-view:hover { border-color:var(--blue); color:var(--blue); }
/* ── Folder group in file list ── */
.file-folder-group { border:1px solid var(--border); border-radius:10px; overflow:hidden; margin-bottom:6px; }
.file-folder-header { display:flex; align-items:center; gap:8px; padding:8px 12px; cursor:pointer; background:var(--bg-3); transition:background 0.15s; user-select:none; }
.file-folder-header:hover { background:rgba(8,145,178,0.07); }
.file-folder-icon { font-size:1.1rem; flex-shrink:0; }
.file-folder-name { font-family:var(--font-mono); font-size:0.82rem; font-weight:600; color:var(--text-bright); flex:1; }
.file-folder-count { font-family:var(--font-mono); font-size:0.7rem; color:var(--text-dim); flex-shrink:0; }
.file-folder-arrow { font-size:0.6rem; color:var(--text-dim); transition:transform 0.2s; flex-shrink:0; }
.file-folder-group.open .file-folder-arrow { transform:rotate(90deg); }
.file-folder-body { max-height:0; overflow:hidden; transition:max-height 0.25s ease; padding:0 8px; }
.file-folder-group.open .file-folder-body { max-height:9999px; padding:6px 8px; }
.acc-chevron {
  font-size: 0.65rem;
  color: var(--text-dim);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.acc-item.acc-open .acc-chevron { transform: rotate(180deg); }

/* Collapsible body */
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 18px;
  border-top: 0px solid var(--border);
}
.acc-item.acc-open .acc-body {
  max-height: 400px;
  padding: 14px 18px 18px;
  border-top-width: 1px;
}

/* ── Folder wrapper (course directory) ── */
.folder-item {
  border-color: var(--cyan) !important;
  background: var(--bg-2);
}
.folder-item > .folder-header {
  background: rgba(8,145,178,0.06);
}
.folder-item > .folder-header:hover {
  background: rgba(8,145,178,0.12);
}
.folder-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  background: rgba(8,145,178,0.12);
  border: 1px solid rgba(8,145,178,0.3);
  border-radius: 99px;
  padding: 2px 10px;
  flex-shrink: 0;
}
/* Folder body needs larger max-height to fit all nested courses */
.folder-item.acc-open > .acc-body.folder-body {
  max-height: 9999px;
  transition: max-height 0.5s ease, padding 0.3s ease;
}
.folder-inner {
  padding: 4px 0 2px;
}

.acc-desc {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 12px;
}

.acc-open-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.acc-open-btn:hover { background: var(--cyan); color: #000; }

.acc-edit-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 4px;
  width: 26px; height: 26px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.acc-edit-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ============================================================
   INTRO OVERLAY
   ============================================================ */
#intro-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.7s ease;
}
#intro-overlay.fade-out { opacity: 0; pointer-events: none; }

#intro-video {
  display: block;
  width: min(560px, 85vw);
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

/* Skip hint */
.intro-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
  animation: hintBlink 2s ease-in-out infinite;
}
@keyframes hintBlink {
  0%,100% { opacity: 0.3; }
  50%     { opacity: 0.7; }
}
