@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@400;500;600&display=swap');

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

:root {
  --ink: #0f0e0c;
  --paper: #f7f4ef;
  --accent: #c0392b;
  --muted: #6b6560;
  --rule: #d9d3c8;
  --gaming: #7c3aed;
  --events: #c0392b;
  --sports: #1e6b3a;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;

  --max-w: 1200px;
  --col-gap: 2rem;
}

[data-theme="dark"] {
  --ink: #e8e4dc;
  --paper: #141210;
  --muted: #8a8480;
  --rule: #2a2824;
  --gaming: #a78bfa;
  --events: #e05c4e;
  --sports: #4ade80;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  transition: background 0.2s, color 0.2s;
}

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

img { display: block; max-width: 100%; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.display {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
}

.kicker {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

.divider--thick {
  border-top: 3px solid var(--ink);
  margin: 0 0 2rem;
}

/* Masthead */
.masthead {
  border-bottom: 3px solid var(--ink);
  padding: 1.25rem 0 1rem;
  margin-bottom: 0;
}

.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.masthead__title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.75rem, 5vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.masthead__title a:hover { opacity: 0.8; }

.masthead__right {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.masthead__date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.theme-toggle {
  all: unset;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--rule);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Show sun in dark mode, moon in light mode */
.theme-toggle__icon--light { display: none; }
.theme-toggle__icon--dark  { display: block; }

[data-theme="dark"] .theme-toggle__icon--light { display: block; }
[data-theme="dark"] .theme-toggle__icon--dark  { display: none; }

/* Persistent feed nav (shown on all non-splash pages) */
.feed-nav {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s;
}

.feed-nav__list {
  display: flex;
  list-style: none;
  gap: 0;
}

.feed-nav__link {
  display: block;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.feed-nav__link:hover { color: var(--ink); }

.feed-nav__link[data-active="true"] { color: var(--ink); }
.feed-nav__link[data-active="true"][data-feed="gaming"] { border-color: var(--gaming); }
.feed-nav__link[data-active="true"][data-feed="current-events"] { border-color: var(--events); }
.feed-nav__link[data-active="true"][data-feed="sports"] { border-color: var(--sports); }

/* Splash / welcome page */
.splash {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: calc(100vh - 72px);
}

.splash__section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
  border-top: 4px solid transparent;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}

.splash__section:last-child { border-right: none; }

.splash__section:hover {
  background: color-mix(in srgb, var(--accent) 6%, var(--paper));
  border-top-color: var(--accent);
}

.splash__section:hover .splash__title {
  color: var(--accent);
}

.splash__section:hover .splash__cta {
  color: var(--accent);
  gap: 0.6rem;
}

.splash__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.splash__count {
  color: var(--muted);
}

.splash__title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  white-space: pre-line;
  transition: color 0.2s;
}

.splash__tagline {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 26ch;
}

.splash__latest {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.splash__latest-label {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.4rem;
  vertical-align: middle;
}

.splash__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
  transition: color 0.2s, gap 0.2s;
}

@media (max-width: 767px) {
  .splash {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .splash__section {
    border-right: none;
    border-top: 1px solid var(--rule);
    border-left: 4px solid transparent;
    padding: 2rem 1.5rem;
  }

  .splash__section:hover {
    border-top-color: var(--rule);
    border-left-color: var(--accent);
  }

  .splash__title { font-size: clamp(2rem, 10vw, 3rem); white-space: normal; }
}

/* Tabs */
.tabs {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s;
}

.tabs__list {
  display: flex;
  list-style: none;
  gap: 0;
}

.tabs__item {
  flex: 1;
  max-width: 200px;
}

.tabs__btn {
  all: unset;
  display: block;
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-align: center;
}

.tabs__btn:hover { color: var(--ink); }

.tabs__btn[data-active="true"] {
  color: var(--ink);
}

.tabs__btn[data-active="true"][data-feed="gaming"] { border-color: var(--gaming); }
.tabs__btn[data-active="true"][data-feed="current-events"] { border-color: var(--events); }
.tabs__btn[data-active="true"][data-feed="sports"] { border-color: var(--sports); }

/* Feed panels */
.feed-panel { display: none; padding: 2.5rem 0; }
.feed-panel[data-visible="true"] { display: block; }

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.article-grid--lead {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .article-grid--lead {
    grid-template-columns: 2fr 1fr;
    border: 1px solid var(--rule);
  }

  .article-grid--secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--rule);
    border-top: none;
  }
}

/* Card */
.card {
  padding: 1.5rem;
  border-bottom: 1px solid var(--rule);
  transition: background 0.12s;
}

.card:hover { background: rgba(0,0,0,0.025); }

.card--lead {
  border-right: 1px solid var(--rule);
  border-bottom: none;
}

@media (max-width: 767px) {
  .card--lead { border-right: none; border-bottom: 1px solid var(--rule); }
}

.card--secondary {
  border-right: 1px solid var(--rule);
  border-bottom: none;
}

.card--secondary:last-child { border-right: none; }

@media (max-width: 767px) {
  .card--secondary { border-right: none; border-bottom: 1px solid var(--rule); }
}

.card__kicker {
  margin-bottom: 0.4rem;
}

.card__title {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.card--lead .card__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
}

.card--secondary .card__title {
  font-size: 1.125rem;
}

.card__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.card__desc {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.card__meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Tag accent colors */
[data-feed="gaming"] .card__kicker { color: var(--gaming); }
[data-feed="current-events"] .card__kicker { color: var(--events); }
[data-feed="sports"] .card__kicker { color: var(--sports); }

/* Article page */
.article {
  max-width: 700px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.article__kicker { margin-bottom: 0.5rem; }

.article__title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.article__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.article__body {
  font-size: 1.125rem;
  line-height: 1.75;
}

.article__body p { margin-bottom: 1.25rem; }
.article__body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}
.article__body h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.5rem;
}
.article__body strong { font-weight: 600; }

/* Inline images in article body */
.article__body img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  margin: 2rem 0;
}

