@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg: #060606;
  --surface: #121214;
  --surface-inner: #1a1a1e;
  --text: #efefef;
  --text-muted: #8a8a8a;
  --accent: #c4a574;
  --accent-glow: rgba(196, 165, 116, 0.22);
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);

  --shell-w: 920px;
  --stack-gap: 12px;
  --nav-h: 60px;
  --radius: 14px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: min(var(--shell-w), calc(100% - 32px));
  margin: 0 auto;
}

/* ─── Shell & stack (layout compatto) ─── */
.site-shell {
  width: min(var(--shell-w), calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 16px) 0 16px;
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
}

/* ─── Nav ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.site-nav.scrolled {
  background: rgba(6, 6, 6, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

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

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.nav-brand span { color: var(--accent); }

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

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--text);
}

.site-shell.felt-shell {
  padding: 12px 0 16px;
  gap: var(--stack-gap);
}

/* ─── Felt shell ─── */
.felt-hero {
  padding: 0;
  overflow: visible;
}

.felt-banner {
  position: relative;
  height: 188px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
}

.felt-banner-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.felt-banner-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 6, 6, 0.1), rgba(6, 6, 6, 0.65));
}

.felt-hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 12px;
  margin-top: -42px;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.felt-avatar-stack {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  overflow: visible;
}

.lh-profile-badges-pill--avatar {
  position: absolute;
  top: -0.05rem;
  right: -0.1rem;
  z-index: 5;
  padding: 0;
  background: none;
  border: none;
  backdrop-filter: none;
  gap: 0;
  pointer-events: none;
}

.lh-profile-badges-pill--avatar .lh-pb-badge {
  width: 26px;
  height: 26px;
  font-size: 22px;
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.55));
  pointer-events: auto;
}

.lh-profile-badges-pill--avatar .lh-pb-badge[data-tooltip]::after {
  left: auto;
  right: 0;
  transform: translateX(0) scale(0.96);
}

.lh-profile-badges-pill--avatar .lh-pb-badge[data-tooltip]:hover::after,
.lh-profile-badges-pill--avatar .lh-pb-badge[data-tooltip]:focus-visible::after {
  transform: translateX(0) scale(1);
}

.lh-pb-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 13px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  cursor: default;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
}

.lh-pb-badge--verified { color: #7dd3fc; }

.lh-pb-badge[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) scale(0.96);
  min-width: 120px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 30;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.lh-pb-badge[data-tooltip]:hover::after,
.lh-pb-badge[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 640px) {
  .lh-profile-badges-pill--avatar {
    top: 0;
    right: 0;
  }

  .lh-profile-badges-pill--avatar .lh-pb-badge {
    width: 30px;
    height: 30px;
    font-size: 25px;
  }
}

.felt-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.felt-avatar:hover {
  transform: translateY(-2px);
}

.felt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding-bottom: 0;
  transform: translateY(4px);
}

.category-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--surface-inner);
  border: 1px solid var(--line);
  padding: 0 10px;
  transition:
    transform 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    border-color 0.3s ease,
    box-shadow 0.38s ease,
    background 0.3s ease;
}

.category-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at 28% 50%, rgba(196, 165, 116, 0.22), transparent 62%);
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.category-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.07) 48%,
    rgba(196, 165, 116, 0.18) 52%,
    transparent 62%
  );
  transform: translateX(-130%);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.category-btn img {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
  transition: filter 0.3s ease;
}

.category-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  transition: color 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1), letter-spacing 0.32s ease;
}

