/* ============================
   GABY LEARNS PYTHON — THE GRAND ARCADE!
   Theme Colors: yellow, red, pink, blue, purple
   ============================ */

:root {
  --yellow: #f5c518;
  --yellow-glow: rgba(245, 197, 24, 0.3);
  --red: #e63946;
  --red-glow: rgba(230, 57, 70, 0.3);
  --pink: #ff6b9d;
  --pink-glow: rgba(255, 107, 157, 0.3);
  --blue: #4a90d9;
  --blue-glow: rgba(74, 144, 217, 0.3);
  --purple: #9b59b6;
  --purple-glow: rgba(155, 89, 182, 0.3);

  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0c0;
  --text-muted: #6c6c80;
  --border-color: #2a2a4a;

  --font-display: 'Press Start 2P', monospace;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --max-width: 1100px;
  --nav-height: 60px;
}

/* ============================
   RESET & BASE
   ============================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--pink);
}

code, kbd {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  font-size: 0.75em;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--border-color);
  line-height: 1.4;
}

/* Custom cursor */
body.custom-cursor-active {
  cursor: none;
}

body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active .btn,
body.custom-cursor-active kbd,
body.custom-cursor-active .docs-table td a {
  cursor: none;
}

.custom-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  font-size: 1.6rem;
  transform: translate(-50%, -50%);
  transition: transform 0.05s;
  display: none;
  line-height: 1;
}

/* ============================
   SCAN LINES
   ============================ */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Twinkling stars */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  animation: star-twinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
}

/* ============================
   CONTAINER
   ============================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================
   HEADER / NAV
   ============================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: var(--nav-height);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--yellow) !important;
  text-decoration: none;
  letter-spacing: 0.05em;
  position: relative;
}

.logo-text {
  position: relative;
}

.logo-text::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--red), var(--pink), var(--blue), var(--purple));
  background-size: 200% 100%;
  animation: logo-underline 3s linear infinite;
}

@keyframes logo-underline {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.logo:hover {
  color: var(--yellow) !important;
  filter: brightness(1.2);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-gh {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

.nav-gh:hover {
  border-color: var(--purple) !important;
  background: rgba(155, 89, 182, 0.1) !important;
  color: var(--purple) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ============================
   HERO
   ============================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: float 8s ease-in-out infinite;
}

.circle-1 {
  width: 400px; height: 400px; background: var(--yellow);
  top: -100px; left: -100px;
  animation-delay: 0s;
}

.circle-2 {
  width: 350px; height: 350px; background: var(--red);
  top: 50%; right: -100px;
  animation-delay: -2s;
}

.circle-3 {
  width: 300px; height: 300px; background: var(--pink);
  bottom: -80px; left: 20%;
  animation-delay: -4s;
}

.circle-4 {
  width: 250px; height: 250px; background: var(--blue);
  top: 20%; left: 40%;
  animation-delay: -6s;
}

.circle-5 {
  width: 200px; height: 200px; background: var(--purple);
  bottom: 30%; right: 20%;
  animation-delay: -3s;
}

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

.hero-content {
  position: relative;
  text-align: center;
  max-width: 760px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--yellow);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
  animation: pulse-glow 2s ease-in-out infinite, neon-flicker 4s ease-in-out infinite;
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 10px var(--yellow-glow), 0 0 20px var(--yellow-glow);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.hero-python {
  display: block;
  font-size: clamp(2.2rem, 7vw, 5rem);
  background: linear-gradient(135deg, var(--yellow), var(--red), var(--pink), var(--blue), var(--purple), var(--yellow));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(245, 197, 24, 0.3));
  animation: gradient-shift 4s ease-in-out infinite;
}

.hero-python.glitch-word {
  display: block;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.55rem, 1.5vw, 0.85rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.2em;
}

.hero-host {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  min-height: 5em;
}

.hero-host strong {
  color: var(--yellow);
}

.host-cursor {
  display: inline-block;
  color: var(--yellow);
  animation: cursor-blink 0.7s step-end infinite;
  font-weight: 700;
}

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

.host-cursor.done {
  animation: none;
  opacity: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--yellow), var(--red));
  color: #0f0f1a !important;
  border-color: var(--yellow);
  box-shadow: 0 0 20px var(--yellow-glow);
  position: relative;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--yellow), var(--red), var(--pink), var(--blue), var(--purple)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rainbow-rotate 3s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::after {
  opacity: 1;
}

@keyframes rainbow-rotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px var(--yellow-glow), 0 0 60px var(--red-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--blue) !important;
  border-color: var(--blue);
}

.btn-secondary:hover {
  background: rgba(74, 144, 217, 0.1);
  box-shadow: 0 0 20px var(--blue-glow);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
  display: inline-block;
}

.stat-num.counting {
  animation: count-pop 0.3s ease-out;
}

@keyframes count-pop {
  0% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.stat-num.yellow { color: var(--yellow); }
.stat-num.red { color: var(--red); }
.stat-num.pink { color: var(--pink); }
.stat-num.blue { color: var(--blue); }

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

/* ============================
   SECTIONS — GENERAL
   ============================ */

