/* ==========================================================================
   GameCube Hugo Theme — Executive Indigo Edition
   Shape borrowed from a liner-notes disc list; palette from a charcoal-
   indigo console shell with a single gold accent.
   Palette:  #1b1a24 bg · #211f2c panel · #e9e6f2 ink · #948da8 dim
             #c9a24a gold accent
   Type:     Newsreader (display serif) · IBM Plex Sans (body)
             IBM Plex Mono (kicker/date/tags)
   ========================================================================== */

:root {
  --bg: #1b1a24;
  --panel: #211f2c;
  --ink: #e9e6f2;
  --ink-soft: #c9c5da;
  --dim: #948da8;
  --gold: #c9a24a;
  --rule: rgba(148, 141, 168, 0.22);

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* Light mode: same console-shell identity, read on cream paper instead of
   charcoal. The gold accent is deepened to a burnished brass since the
   dark-mode gold fails contrast on a light background; ink drops to a warm
   dark brown-black rather than pure black. */
:root[data-theme="light"] {
  --bg: #f6f1e6;
  --panel: #ece5d3;
  --ink: #2a2620;
  --ink-soft: #4a4438;
  --dim: #837a68;
  --gold: #92651c;
  --rule: rgba(74, 68, 56, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.gc-shell {
  max-width: 840px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ---------- Header ---------- */

.gc-header { margin-bottom: 48px; }

.gc-header__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.gc-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}

.gc-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
  color: var(--ink);
}

.gc-nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.gc-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--dim);
  transition: color 0.15s ease;
}
.gc-nav a:hover,
.gc-nav a.is-active { color: var(--gold); }

.gc-header__right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.gc-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.gc-icon-btn:hover { color: var(--gold); border-color: var(--gold); }
.gc-icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gc-icon-moon { display: none; }
:root[data-theme="light"] .gc-icon-sun { display: none; }
:root[data-theme="light"] .gc-icon-moon { display: block; }

/* ---------- Hero ---------- */

.gc-hero { margin-bottom: 40px; }
.gc-page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  margin: 0 0 8px;
  color: var(--ink);
}
.gc-hero__sub {
  color: var(--dim);
  font-size: 0.98rem;
  max-width: 480px;
  margin: 0;
}

/* ---------- Two-column layout ---------- */

.gc-layout {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 36px;
  align-items: start;
}

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

.gc-aside {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.gc-tagbox__title { margin-bottom: 14px; }

.gc-tagbox__list { list-style: none; margin: 0; padding: 0; }
.gc-tagbox__list li { border-bottom: 1px solid var(--rule); }
.gc-tagbox__list li:last-child { border-bottom: none; }
.gc-tagbox__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--dim);
}
.gc-tagbox__list a:hover { color: var(--gold); }
.gc-tagbox__count { color: var(--dim); font-size: 0.74rem; }
.gc-tagbox__list a:hover .gc-tagbox__count { color: var(--gold); }
.gc-tagbox__empty { font-family: var(--font-mono); font-size: 0.8rem; color: var(--dim); }

/* ---------- Disc glyph (shared: list rows, footer) ---------- */

.gc-disc {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--dim);
  position: relative;
  margin-top: 4px;
}
.gc-disc::after {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: var(--gold);
}
.gc-disc::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid var(--rule);
}
.gc-disc--sm { width: 22px; height: 22px; margin: 0 auto; }
.gc-disc--sm::after { inset: 8px; }
.gc-disc--sm::before { inset: 3px; }

.gc-entry__thumb {
  flex-shrink: 0;
  width: 52px;
  height: 68px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--rule);
  margin-top: 2px;
}
.gc-entry__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Linear post list ---------- */

.gc-list { display: flex; flex-direction: column; }

.gc-entry {
  display: flex;
  gap: 18px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.gc-entry:first-child { padding-top: 0; }
.gc-entry:last-child { border-bottom: none; }

.gc-entry__body { min-width: 0; }

.gc-entry__date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--dim);
  margin: 0 0 6px;
}

.gc-entry__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 8px;
}
.gc-entry__title a:hover { color: var(--gold); }

.gc-entry__excerpt {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0 0 12px;
  max-width: 480px;
}

.gc-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.gc-tags a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 74, 0.45);
  border-radius: 2px;
  padding: 2px 8px;
}
.gc-tags a:hover { background: var(--gold); color: var(--bg); }

.gc-empty {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ---------- Single post ---------- */

.gc-article { margin-top: 8px; }

.gc-article__header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.gc-article__header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 4px 0 14px;
  color: var(--ink);
}

.gc-prose { font-size: 1.02rem; color: var(--ink); }
.gc-prose h1, .gc-prose h2, .gc-prose h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  clear: both;
  margin-top: 2em;
}
.gc-prose p { color: var(--ink-soft); }
.gc-prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.gc-prose code {
  font-family: var(--font-mono);
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--ink);
}
.gc-prose pre {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}
.gc-prose blockquote {
  border-left: 2px solid var(--gold);
  margin: 0;
  padding: 4px 0 4px 16px;
  color: var(--dim);
  font-style: italic;
}
.gc-prose img { max-width: 100%; border-radius: 8px; }
.gc-prose img.gc-cover { float: left; max-width: 45%; margin: 4px 20px 12px 0; }

.gc-back {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold);
}
.gc-back:hover { text-decoration: underline; }

/* ---------- Footer ---------- */

.gc-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.8rem;
  color: var(--dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.gc-footer a { color: var(--dim); text-decoration: underline; }
.gc-footer a:hover { color: var(--gold); }

/* ---------- Accessibility ---------- */

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 500px) {
  .gc-entry { gap: 14px; }
  .gc-disc { width: 34px; height: 34px; }
  .gc-disc::after { inset: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .gc-icon-btn { transition: none; }
}