@keyframes category-icon-hop {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-6px) scale(1.14); }
  62% { transform: translateY(-2px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

.category-btn:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(196, 165, 116, 0.55);
  background: rgba(196, 165, 116, 0.07);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(196, 165, 116, 0.12),
    0 0 18px rgba(196, 165, 116, 0.14);
}

.category-btn:hover::before {
  opacity: 1;
}

.category-btn:hover::after {
  transform: translateX(130%);
}

.category-btn:hover img {
  animation: category-icon-hop 0.52s cubic-bezier(0.34, 1.45, 0.64, 1);
  filter: drop-shadow(0 3px 8px rgba(196, 165, 116, 0.45));
}

.category-btn:hover .category-label {
  color: var(--accent);
  transform: translateX(3px);
  letter-spacing: 0.05em;
}

.category-btn:active {
  transform: translateY(-2px) scale(0.985);
  transition-duration: 0.12s;
}

.category-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(196, 165, 116, 0.15);
  transform: translateY(-2px);
  background: rgba(196, 165, 116, 0.08);
}

.category-btn.active:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(196, 165, 116, 0.28),
    0 0 22px rgba(196, 165, 116, 0.2);
}

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

@media (prefers-reduced-motion: reduce) {
  .category-btn,
  .category-btn::after,
  .category-label {
    transition: none;
  }

  .category-btn:hover img {
    animation: none;
    filter: none;
  }

  .category-btn:hover {
    transform: translateY(-2px);
  }
}

.felt-main {
  padding: 16px 18px 18px;
}

.felt-file-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.felt-file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.felt-file-icon {
  font-size: 1rem;
  line-height: 1;
}

.felt-file-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.felt-body {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.home-intro {
  margin-bottom: 2px;
}

.home-intro-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 8px;
}

.home-intro-title em {
  font-style: italic;
  color: var(--accent);
}

.home-intro-lead {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 52ch;
}

.felt-main .panel {
  background: var(--surface-inner);
}

.felt-main .link-panel {
  background: var(--surface);
}

/* ─── Hero panel (legacy home blocks) ─── */
.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero-banner {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 48px 16px;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

.hero-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 6, 6, 0.15) 0%,
    rgba(6, 6, 6, 0.55) 100%
  );
}

.hero-profile {
  position: relative;
  z-index: 3;
  padding: 0 20px;
  margin-top: -46px;
}

.hero-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-panel-body {
  position: relative;
  z-index: 2;
  padding: 14px 20px 22px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-title em { font-style: italic; color: var(--accent); }

.hero-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 12px;
}

.hero-note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-bottom: 18px;
  max-width: 480px;
}

.hero-cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all var(--transition);
}

.btn-gold {
  background: var(--accent);
  color: #060606;
}

.btn-gold:hover {
  box-shadow: 0 6px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Home layout ─── */
.felt-main--home {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--stack-gap);
  align-items: start;
}

.home-sheet-primary {
  display: contents;
}

.home-sheet-primary .felt-file-head {
  grid-column: 1 / -1;
}

.home-sheet-primary .home-intro {
  grid-column: 1 / -1;
}

.home-links {
  grid-column: 1;
}

.home-sheet-secondary {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
}

.home-widgets-panel {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.link-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px 12px 14px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.link-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  opacity: 0.92;
}

.link-panel--lab::before {
  background: #5b9fd4;
  box-shadow: 0 0 10px rgba(91, 159, 212, 0.35);
}

.link-panel--music::before {
  background: #6bbf8a;
  box-shadow: 0 0 10px rgba(107, 191, 138, 0.35);
}

.link-panel--contact::before {
  background: #e06c6c;
  box-shadow: 0 0 10px rgba(224, 108, 108, 0.35);
}

.link-panel:hover {
  border-color: rgba(196, 165, 116, 0.25);
}

.link-panel h2 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.link-panel p {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.mini-widget { padding: 14px 16px; }

.float-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.float-value {
  font-family: var(--font-serif);
  font-size: 0.98rem;
}

.float-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.home-now-playing {
  display: block;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.home-now-playing:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 165, 116, 0.28);
}

.home-now-playing.is-live {
  border-color: rgba(196, 165, 116, 0.22);
}

.home-now-playing-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-now-playing-copy {
  min-width: 0;
  flex: 1;
}

.home-now-playing-art {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-inner);
}

