@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
  --bg: #000000;
  --surface: #050a0f;
  --border: #0a2a3a;
  --text: #e8f4ff;
  --muted: #6a9ab0;
  --accent: #00d4ff;
  --accent2: #b06aff;
  --accent3: #00ff99;
  --accent4: #ff6ac1;
  --green: #00ffff;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inconsolata', monospace;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px);
  pointer-events: none;
  z-index: 999;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 6rem;
}

/* ── HEADER ── */
header {
  margin-bottom: 1rem;
}

.site-name {
  font-family: 'Libre Baskerville', serif;
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.8), 0 0 20px rgba(0, 212, 255, 0.4);
}

.site-role {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent2);
  margin-bottom: 0.9rem;
  text-shadow: 0 0 8px rgba(176, 106, 255, 0.5);
}

/* social icons row */
.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.social-icons a {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  position: relative;
}

.social-icons a:hover { color: var(--accent); }

.social-icons a[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
}

/* ── NAV ── */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem;
}

nav a {
  color: var(--accent3);
  text-decoration: underline;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

nav a:hover { color: var(--text); }
nav a.active { color: var(--text); }

/* ── SECTIONS ── */
.section-title {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  color: var(--accent2);
  font-size: 1rem;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 6px rgba(176, 106, 255, 0.4);
}

/* ── MISCELLANEA LINKS ── */
.misc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
}

.misc-links a {
  color: var(--accent);
  text-decoration: underline;
}

.misc-links a:hover { color: var(--text); }

/* ── DOT PLAN ── */
.dot-plan { margin-bottom: 2rem; }
.dot-plan p { color: var(--text); font-size: 0.9rem; margin-bottom: 1rem; }

/* ── MATH GYM ── */
.coming-soon {
  text-align: center;
  padding: 6rem 0;
  color: var(--text);
  font-size: 0.9rem;
}

.coming-soon .big { font-size: 3rem; margin-bottom: 0.5rem; opacity: 0.6; color: var(--accent); }
.coming-soon .label { color: var(--accent); font-size: 1rem; letter-spacing: 0.1em; }
.coming-soon .sub { color: var(--muted); margin-top: 0.4rem; }
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: block;
  margin-bottom: 1.2rem;
}

.gif-embed {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: block;
  margin-bottom: 1.2rem;
}

.date-stamp {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.2rem;
}

/* ── GITHUB REPO GRID ── */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.repo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.repo-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.repo-card .repo-name {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-card .repo-desc {
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.4;
}

.repo-card .repo-meta {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  gap: 0.7rem;
}

.repo-card .repo-lang { color: var(--accent2); }

/* loading state */
.loading { color: var(--muted); font-size: 0.85rem; }

/* ── ABOUT PAGE ── */
.about-body { font-size: 0.92rem; line-height: 1.9; }
.about-body p { margin-bottom: 1.1rem; }
.about-body a { color: var(--accent3); }
.about-body strong { color: var(--text); }
.about-updated { font-size: 0.78rem; color: var(--muted); margin-bottom: 1.5rem; }

/* ── BOT PAGE ── */
.bot-page { font-size: 0.9rem; line-height: 1.85; }
.bot-page p { margin-bottom: 1.1rem; }
.bot-highlight {
  font-weight: 700;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
  margin-bottom: 1rem;
}

/* ── COUNTER ── */
.counter-wrap {
  margin-top: 0;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.counter-wrap img {
  height: 20px;
  filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.4));
}

/* ── MUSIC PLAYER ── */
.music-bar {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 10, 20, 0.85);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.45rem 0.8rem;
  font-size: 0.72rem;
  color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.music-bar:hover { box-shadow: 0 0 20px rgba(0, 212, 255, 0.55); }
.music-bar .music-label { letter-spacing: 0.08em; user-select: none; }
.music-bar .music-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.music-bar .music-viz {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.music-bar .music-viz span {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: viz 0.8s ease-in-out infinite alternate;
}
.music-bar .music-viz span:nth-child(2) { animation-delay: 0.15s; }
.music-bar .music-viz span:nth-child(3) { animation-delay: 0.3s; }
.music-bar .music-viz span:nth-child(4) { animation-delay: 0.1s; }
.music-bar.paused .music-viz span { animation-play-state: paused; height: 4px !important; }

@keyframes viz {
  from { height: 3px; }
  to   { height: 14px; }
}

/* ── FOOTER ── */
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.site-footer .version { color: var(--accent2); }

/* ── ANIMATIONS ── */ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wrap { animation: fadeIn 0.5s ease both; }