.section {
  padding: 5rem 0;
  position: relative;
}

.section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  transition: color 0.3s;
}

.section-title:hover {
  color: var(--yellow);
}

.title-deco {
  font-size: 0.7em;
}

.title-deco.yellow { color: var(--yellow); }
.title-deco.purple { color: var(--purple); }
.title-deco.blue { color: var(--blue); }
.title-deco.pink { color: var(--pink); }

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================
   SCROLL REVEAL ANIMATIONS
   ============================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal.visible .reveal-child:nth-child(2) { transition-delay: 0.1s; }
.reveal.visible .reveal-child:nth-child(3) { transition-delay: 0.2s; }
.reveal.visible .reveal-child:nth-child(4) { transition-delay: 0.3s; }
.reveal.visible .reveal-child:nth-child(5) { transition-delay: 0.4s; }

.about-card.reveal-child {
  transition-delay: 0s;
}

.reveal.visible .about-card.reveal-child:nth-child(1) { transition-delay: 0.05s; }
.reveal.visible .about-card.reveal-child:nth-child(2) { transition-delay: 0.1s; }
.reveal.visible .about-card.reveal-child:nth-child(3) { transition-delay: 0.15s; }
.reveal.visible .about-card.reveal-child:nth-child(4) { transition-delay: 0.2s; }
.reveal.visible .about-card.reveal-child:nth-child(5) { transition-delay: 0.25s; }

/* Shimmer on section titles */
.section-title {
  position: relative;
  overflow: hidden;
}

.section-title::after {
  content: '';
  display: none;
}

/* ============================
   ABOUT
   ============================ */

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

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1;
}

/* Shimmer overlay on hover */
.about-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 55%,
    transparent 60%
  );
  background-size: 300% 100%;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.about-card:hover::after {
  opacity: 1;
  animation: shimmer-slide 1.5s ease-in-out infinite;
}

@keyframes shimmer-slide {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.card-yellow::before { background: var(--yellow); }
.card-red::before { background: var(--red); }
.card-pink::before { background: var(--pink); }
.card-blue::before { background: var(--blue); }
.card-purple::before { background: var(--purple); }

.about-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
}

.card-yellow:hover { box-shadow: 0 8px 30px var(--yellow-glow); }
.card-red:hover { box-shadow: 0 8px 30px var(--red-glow); }
.card-pink:hover { box-shadow: 0 8px 30px var(--pink-glow); }
.card-blue:hover { box-shadow: 0 8px 30px var(--blue-glow); }
.card-purple:hover { box-shadow: 0 8px 30px var(--purple-glow); }

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-yellow h3 { color: var(--yellow); }
.card-red h3 { color: var(--red); }
.card-pink h3 { color: var(--pink); }
.card-blue h3 { color: var(--blue); }
.card-purple h3 { color: var(--purple); }