.home-now-playing-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.home-now-playing-cover.is-visible {
  display: block;
}

.home-now-playing-idle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  overflow: hidden;
}

.home-now-playing-idle.is-hidden {
  display: none;
}

.home-now-playing-idle .stats-sleep-art {
  width: 38px;
  height: 30px;
}

.home-now-playing-idle .stats-sleep-note {
  transform: rotate(-28deg) translate(1px, 4px);
}

.home-now-playing-idle .stats-zzz-1 {
  top: 0;
  right: 0;
  font-size: 0.48rem;
}

.home-now-playing-idle .stats-zzz-2 {
  top: -3px;
  right: 8px;
  font-size: 0.62rem;
}

.home-now-playing-idle .stats-zzz-3 {
  top: -7px;
  right: 14px;
  font-size: 0.76rem;
}

.home-now-playing.is-loading .float-value,
.home-now-playing.is-loading .float-sub {
  color: var(--text-muted);
}

.float-value-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-spinner {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(196, 165, 116, 0.18);
  border-top-color: var(--accent);
  animation: status-spin 0.85s linear infinite;
}

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

.contact-panel { padding: 14px 16px; }

.contact-panel .eyebrow { margin-bottom: 10px; }

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.contact-link-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.contact-link-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.contact-link:first-of-type { border-top: 1px solid var(--line); }

.contact-link:hover { color: var(--accent); }

.contact-link-value {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-link:hover .contact-link-value { color: var(--accent); }

.contact-intro {
  margin-bottom: 4px;
}

.contact-intro-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 8px;
}

.contact-intro-lead {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 46ch;
}

.contact-page-panel {
  padding: 6px 16px;
  margin-top: 4px;
}

.contact-link--page {
  padding: 14px 0;
}

.contact-link--page:first-of-type {
  border-top: none;
}

.contact-link-icon--page {
  width: 32px;
  height: 32px;
}

.contact-link-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-link-copy strong {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
}

.contact-link-copy small {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.contact-link--page:hover .contact-link-copy small {
  color: var(--accent);
}

.contact-link-arrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.contact-link--page:hover .contact-link-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ─── Page head ─── */
.page-head { padding: 16px 18px; }

.page-head h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 8px;
}

.page-head p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 300;
}

.section-title-sm {
  font-size: 1.35rem;
  margin: 8px 0 16px;
}

/* ─── Projects ─── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--stack-gap);
}

.project-card {
  padding: 10px;
  transition: transform var(--transition), border-color var(--transition);
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  border-radius: var(--radius);
}

.project-card:hover {
  border-color: rgba(196, 165, 116, 0.2);
  transform: translateY(-2px);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.project-card-inner {
  background: var(--surface-inner);
  border-radius: var(--radius-sm);
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.project-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  flex-shrink: 0;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  flex: 1;
  margin-bottom: 12px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  align-self: flex-start;
}

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

.project-listing-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: transparent;
}

.project-listing-badge--published {
  border: 1px solid #c94a4a;
  color: #ef8f8f;
}

.project-listing-badge--for_sale {
  border: 1px solid #3d9a62;
  color: #7fd4a0;
}

.project-offer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 4px;
}

.project-offer[hidden],
.project-pricing[hidden] {
  display: none !important;
}

.project-pricing {
  width: 100%;
  display: grid;
  gap: 6px;
}

.project-price-box {
  position: relative;
  display: block;
  padding: 7px 26px 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-inner);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), transform var(--transition);
}

.project-price-box:hover {
  border-color: rgba(196, 165, 116, 0.35);
  transform: translateY(-1px);
}

.project-price-box:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.project-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.project-price-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.project-price-value {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.project-price-note {
  margin: 3px 0 0;
  font-size: 0.66rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.project-price-arrow {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1;
  color: var(--accent);
}

.project-card-hint {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
  padding-top: 8px;
  transition: transform var(--transition);
}

.project-card:hover .project-card-hint { transform: translateX(4px); }

.project-empty {
  grid-column: 1 / -1;
  padding: 28px 22px;
  text-align: center;
}

.lab-updating {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(140px, 28vh, 260px);
  padding: 40px 16px;
}

.lab-updating-text {
  margin: 0;
  color: var(--text-muted);
}

.project-empty-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
}

.project-empty-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.project-empty-text {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ─── Lab admin ─── */
.admin-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.admin-panel {
  padding-bottom: 18px;
}

