:root,
[data-theme="light"] {
  --bg: #f4efe6;
  --bg-elev: #fffdf8;
  --ink: #1c1917;
  --muted: #6f675e;
  --line: rgba(28, 25, 23, 0.1);
  --accent: #c45c26;
  --accent-soft: rgba(196, 92, 38, 0.12);
  --shadow: 0 18px 40px rgba(48, 32, 18, 0.08);
}

[data-theme="dark"] {
  --bg: #14110e;
  --bg-elev: #1d1915;
  --ink: #f4efe6;
  --muted: #b3a89c;
  --line: rgba(244, 239, 230, 0.12);
  --accent: #e07a3d;
  --accent-soft: rgba(224, 122, 61, 0.16);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 40;
  transform-origin: left;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo-text {
  font-family: Figtree, system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
}

.logo-text strong {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.mark {
  width: 1.35rem;
  height: 1.35rem;
  border: 1.5px solid var(--accent);
  border-radius: 99px;
  box-shadow: inset 0 0 0 3.5px var(--bg), inset 0 0 0 5px var(--accent);
  background: var(--accent);
}

.theme-toggle {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

[data-theme="light"] .theme-toggle .moon,
[data-theme="dark"] .theme-toggle .sun {
  display: none;
}

.hero {
  padding: 4.5rem 0 3rem;
  max-width: 42rem;
}

.hero.compact {
  padding: 3rem 0 1.5rem;
}

.eyebrow,
.section-label,
.kicker,
.meta,
.chip,
.btn,
.theme-toggle,
.react,
.reactions-label,
.site-footer {
  font-family: Figtree, system-ui, sans-serif;
}

.eyebrow,
.section-label,
.kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.7rem;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
}

.lede {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 40rem;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.btn {
  display: inline-flex;
  margin-top: 1.4rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

.feed {
  padding-bottom: 4rem;
}

.section-label {
  margin-bottom: 1.2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card-media,
.card-image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
}

.card-image.placeholder {
  background:
    radial-gradient(circle at 30% 30%, var(--accent), transparent 45%),
    var(--bg-elev);
}

.card-body {
  padding: 1.15rem 1.2rem 1.3rem;
}

.card-body h2 {
  font-size: 1.35rem;
}

.card-body h2 a {
  text-decoration: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.chip {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  color: var(--muted);
}

.article-wrap {
  width: min(760px, calc(100% - 2rem));
  padding-bottom: 5rem;
}

.article-header {
  padding: 2.4rem 0 1.2rem;
}

.article-header h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
}

.feature {
  margin: 0 0 2rem;
}

.feature img {
  width: 100%;
  border-radius: 1.1rem;
  max-height: 28rem;
  object-fit: cover;
}

.prose {
  font-size: 1.12rem;
  max-width: 68ch;
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose h2,
.prose h3 {
  margin-top: 1.8em;
}

.prose p {
  margin: 0;
}

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

.prose blockquote {
  margin: 1.6rem 0;
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose img {
  border-radius: 0.8rem;
  margin: 1.5rem 0;
}

.prose pre,
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.prose pre {
  overflow-x: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 1rem;
}

.reactions {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.reactions-label {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.react {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.react.is-on,
.react[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.react-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.empty {
  color: var(--muted);
  padding: 1rem 0 4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  min-height: 4.8rem;
}

@media (max-width: 640px) {
  html {
    font-size: 17px;
  }

  .hero {
    padding-top: 2.8rem;
  }

  .react-label {
    display: none;
  }
}
