@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/DMSerifDisplay/DMSerifDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3/SourceSans3[wght].ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Code Pro";
  src: url("/assets/fonts/SourceCodePro/SourceCodePro[wght].ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf7f2;
  --surface: #f0ebe3;
  --surfaceSoft: #f6f1e8;
  --bgGlow: #fffdf8;
  --text: #2c2825;
  --muted: #6b6560;
  --accent: #d97706;
  --accentHover: #b45309;
  --border: #e7e5e4;
  --diffAddText: #166534;
  --diffAddBg: #dcfce7;
  --diffDeleteText: #991b1b;
  --diffDeleteBg: #fee2e2;
  --headerBg: #000000;
  --headerText: #f3ece3;
  --headerLink: #f0b55d;
  --headerBorder: #1f1f1f;
  --font-display: "DM Serif Display", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --content-max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1917;
    --surface: #292524;
    --surfaceSoft: #312c2a;
    --bgGlow: #272220;
    --text: #e7e5e4;
    --muted: #a8a29e;
    --accent: #f59e0b;
    --accentHover: #fbbf24;
    --border: #44403c;
    --headerBg: #000000;
    --headerText: #f8f1e7;
    --headerLink: #f6bf6c;
    --headerBorder: #3f3a37;
    --diffAddText: #86efac;
    --diffAddBg: #14532d;
    --diffDeleteText: #fecaca;
    --diffDeleteBg: #7f1d1d;
  }
}

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

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.68;
  color: var(--text);
  background: radial-gradient(circle at top, var(--bgGlow) 0%, var(--bg) 58%);
}

a {
  color: var(--accent);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

a:hover,
a:focus-visible {
  color: var(--accentHover);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.14;
}

h1 {
  font-size: clamp(2rem, 7vw, 2.5rem);
}

h2 {
  font-size: clamp(1.4rem, 5vw, 1.75rem);
}

h3 {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

pre {
  overflow-x: auto;
  background: var(--surfaceSoft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -2.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  z-index: 200;
}

.skip-link:focus {
  top: 0.65rem;
}

.site-container {
  width: min(calc(100% - 2rem), var(--content-max));
  margin-inline: auto;
}

.site-main {
  display: grid;
  gap: 2rem;
  padding-block: 2rem 2.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--headerBg);
  border-bottom: 1px solid var(--headerBorder);
}

.site-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.75rem 0.8rem;
}

.wordmark-link {
  display: inline-flex;
  align-items: center;
}

.wordmark-logo {
  display: block;
  width: clamp(48px, 7.5vw, 66px);
  height: auto;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.site-nav a {
  color: var(--headerLink);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--headerText);
  text-decoration: underline;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(0.95rem, 3vw, 1.25rem);
}

.hero {
  background: var(--bg);
  border-color: transparent;
  padding-inline: 0.15rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 9vw, 3.35rem);
  margin-bottom: 0.85rem;
}

.hero-tagline {
  font-size: 1.22rem;
}

.hero-divider {
  margin: 1.1rem 0 1.1rem;
  border: 0;
  border-top: 1px solid var(--border);
}

.hero p:last-child {
  margin-bottom: 0;
}

.cta-link {
  font-weight: 600;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 9999px;
  background: var(--accent);
  color: #2c2825;
  font-weight: 700;
  padding: 0.52rem 1rem;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: var(--accentHover);
  color: #1f1b16;
  text-decoration: none;
}

.feature-block p:last-child {
  margin-bottom: 0;
}

.clean-list,
.stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.clean-list li + li {
  margin-top: 0.8rem;
}

.stack-list {
  display: grid;
  gap: 1rem;
}

.meta-inline,
.timeline-date,
.timeline-version {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.post-content > *:last-child {
  margin-bottom: 0;
}

.latest-thinking h2 {
  margin-bottom: 0.8rem;
}

.thinking-list li {
  padding-block: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.thinking-list li:first-child {
  border-top: 1px solid var(--border);
}

.thinking-list li a {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.2;
}

.thinking-list li p:nth-child(2) {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.post-list-item {
  padding-block: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.post-list-item:first-child {
  border-top: 1px solid var(--border);
}

.build-card {
  position: relative;
}

.build-card-active {
  border-left: 4px solid var(--accent);
  padding-left: calc(clamp(0.95rem, 3vw, 1.25rem) + 0.45rem);
}

.build-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.build-card-header h2 {
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.status-active {
  background: color-mix(in srgb, var(--accent) 22%, #fff);
  color: #7c3a03;
  border-color: color-mix(in srgb, var(--accent) 45%, #fff);
}

.status-shipped {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.status-parked {
  background: #e5e7eb;
  color: #374151;
  border-color: #d1d5db;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--accent);
}

.timeline-entry {
  position: relative;
  padding: 0.1rem 0 1rem 0.9rem;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -0.44rem;
  top: 0.3rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-message {
  margin-bottom: 0.25rem;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.timeline-link {
  font-size: 0.95rem;
}

.build-links {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 1.25rem;
}

.site-footer-inner {
  padding-block: 1rem 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

@media (min-width: 720px) {
  .site-header-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
details {
  margin: 0.2rem 0 1rem 0.85rem;
}

p + details {
  margin-top: -0.15rem;
}

details summary {
  margin: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
}

details[open] summary {
  margin-bottom: 0.35rem;
}

details > div {
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.98rem;
}

details > div p {
  margin: 0.45rem 0;
}

details > div > *:first-child {
  margin-top: 0;
}

details > div > *:last-child {
  margin-bottom: 0;
}