.admin-login h2,
.admin-dashboard-head h2,
.admin-form--project h3 {
  font-family: var(--font-serif);
  font-weight: 400;
}

.admin-login h2,
.admin-dashboard-head h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-form--project {
  padding: 16px;
  margin-bottom: 16px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
}

.admin-field span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-inner);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.admin-field input[type="file"] {
  padding: 8px;
  font-size: 0.78rem;
}

.admin-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.admin-btn {
  border: 1px solid rgba(196, 165, 116, 0.35);
  background: rgba(196, 165, 116, 0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.admin-btn:hover {
  background: rgba(196, 165, 116, 0.18);
  transform: translateY(-1px);
}

.admin-btn--ghost {
  background: transparent;
  border-color: var(--line);
}

.admin-btn--danger {
  border-color: rgba(224, 108, 108, 0.35);
  background: rgba(224, 108, 108, 0.1);
  color: #f0b4b4;
}

.admin-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-link:hover {
  color: var(--accent);
}

.admin-error,
.admin-status {
  font-size: 0.8rem;
}

.admin-error {
  color: #f0b4b4;
}

.admin-status.is-error {
  color: #f0b4b4;
}

.admin-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-item {
  padding: 14px 16px;
}

.admin-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-item-head h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.admin-item-head p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.admin-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-item-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.admin-empty {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 8px 2px;
}

.admin-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-preview-thumb {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-inner);
}

.admin-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-preview-index {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #c94a4a;
  color: #ef8f8f;
  background: rgba(0, 0, 0, 0.72);
}

.admin-preview-actions {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  display: flex;
  gap: 3px;
}

.admin-preview-move,
.admin-preview-remove {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.admin-preview-move:hover,
.admin-preview-remove:hover {
  border-color: #c94a4a;
  color: #ef8f8f;
}

.admin-preview-move:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

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

  .admin-item-head {
    flex-direction: column;
  }
}

/* ─── Project modal & lightbox ─── */
.project-modal,
.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  overflow-y: auto;
}

.project-modal {
  align-items: center;
  padding: 32px 16px;
}

.project-lightbox {
  align-items: center;
  overflow: hidden;
  z-index: 10001;
}

.project-modal[hidden],
.project-lightbox[hidden] { display: none; }

.project-modal-backdrop,
.project-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: none;
  cursor: zoom-out;
}

.project-modal-window {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 32px));
  max-height: min(90vh, calc(100% - 64px));
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.project-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.project-modal-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-modal-close {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-inner);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.project-modal-close:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.project-modal-body {
  overflow-y: auto;
}

.project-preview-area {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.project-preview-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.project-preview-track::-webkit-scrollbar { display: none; }

.project-preview-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16 / 9;
  max-height: 210px;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.project-preview-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.project-preview-nav:hover {
  background: #fff;
  color: #000;
  transform: translateY(-50%) scale(1.08);
}

.project-preview-nav.prev { left: 10px; }
.project-preview-nav.next { right: 10px; }

.project-preview-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.project-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width var(--transition), background var(--transition);
}

.project-preview-dot.active {
  width: 22px;
  border-radius: 4px;
  background: #fff;
}

.project-modal-info {
  padding: 14px 16px 16px;
}

.project-modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.project-modal-title-row h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
}

.project-modal-info p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 8px;
}

.project-lightbox-backdrop {
  z-index: 1;
}

.project-lightbox-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  padding: 60px 80px;
}

.project-lightbox-content img {
  max-width: min(90vw, 1100px);
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.project-lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 16px;
}