.article__body figure {
  margin: 2rem 0;
}

.article__body figcaption {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Hero image */
.article-hero {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  margin-bottom: 0;
}

.article-hero__img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.back-link:hover { color: var(--ink); }

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.25rem 0.6rem;
  transition: color 0.15s, border-color 0.15s;
}

.tag:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Article footer */
.article__footer {
  margin-top: 1rem;
}

/* Related posts */
.related {
  max-width: 700px;
  margin: 0 auto 3rem;
  padding: 2rem 1.5rem 0;
  border-top: 3px solid var(--ink);
}

.related__heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.related__heading a { text-decoration: none; }
.related__heading a:hover { text-decoration: underline; }

.related__list { list-style: none; }

.related__item {
  border-bottom: 1px solid var(--rule);
}

.related__link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.875rem 0;
  transition: opacity 0.12s;
}

.related__link:hover { opacity: 0.75; }

.related__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.3;
}

.related__meta {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Feed panel footer */
.feed-panel__footer {
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--rule);
  margin-top: 0;
}

.view-all {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

.view-all:hover { color: var(--ink); }

/* Feed index pages */
.feed-index {
  max-width: 700px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.feed-index__header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--ink);
}

.feed-index__title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.feed-index__count {
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-list {
  list-style: none;
}

.post-list__item {
  border-bottom: 1px solid var(--rule);
}

.post-list__link {
  display: grid;
  grid-template-areas:
    "title"
    "desc"
    "meta";
  gap: 0.3rem;
  padding: 1.375rem 0;
  transition: background 0.12s;
}

.post-list__link:hover .post-list__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.post-list__title {
  grid-area: title;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.25;
  color: var(--ink);
}

.post-list__desc {
  grid-area: desc;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

.post-list__meta {
  grid-area: meta;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.post-list__label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}
