/* ─── Global CSS ──────────────────────────────────────── */
/* Reset · Variables · Typography · Base Layout           */

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

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

body {
  background: #07090f;
  color: #e0e6ed;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ── CSS Variables ── */
:root {
  /* Theme defaults (overridden by theme.js) */
  --theme-accent: #4fc3f7;
  --theme-accent-alt: #e040fb;
  --theme-bg: #07090f;
  --theme-surface: #111827;
  --theme-text: #e0e6ed;
  --theme-font-primary: 'Space Grotesk', sans-serif;
  --theme-font-heading: 'Space Grotesk', sans-serif;

  /* Layout */
  --navbar-h: 56px;
  --drawer-w: 240px;
  --mini-player-h: 72px;
  --content-max-w: 1100px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers
     Stacking order, low → high:
       bg → content → navbar → mini-player → overlay → drawer → modal → splash
     Drawer sits above mini-player so the drawer's footer isn't covered
     by the persistent player on mobile. Overlay sits between them so
     tapping outside the drawer (even over the player) dismisses it. */
  --z-bg: 0;
  --z-content: 1;
  --z-navbar: 100;
  --z-mini-player: 300;
  --z-overlay: 350;
  --z-drawer: 400;
  --z-modal: 500;
  --z-splash: 1000;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--theme-font-heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); }

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

/* ── App Shell ── */
#app {
  position: relative;
  min-height: 100vh;
  z-index: var(--z-content);
}

/* ── Layout Structure ── */
.layout-main {
  margin-left: 0;
  min-height: 100vh;
  padding-bottom: var(--mini-player-h);
  transition: margin-left 0.35s var(--ease-out);
}

.page-content {
  padding: calc(var(--navbar-h) + 16px) 20px 40px;
  max-width: var(--content-max-w);
  margin: 0 auto;
  position: relative;
  z-index: var(--z-content);
}

/* Desktop: push content when drawer open */
@media (min-width: 1024px) {
  .drawer-open .layout-main {
    margin-left: var(--drawer-w);
  }
}

/* ── Overlay (drawer backdrop on mobile) ── */
.layout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-in-out);
  backdrop-filter: blur(2px);
}

.drawer-open .layout-overlay {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .drawer-open .layout-overlay {
    opacity: 0;
    pointer-events: none;
  }
}

/* ── Page Transitions ── */
.page-enter {
  opacity: 0;
  transform: translateY(12px);
}

.page-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.page-exit {
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
}

.skeleton-img.large {
  aspect-ratio: 1;
  max-width: 220px;
}

.skeleton-title {
  height: 20px;
  width: 70%;
  margin-top: 12px;
}

.skeleton-text {
  height: 14px;
  width: 100%;
  margin-top: 8px;
}

.skeleton-text.short {
  width: 50%;
}

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

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Error / 404 Page ── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--theme-accent);
  margin-bottom: 8px;
}

.error-text {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  padding: 20px 0;
}

.btn-back {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  border: 1px solid var(--theme-accent);
  border-radius: 6px;
  color: var(--theme-accent);
  transition: all 0.25s var(--ease-in-out);
}

.btn-back:hover {
  background: var(--theme-accent);
  color: var(--theme-bg);
}

/* ── Section Headers ── */
.section-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-title {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Selection Color ── */
::selection {
  background: var(--theme-accent);
  color: var(--theme-bg);
}

/* ═══════════════════════════════════════════════════════ */
/*  PAGE HEADERS (shared across sub-pages)                 */
/* ═══════════════════════════════════════════════════════ */
.page-header {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-title {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  margin-bottom: 6px;
}

.page-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.neon-sub {
  color: rgba(0, 240, 255, 0.35);
}

.projects-count,
.disco-count {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 16px;
  font-family: 'Fira Code', monospace;
}

/* ═══════════════════════════════════════════════════════ */
/*  BLOG PAGES                                             */
/* ═══════════════════════════════════════════════════════ */
.page-blogs {
  position: relative;
  min-height: 100vh;
}

.blog-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-card-link .card:hover {
  border-color: var(--theme-accent);
}

/* Blog Detail */
.page-blog-detail {
  position: relative;
  min-height: 100vh;
}

.blog-article {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.blog-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.blog-date {
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
}

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

.blog-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}

.blog-excerpt {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  font-style: italic;
}

.blog-body {
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
}

.blog-body h2 {
  font-size: 1.3rem;
  color: var(--theme-accent);
  margin: 28px 0 10px;
}

.blog-body h2:first-child {
  margin-top: 0;
}

.blog-body h3 {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 24px 0 8px;
}

.blog-body h4 {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 20px 0 6px;
}

.blog-body p {
  margin-bottom: 16px;
}

.blog-body code {
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  color: var(--theme-accent);
}

.blog-body ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.blog-body li {
  list-style: disc;
  margin-bottom: 6px;
}

.blog-body strong {
  color: rgba(255, 255, 255, 0.85);
}

/* Neon article variant (artist) */
.neon-article .blog-body h2 {
  color: #00f0ff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.neon-article .blog-body code {
  background: rgba(0, 240, 255, 0.06);
  color: #00f0ff;
}

/* ═══════════════════════════════════════════════════════ */
/*  UPCOMING / TIMELINE                                    */
/* ═══════════════════════════════════════════════════════ */
.page-upcoming {
  position: relative;
  min-height: 100vh;
}

.upcoming-group {
  position: relative;
  z-index: 1;
  margin-bottom: 36px;
}

.upcoming-group-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

/* Developer Timeline Style */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 2px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border-radius: 50%;
  background: var(--theme-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-marker.status-in-progress {
  border-color: #4fc3f7;
  color: #4fc3f7;
}

.timeline-marker.status-released {
  border-color: #66bb6a;
  color: #66bb6a;
}

.timeline-marker.status-planned {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
}

.timeline-content {
  background: var(--theme-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px 20px;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.timeline-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 3px;
}

.timeline-date {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--theme-accent);
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin-bottom: 8px;
}

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

/* Artist Upcoming Cards Style */
.upcoming-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.upcoming-card {
  background: var(--theme-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s;
}

.neon-card {
  border-color: rgba(0, 240, 255, 0.08);
}

.neon-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
}

.upcoming-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.upcoming-icon {
  font-size: 1.1rem;
}

.upcoming-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(0, 240, 255, 0.4);
}

.upcoming-date {
  margin-left: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: #00f0ff;
}

.upcoming-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--theme-text);
}

.upcoming-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  margin-bottom: 8px;
}

.upcoming-meta {
  display: inline-block;
  font-size: 0.72rem;
  color: rgba(0, 240, 255, 0.35);
  margin-right: 10px;
}

/* ═══════════════════════════════════════════════════════ */
/*  DISCOGRAPHY CONTROLS                                   */
/* ═══════════════════════════════════════════════════════ */
.disco-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .upcoming-cards {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 28px;
  }
}