.project-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
  pointer-events: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background var(--transition);
}

.project-lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.project-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.project-lightbox-nav:hover {
  background: #fff;
  color: #000;
  transform: translateY(-50%) scale(1.08);
}

.project-lightbox-nav.prev { left: 24px; }
.project-lightbox-nav.next { right: 24px; }

@media (max-width: 640px) {
  .project-modal {
    align-items: flex-end;
    padding: 0;
  }

  .project-modal-window {
    width: 100%;
    max-height: 95vh;
    margin: auto 0 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .project-lightbox-nav {
    top: auto;
    bottom: 24px;
    transform: none;
    width: 44px;
    height: 44px;
  }

  .project-lightbox-nav:hover { transform: scale(1.08); }
  .project-lightbox-nav.prev { left: 20%; }
  .project-lightbox-nav.next { right: 20%; }

  .project-lightbox-content { padding: 48px 16px 100px; }
}

/* ─── Musica ─── */
.wrapped-feature {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  width: 100%;
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: border-color var(--transition);
}

.wrapped-feature:hover { border-color: rgba(196, 165, 116, 0.2); }

.wrapped-now-card.is-idle {
  cursor: default;
  opacity: 0.92;
}

.wrapped-now-card.is-idle:hover {
  border-color: var(--line);
  transform: none;
}

.wrapped-now-card.is-live {
  cursor: pointer;
}

.wrapped-idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface-inner);
  color: var(--text-muted);
}

.wrapped-idle-icon {
  font-size: 1.4rem;
  color: var(--accent);
  opacity: 0.7;
}

.wrapped-idle-text {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wrapped-cover {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.wrapped-cover img { width: 100%; height: 100%; object-fit: cover; }

.wrapped-feature h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 300;
  margin: 4px 0;
}

.wrapped-feature .artist {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.wrapped-tabs {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.wrapped-tabs button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.wrapped-tabs button.active,
.wrapped-tabs button:hover { color: var(--accent); }

.wrapped-connect {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.wrapped-offline {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.wrapped-admin-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wrapped-now-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--stack-gap);
}

@media (max-width: 720px) {
  .wrapped-now-grid { grid-template-columns: 1fr; }
}

.wrapped-period {
  padding: 10px;
}

.range-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--surface-inner);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.range-switch button {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  padding: 10px 8px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.range-switch button:hover {
  color: var(--text);
}

.range-switch button.active {
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.wrapped-period.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.wrapped-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 8px 0;
}

.wrapped-archive {
  padding: 18px 20px 22px;
}

.wrapped-archive-head h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 6px;
}

.wrapped-archive-head p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.wrapped-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--stack-gap);
}

.archive-card {
  background: var(--surface-inner);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), transform var(--transition);
}

.archive-card:hover {
  border-color: rgba(196, 165, 116, 0.25);
  transform: translateY(-2px);
}

.archive-year {
  font-family: var(--font-serif);
  font-size: 1.5rem;
}

.archive-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.archive-action {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  margin-top: auto;
}

.wrapped-archive-modal .stats-col {
  padding: 0;
}

.wrapped-archive-modal .stats-col h3 {
  margin-top: 0;
}

.stats-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--stack-gap);
}

.stats-col { padding: 16px 18px; }

.stats-col h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.stat-item:last-child { border-bottom: none; }

.stat-rank {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  width: 20px;
  flex-shrink: 0;
}

.stat-name { flex: 1; }

.stat-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.album-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.album-tile {
  flex: 0 0 120px;
  transition: transform var(--transition);
}

.album-tile:hover { transform: translateY(-4px); }

.album-tile img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.album-tile span {
  display: block;
  font-size: 0.78rem;
  line-height: 1.3;
  margin-bottom: 2px;
}

.album-tile small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
}

/* ─── Musica (stats.fm style) ─── */
.stats-page {
  --stack-gap: 20px;
}

