/* That Optimistic Guy — shared styles for every page */
:root {
  --bg: #f8f6f0;
  --surface: #ffffff;
  --ink: #181715;
  --ink-2: #575c5e;
  --line: #e6e4de;
  --accent: #93441a;
  --accent-ink: #ffffff;
  --sun: #ffcd35;
  --serif: "Hedvig Letters Serif", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1080px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { font-family: var(--serif); font-size: 20px; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-2); }
.nav a:hover { color: var(--accent); }
@media (max-width: 600px) {
  .brand { font-size: 17px; }
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
  .nav li:nth-child(2) { display: none; }
}

/* Type helpers */
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.lede { font-size: 19px; color: var(--ink-2); max-width: 40em; }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(38px, 6.2vw, 68px); max-width: 15em; }
.hero h1::after {
  content: ""; display: block; width: 48px; height: 3px; background: var(--accent); margin: 28px 0;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid var(--ink); transition: background .15s, color .15s;
  max-width: 100%; overflow-wrap: anywhere;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Numbers */
.numbers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 32px 24px 32px 0; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-num { font-family: var(--serif); font-size: 48px; line-height: 1; }
.stat-label { color: var(--ink-2); font-size: 15px; }
@media (max-width: 700px) {
  .numbers { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 20px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
}

/* Sections */
.section { padding-top: 88px; padding-bottom: 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: 32px; }
.section-head .eyebrow { flex-basis: 100%; margin-bottom: 0; }
.section-head h2 { font-size: clamp(30px, 4vw, 40px); flex: 1; }
.more { color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.when { color: var(--ink-2); font-size: 14px; font-weight: 500; padding-top: 4px; }
.timeline h3 { font-size: 21px; margin-bottom: 4px; }
.timeline p { color: var(--ink-2); }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.card h3 { font-size: 22px; }
.card p { color: var(--ink-2); flex: 1; }
.card a { color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.card a:hover { text-decoration: underline; }

/* Posts */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post { border-bottom: 1px solid var(--line); }
.post a {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 20px 0; text-decoration: none;
}
.post h3 { font-size: 22px; }
.post a:hover h3 { color: var(--accent); }
.post time { color: var(--ink-2); font-size: 14px; white-space: nowrap; padding-top: 6px; }
.post .excerpt { grid-column: 1 / -1; color: var(--ink-2); font-size: 16px; }
.post .excerpt p { margin: 0; }
.post-empty { padding: 20px 0; color: var(--ink-2); border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .post a { grid-template-columns: 1fr; } .post time { padding-top: 0; } }
.also { margin-top: 20px; color: var(--ink-2); }
.also a { color: var(--accent); font-weight: 600; }

/* Socials */
.socials { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.socials a {
  display: flex; flex-direction: column; gap: 2px; padding: 20px 22px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.socials a:hover { border-color: var(--accent); transform: translateY(-2px); }
.socials span { font-family: var(--serif); font-size: 22px; }
.socials small { color: var(--ink-2); font-size: 14px; }

/* Contact */
.contact { padding-bottom: 96px; }
.contact h2 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 14px; }
.contact .btn { margin-top: 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-2); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
