/* Guy in Gold Glasses: /articles/ notes
   Visual language follows the live site: charcoal and gold,
   Fraunces for titles (Walkthrough / episode pages), Inter for reading text.
*/
:root {
  color-scheme: dark;
  --bg: #141414;
  --bg-2: #1b1916;
  --ink: #f3efe6;
  --muted: #aaa497;
  --dim: #76716a;
  --gold: #d9a72a;
  --gold-hi: #ecc459;
  --gold-lo: #a87d1c;
  --gold-soft: rgba(217, 167, 42, 0.13);
  --gold-line: rgba(217, 167, 42, 0.38);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --raised: rgba(255, 255, 255, 0.035);
  --on-gold: #141414;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 58px;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3ead6;
  --bg-2: #fffdf9;
  --ink: #18140e;
  --muted: #5c5346;
  --dim: #7a7266;
  --gold: #a87d1c;
  --gold-hi: #8a6a1c;
  --gold-lo: #8a6a1c;
  --gold-soft: rgba(168, 125, 28, 0.12);
  --gold-line: rgba(168, 125, 28, 0.35);
  --line: rgba(40, 30, 15, 0.12);
  --line-2: rgba(40, 30, 15, 0.2);
  --raised: rgba(255, 255, 255, 0.55);
  --on-gold: #141414;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-color: var(--gold-line); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.preview-banner {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold);
  background: var(--gold-soft);
  border-bottom: 1px solid var(--gold-line);
  padding: 8px 16px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--line);
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
}
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-name span { color: var(--gold); }
.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.header-tools a,
.theme-toggle {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.header-tools a:hover,
.theme-toggle:hover {
  color: var(--gold-hi);
  border-color: var(--gold-line);
}
.header-tools a[aria-current="page"] {
  color: var(--gold);
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

main { flex: 1; width: 100%; }

/* Index */
.wrap {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 72px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0 0 12px;
}
.page-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.1rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0 0 14px;
}
.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 36px;
  line-height: 1.55;
}

.card-list { display: grid; gap: 14px; margin: 0 0 48px; }
.card {
  display: grid;
  gap: 8px;
  padding: 22px 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--raised);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), background 0.2s, transform 0.15s var(--ease);
}
a.card:hover {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: inherit;
}
a.card:active { transform: scale(0.99); }
.card h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card .meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

.coming h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 8px;
}
.coming > p { color: var(--muted); margin: 0 0 16px; }
.coming ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  counter-reset: n 2;
}
.coming li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.coming li::before {
  counter-increment: n;
  content: counter(n);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  min-width: 1.4em;
  padding-top: 0.35em;
}
.coming li span { color: var(--muted); font-size: 0.92rem; display: block; margin-top: 2px; }

/* Article body */
article.note { width: min(680px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 80px; }
article.note header.intro { margin-bottom: 28px; }
article.note h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.85rem, 1.15rem + 2.6vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0 0 12px;
}
.byline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
  margin: 2em 0 0.7em;
}
.prose ul, .prose ol {
  margin: 0 0 1.3em;
  padding-left: 1.2em;
}
.prose li { margin: 0 0 0.45em; padding-left: 0.2em; }
.prose li::marker { color: var(--gold); }

.cta {
  margin: 2.6em 0 0;
  padding: 22px 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  display: grid;
  gap: 10px;
}
.cta h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  margin: 0;
}
.cta p { margin: 0; color: var(--ink); }
.cta p.quiet { color: var(--muted); font-size: 0.95rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  margin-top: 6px;
  width: fit-content;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  color: var(--on-gold);
  background: linear-gradient(180deg, #f3d06f, var(--gold) 55%, var(--gold-lo));
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 190, 0.35), 0 8px 24px rgba(217, 167, 42, 0.22);
  transition: transform 0.15s var(--ease), filter 0.15s;
}
.btn:hover { color: var(--on-gold); filter: brightness(1.05); }
.btn:active { transform: scale(0.98); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: var(--dim);
  font-size: 0.85rem;
}
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .wrap, article.note { width: calc(100% - 32px); padding-top: 28px; }
  .brand-name { font-size: 0.92rem; }
  .card { padding: 18px; }
}

html[data-theme="light"] .site-header { background: rgba(243, 234, 214, 0.92); }