.stats-page .stats-head {
  padding-bottom: 18px;
}

.stats-stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.stats-page .mono-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.stats-offline {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats-summary-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: var(--stack-gap);
  padding: 0;
}

.stats-counter-box {
  flex: 1;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 18px;
  text-align: center;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.stats-counter-box.is-animating {
  transform: translateY(-2px);
  border-color: rgba(196, 165, 116, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.stats-counter-value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 300;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stats-counter-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stats-summary-note {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.stats-admin-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stats-hero {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(196, 165, 116, 0.06), transparent 55%);
  width: 100%;
  text-align: left;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}

.stats-hero.is-live {
  grid-template-columns: 120px minmax(0, 0.95fr) minmax(0, 1.15fr);
  align-items: center;
}

.stats-hero-lyrics {
  min-width: 0;
  max-height: 132px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
}

.stats-lyrics-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.stats-lyric-line {
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text-muted);
  opacity: 0.42;
  transition: opacity 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.stats-lyric-line.is-active {
  color: var(--accent);
  opacity: 1;
  transform: scale(1.02);
  transform-origin: left center;
}

.stats-lyric-line.is-next {
  opacity: 0.72;
  color: var(--text);
}

.stats-lyrics-empty {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}

.stats-hero.is-idle {
  cursor: default;
  opacity: 0.9;
}

.stats-hero.is-idle:hover {
  border-color: var(--line);
  transform: none;
}

.stats-hero.is-live:hover {
  border-color: rgba(196, 165, 116, 0.25);
}

.stats-hero-art {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  background: var(--surface-inner);
}

.stats-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.stats-hero-art img.is-visible {
  display: block;
}

.stats-hero-idle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-inner);
  color: var(--accent);
  overflow: hidden;
  z-index: 1;
}

.stats-hero-idle.is-hidden {
  display: none;
}

.stats-sleep-art {
  position: relative;
  width: 72px;
  height: 56px;
}

.stats-sleep-note {
  width: 100%;
  height: 100%;
  transform: rotate(-28deg) translate(2px, 6px);
  transform-origin: center;
  opacity: 0.88;
}

.stats-zzz {
  position: absolute;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  opacity: 0;
  line-height: 1;
  pointer-events: none;
}

.stats-zzz-1 {
  top: 2px;
  right: 2px;
  font-size: 0.72rem;
  animation: stats-zzz-float 2.4s ease-in-out infinite;
}

.stats-zzz-2 {
  top: -4px;
  right: 14px;
  font-size: 0.92rem;
  animation: stats-zzz-float 2.4s ease-in-out 0.55s infinite;
}

.stats-zzz-3 {
  top: -10px;
  right: 26px;
  font-size: 1.1rem;
  animation: stats-zzz-float 2.4s ease-in-out 1.1s infinite;
}

@keyframes stats-zzz-float {
  0% {
    opacity: 0;
    transform: translateY(6px) translateX(0);
  }
  20% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translateY(-14px) translateX(4px);
  }
}

.stats-hero-label {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.stats-hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 6px;
}

.stats-hero-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.stats-recent {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface-inner);
  width: 100%;
  text-align: left;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition);
}

.stats-recent-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.stats-recent-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.stats-recent:hover {
  border-color: rgba(196, 165, 116, 0.2);
}

.stats-recent-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.stats-recent-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.stats-recent-title {
  font-size: 0.92rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-recent-artist {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-recent-time {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.stats-period {
  padding: 10px;
}

.stats-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--stack-gap);
}

.stats-block {
  padding: 14px 16px 10px;
}

.stats-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.stats-block-head h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
}

.stats-block-count,
.stats-block-meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(196, 165, 116, 0.5);
  animation: stats-pulse 1.8s ease infinite;
  vertical-align: middle;
}

@keyframes stats-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 165, 116, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(196, 165, 116, 0); }
}

.stats-rows {
  display: flex;
  flex-direction: column;
}

