:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #1c1b1a;
  --muted: #6b6862;
  --border: #e6e3de;
  --accent: #b3261e;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --surface: #1f1e1c;
    --text: #ecebe8;
    --muted: #a3a09a;
    --border: #33312e;
    --accent: #ef6a5e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

main, .site-header, .site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header { padding-top: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.site-footer { padding-top: 32px; padding-bottom: 32px; color: var(--muted); font-size: .875rem; }

h1 { font-size: 1.75rem; line-height: 1.25; margin: 28px 0 16px; }
.date { color: var(--muted); font-size: .875rem; margin: 0 0 12px; }

.video-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  padding-bottom: 14px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--accent); }
.card > * { margin-left: 16px; margin-right: 16px; }
.card > .card-link { display: block; margin: 0; color: inherit; text-decoration: none; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--border); }
.card h3 { font-size: 1.05rem; line-height: 1.35; margin: 12px 16px 4px; }
.card .date { margin-bottom: 6px; }
.summary {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

h2 { font-size: 1.25rem; margin: 32px 0 12px; }
.intro p { color: var(--muted); max-width: 65ch; }
.breadcrumbs { margin-top: 24px; font-size: .875rem; color: var(--muted); }
.breadcrumbs + h1 { margin-top: 8px; }

.tags { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags a {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8125rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}
.tags a:hover, .tags a[aria-current] { border-color: var(--accent); color: var(--accent); }
.tags .count { color: var(--muted); margin-left: 2px; }
.tag-cloud { margin: 8px 0 8px; }
.card .tags { margin: 0 16px; }

.button {
  display: inline-block;
  margin: 16px 0 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { filter: brightness(1.1); }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.description p, .transcript p { white-space: pre-line; max-width: 75ch; }
.description a { overflow-wrap: anywhere; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