.about-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.about-card code {
  font-size: 0.85em;
  color: var(--yellow);
  background: rgba(245, 197, 24, 0.1);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.about-mission {
  grid-column: 1 / -1;
  text-align: center;
}

.about-mission p {
  max-width: 600px;
  margin: 0 auto;
}

/* ============================
   DOCS
   ============================ */

.docs-section {
  margin-bottom: 3rem;
}

.docs-section:last-child {
  margin-bottom: 0;
}

.docs-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.heading-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.heading-badge.yellow { background: var(--yellow); color: #0f0f1a; }
.heading-badge.red { background: var(--red); color: #fff; }

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 500px;
}

.docs-table thead {
  background: var(--bg-card);
}

.docs-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--yellow);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.docs-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.docs-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.docs-table tbody tr:last-child td {
  border-bottom: none;
}

.docs-table td:first-child,
.docs-table th:first-child {
  width: 50px;
  text-align: center;
  color: var(--purple);
  font-weight: 600;
}

.docs-table td a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--border-color);
  transition: all 0.2s;
}

.docs-table td a:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

/* ============================
   PYLINGS
   ============================ */

.pylings-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.pylings-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.pylings-text strong {
  color: var(--pink);
}

.pylings-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pylings-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.feature-icon {
  font-size: 0.9rem;
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.feature-icon.yellow { color: var(--yellow); }
.feature-icon.red { color: var(--red); }
.feature-icon.pink { color: var(--pink); }
.feature-icon.blue { color: var(--blue); }
.feature-icon.purple { color: var(--purple); }

.pylings-code {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}

.pylings-code code {
  color: var(--text-primary);
}

.pylings-code .cmt {
  color: var(--text-muted);
  font-style: italic;
}

/* Terminal mockup */
.pylings-terminal {
  background: #0a0a14;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.8rem;
  position: relative;
}

.pylings-terminal::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 11px;
  background: linear-gradient(
    135deg, var(--yellow), var(--red), var(--pink), var(--blue), var(--purple), var(--yellow)
  );
  background-size: 400% 400%;
  z-index: -1;
  animation: border-dance 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.pylings-terminal:hover::before {
  opacity: 1;
}

@keyframes border-dance {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: #12121e;
  border-bottom: 1px solid var(--border-color);
}

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

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: #2ecc71; }

.terminal-label {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 1rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  line-height: 2;
}

.terminal-line {
  color: var(--text-secondary);
}

.t-green { color: #2ecc71; }
.t-yellow { color: var(--yellow); }
.t-gray { color: var(--text-muted); }
.t-pink { color: var(--pink); }
.t-dim { color: var(--text-muted); font-style: italic; }

.terminal-prompt {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-style: italic;
}

.terminal-prompt .t-pink {
  animation: cursor-blink 1s step-end infinite;
}

/* ============================
   CHANGELOG
   ============================ */

#changelog-container {
  max-width: 700px;
  margin: 0 auto;
}

.changelog-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem;
  color: var(--text-muted);
}

.loading-dot {
  font-size: 0.7rem;
  animation: loading-bounce 1.4s ease-in-out infinite;
}

.loading-dot.yellow { color: var(--yellow); animation-delay: 0s; }
.loading-dot.red { color: var(--red); animation-delay: 0.15s; }
.loading-dot.pink { color: var(--pink); animation-delay: 0.3s; }
.loading-dot.blue { color: var(--blue); animation-delay: 0.45s; }
.loading-dot.purple { color: var(--purple); animation-delay: 0.6s; }

@keyframes loading-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}

.loading-text {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.changelog-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.changelog-entry:hover {
  border-color: var(--purple);
}

.changelog-date {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--purple);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.changelog-entry h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

.changelog-section {
  margin-top: 1rem;
}

.changelog-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pink);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.changelog-section ul {
  list-style: none;
  padding: 0;
}

.changelog-section li {
  position: relative;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.changelog-section li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

/* ============================
   CONTRIBUTORS
   ============================ */

#contributors-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.contributor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s;
  min-width: 160px;
}

.contributor-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--blue);
  box-shadow: 0 8px 30px var(--blue-glow);
}

.contributor-card:hover .contributor-avatar {
  transform: rotate(360deg) scale(1.1);
}

.contributor-card:hover .contributor-avatar-placeholder {
  transform: rotate(360deg) scale(1.1);
}

.contributor-avatar,
.contributor-avatar-placeholder {
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.contributor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--yellow);
}

.contributor-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  border: 3px solid var(--purple);
}

.contributor-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.contributor-role {
  font-size: 0.75rem;
  color: var(--yellow);
  text-align: center;
}

.contributor-commits {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================
   FOOTER
   ============================ */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--yellow);
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-gh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary) !important;
  transition: all 0.2s;
}