.stats-row {
  display: grid;
  grid-template-columns: 24px 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 4px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  width: 100%;
  text-align: left;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.stats-row:last-child {
  border-bottom: none;
}

.stats-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.stats-rank {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

.stats-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-inner);
}

.stats-thumb-round {
  border-radius: 50%;
}

.stats-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stats-row-title {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-row-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.stats-row-value {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  min-width: 28px;
  text-align: right;
}

.stats-album-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.stats-album-row::-webkit-scrollbar {
  height: 6px;
}

.stats-album-row::-webkit-scrollbar-thumb {
  background: rgba(196, 165, 116, 0.25);
  border-radius: 999px;
}

.stats-album-card {
  flex: 0 0 120px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--transition);
}

.stats-album-card:hover {
  transform: translateY(-3px);
}

.stats-album-card img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.stats-album-name {
  font-size: 0.78rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stats-album-plays {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ─── Album fly (scatter → Top album) ─── */
.album-fly-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.album-fly-card {
  position: fixed;
  top: 0;
  left: 0;
  transform-origin: center center;
  border-radius: var(--radius-sm);
  overflow: hidden;
  will-change: transform, width, height, opacity;
}

.album-fly-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.albums-section--scroll-reveal .stats-block-head {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.albums-section--scroll-reveal.albums-section--header-visible .stats-block-head {
  opacity: 1;
  transform: translateY(0);
}

.albums-section--scroll-reveal .stats-album-card {
  opacity: 0;
}

.albums-section--scroll-reveal.albums-section--revealed .stats-album-card {
  opacity: 1;
  transition: opacity 0.5s ease;
  transition-delay: 0.04s;
}

.stats-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 10px 4px;
}

@media (max-width: 768px) {
  .stats-split {
    grid-template-columns: 1fr;
  }

  .stats-hero,
  .stats-hero.is-live {
    grid-template-columns: 96px 1fr;
    gap: 14px;
    padding: 14px 16px;
  }

  .stats-hero-lyrics {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
    max-height: 108px;
  }
}

/* ─── Footer ─── */
.site-footer {
  padding: 14px 4px 0;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

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

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ─── Mobile ─── */
@media (max-width: 840px) {
  .stats-columns,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .felt-main--home {
    display: flex;
    flex-direction: column;
    gap: var(--stack-gap);
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .home-sheet-primary {
    display: flex;
    flex-direction: column;
    gap: var(--stack-gap);
    padding: 14px 14px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .home-sheet-secondary {
    display: block;
    width: 100%;
  }

  .home-widgets-panel {
    gap: 0;
    background: var(--surface-inner);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .home-widgets-panel .home-now-playing,
  .home-widgets-panel .home-status-widget {
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
  }

  .home-widgets-panel .home-now-playing {
    border-bottom: 1px solid var(--line);
  }

  .home-widgets-panel .home-now-playing:hover {
    transform: none;
  }

  .felt-banner { height: 160px; }

  .felt-hero-foot {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0;
    padding: 0 10px 10px;
    gap: 0;
  }

  .felt-avatar-stack {
    align-self: flex-start;
    margin-top: -36px;
    margin-bottom: 10px;
    padding-left: 2px;
  }

  .felt-avatar {
    width: 72px;
    height: 72px;
  }

  .lh-profile-badges-pill--avatar .lh-pb-badge {
    width: 24px;
    height: 24px;
    font-size: 20px;
  }

  .category-dock {
    flex: none;
    width: 100%;
    transform: none;
    gap: 6px;
    padding-bottom: 0;
  }

  .category-btn {
    height: 38px;
    gap: 5px;
    padding: 0 8px;
  }

  .category-btn img {
    width: 22px;
    height: 22px;
  }

  .category-label {
    font-size: 0.64rem;
    overflow: visible;
    text-overflow: unset;
  }

  .hero-banner { height: 168px; }

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

  .hero-profile { margin-top: -40px; }

  .wrapped-feature {
    grid-template-columns: 80px 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }

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