:root {
  color-scheme: dark;
  --bg: #02070b;
  --surface: #07121c;
  --surface-2: #0a1824;
  --line: #173142;
  --text: #f4f8fb;
  --muted: #9fb2c0;
  --cyan: #00d7ff;
  --cyan-soft: rgba(0, 215, 255, 0.12);
  --orange: #ff8a00;
  --green: #00e2b8;
  --pink: #ff168f;
  --blue: #2f7cff;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(0, 215, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 215, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(0, 215, 255, 0.1), transparent 28rem),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(159, 178, 192, 0.15);
  background: rgba(2, 7, 11, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: -6px;
  bottom: -5px;
  height: 4px;
  background: var(--cyan);
}

.brand-copy {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy strong { color: var(--text); font-weight: 800; }
.channel-link { color: var(--muted); font-size: 1rem; text-decoration: none; }
.channel-link:hover { color: var(--cyan); }

main > section { padding: 88px max(4vw, calc((100vw - 1240px) / 2)); }

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  overflow: hidden;
}

.hero-content { min-width: 0; position: relative; z-index: 1; }
.hero .hero-actions { margin-bottom: 0; }
.hero > .stats { grid-column: 1 / -1; width: 100%; }

.hero-visual {
  width: min(100%, 430px);
  margin: 0;
  justify-self: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(0, 215, 255, 0.2);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 56px rgba(0, 215, 255, 0.025), 0 0 0 112px rgba(0, 215, 255, 0.018);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  /* Fill the frame past the artwork's inset edge and center its circular scene. */
  transform: translateY(2.2%) scale(1.08);
}

.eyebrow, .kicker {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-content > .eyebrow {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(2.65rem, 6.4vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
h1 span { color: var(--cyan); }
.hero-intro { max-width: 710px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.32rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 56px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
}
.button-primary { border-color: var(--cyan); background: var(--cyan); color: #001016; }
.button-primary:hover { filter: brightness(1.1); }
.button-secondary { background: rgba(7, 18, 28, 0.75); }
.button-secondary:hover { border-color: var(--cyan); color: var(--cyan); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  max-width: 820px;
  margin: 0;
  border-top: 1px solid var(--line);
}
.stats div { padding: 22px 24px 0 0; }
.stats dt { font-size: 1.8rem; font-weight: 850; }
.stats dd { margin: 0; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }

.explorer-section { background: linear-gradient(180deg, rgba(7, 18, 28, 0.72), rgba(2, 7, 11, 0)); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 34px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.04em; }
.section-heading > p { max-width: 470px; margin-bottom: 3px; color: var(--muted); }

.filter-panel {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 18, 28, 0.92);
  box-shadow: var(--shadow);
}
.filter-panel label > span, .filter-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #040d14;
  color: var(--text);
  outline: none;
}
input { padding: 0 16px; font-size: 1.02rem; }
select { padding: 0 38px 0 13px; }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.playlist-filter { margin-top: 24px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}
.chip:hover, .chip.active { border-color: var(--playlist-color, var(--cyan)); color: var(--text); background: color-mix(in srgb, var(--playlist-color, var(--cyan)) 14%, transparent); }
.select-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.filter-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.filter-footer p { margin: 0; color: var(--muted); }
.filter-footer strong { color: var(--text); }
.text-button { border: 0; background: transparent; color: var(--cyan); }
.text-button:hover { text-decoration: underline; }

.active-filters { min-height: 40px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 2px 4px; }
.active-pill { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.77rem; }

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.video-card {
  --card-accent: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--card-accent);
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(10, 24, 36, 0.96), rgba(4, 13, 20, 0.96));
  transition: transform 160ms ease, border-color 160ms ease;
}
.video-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--card-accent) 65%, var(--line)); }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.video-number { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.playlist-badge { padding: 4px 8px; border-radius: 6px; background: color-mix(in srgb, var(--card-accent) 14%, transparent); color: var(--card-accent); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.08em; }
.video-card h3 { margin: 20px 0 12px; font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.015em; }
.summary { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 0.9rem; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: #bed0dc; font-size: 0.68rem; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 18px; }
.card-link { color: var(--card-accent); font-weight: 800; font-size: 0.86rem; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.detail-button { border: 0; background: transparent; color: var(--muted); font-size: 0.8rem; }
.detail-button:hover { color: var(--text); }

.empty-state { padding: 70px 20px; text-align: center; }
.empty-icon { margin-bottom: 0; color: var(--cyan); font-size: 4rem; }
.empty-state p { color: var(--muted); }

.playlist-section { border-top: 1px solid rgba(23, 49, 66, 0.6); }
.playlist-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.playlist-card {
  --playlist-color: var(--cyan);
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--playlist-color);
  border-radius: 13px;
  background: var(--surface);
}
.playlist-card button { all: unset; cursor: pointer; }
.playlist-card .code { color: var(--playlist-color); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.11em; }
.playlist-card h3 { margin: 18px 0 10px; font-size: 1.12rem; }
.playlist-card p { color: var(--muted); font-size: 0.86rem; }
.playlist-card .count { color: var(--text); font-size: 0.75rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; }
.source-note { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-top: 30px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0, 215, 255, 0.045); }
.source-note p { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 0.88rem; }

.video-dialog { width: min(760px, calc(100vw - 28px)); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.video-dialog::backdrop { background: rgba(0, 4, 7, 0.8); backdrop-filter: blur(5px); }
.dialog-close { position: sticky; float: right; top: 14px; margin: 14px 14px 0 0; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #06111a; color: var(--text); font-size: 1.35rem; }
.dialog-body { padding: 42px; }
.dialog-body .eyebrow { margin-bottom: 12px; }
.dialog-body h2 { max-width: 620px; font-size: clamp(1.65rem, 4vw, 2.5rem); line-height: 1.1; }
.dialog-summary { color: var(--muted); }
.metadata-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.metadata-grid div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.metadata-grid dt { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; }
.metadata-grid dd { margin: 5px 0 0; font-size: 0.88rem; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 4vw; border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; }
.footer-website { overflow-wrap: anywhere; text-underline-offset: 4px; }
.footer-website:hover { color: var(--cyan); }
.footer-linkedin { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; color: var(--text); border-radius: 6px; }
.footer-linkedin svg { display: block; }
.footer-linkedin:hover { color: var(--cyan); }
.footer-website:focus-visible, .footer-linkedin:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }

@media (max-width: 980px) {
  .video-grid, .playlist-map { grid-template-columns: repeat(2, 1fr); }
  .select-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { width: min(76vw, 360px); }
}

@media (max-width: 700px) {
  .site-header { padding: 0 18px; }
  .brand-copy, .channel-link { display: none; }
  main > section { padding: 64px 18px; }
  .hero { min-height: 620px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 14px; }
  .select-grid, .video-grid, .playlist-map { grid-template-columns: 1fr; }
  .video-card { min-height: 300px; }
  .source-note, footer { flex-direction: column; align-items: flex-start; }
  .dialog-body { padding: 28px 22px; }
  .metadata-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