.footer-gh:hover {
  border-color: var(--purple) !important;
  color: var(--purple) !important;
  background: rgba(155, 89, 182, 0.1);
}

.footer-top {
  font-size: 0.85rem;
  color: var(--text-muted) !important;
}

.footer-top:hover {
  color: var(--blue) !important;
}

.footer-caine {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-caine p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer-caine strong {
  color: var(--yellow);
  font-style: normal;
}

/* ============================
   GLITCH EFFECTS
   ============================ */

.glitch-word {
  position: relative;
  display: inline-block;
}

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

.glitch-word.glitching {
  animation: word-glitch 0.3s ease-in-out;
}

.glitch-word.glitching::before {
  opacity: 0.8;
  color: var(--red) !important;
  -webkit-text-fill-color: var(--red) !important;
  transform: translate(-2px, -1px);
  clip-path: inset(20% 0 50% 0);
  animation: word-glitch-slice 0.3s ease-in-out;
}

.glitch-word.glitching::after {
  opacity: 0.8;
  color: var(--blue) !important;
  -webkit-text-fill-color: var(--blue) !important;
  transform: translate(2px, 1px);
  clip-path: inset(60% 0 10% 0);
  animation: word-glitch-slice 0.3s ease-in-out reverse;
}

@keyframes word-glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -1px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0); }
}

@keyframes word-glitch-slice {
  0% { transform: translate(0); }
  25% { transform: translate(-3px, 2px) skewX(-5deg); }
  50% { transform: translate(3px, -1px) skewX(5deg); }
  75% { transform: translate(-2px, -2px) skewX(-3deg); }
  100% { transform: translate(0); }
}

.glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(230, 57, 70, 0.05) 20%,
    rgba(74, 144, 217, 0.05) 40%,
    transparent 50%,
    rgba(255, 107, 157, 0.05) 60%,
    rgba(155, 89, 182, 0.05) 80%,
    transparent 100%
  );
  background-size: 100% 200%;
  transition: opacity 0.05s;
}

.glitch-overlay.active {
  opacity: 1;
  animation: site-glitch-overlay 0.15s ease-in-out;
}

@keyframes site-glitch-overlay {
  0% { background-position: 0 0; }
  25% { background-position: 0 50%; }
  50% { background-position: 0 100%; }
  75% { background-position: 0 50%; }
  100% { background-position: 0 0; }
}

body.site-glitching {
  animation: site-glitch-shake 0.15s ease-in-out;
}

@keyframes site-glitch-shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 2px) skewX(1deg); }
  50% { transform: translate(4px, -2px) skewX(-1deg); }
  75% { transform: translate(-2px, 1px) skewX(0.5deg); }
  100% { transform: translate(0, 0); }
}

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border-color);
    display: none;
  }

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

  .nav-links a {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: calc(var(--nav-height) + 1rem) 1rem 3rem;
  }

  .hero-stats {
    gap: 1.25rem;
  }

  .stat-num {
    font-size: 1.4rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: clamp(0.85rem, 3vw, 1.2rem);
  }

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

  .about-card {
    padding: 1.5rem;
  }

  .pylings-content {
    grid-template-columns: 1fr;
  }

  .pylings-terminal {
    order: -1;
  }

  .docs-table {
    font-size: 0.8rem;
    min-width: 400px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

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

  .hero-subtitle {
    font-size: clamp(0.45rem, 2vw, 0.65rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.6rem;
    padding: 0.75rem 1.5rem;
  }

  .hero-host {
    font-size: 0.9rem;
  }

  .docs-table {
    min-width: 300px;
    font-size: 0.75rem;
  }

  .docs-table th,
  .docs-table td {
    padding: 0.5rem 0.6rem;
  }

  #contributors-container {
    gap: 1rem;
  }

  .contributor-card {
    padding: 1rem 1.25rem;
    min-width: 130px;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f0eb;
    --bg-secondary: #eee8e0;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #8888a0;
    --border-color: #d0c8c0;
  }

  .header {
    background: rgba(245, 240, 235, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .nav-links.open {
    background: rgba(245, 240, 235, 0.98);
  }

  .btn-secondary {
    color: var(--blue) !important;
  }
}
