/*
 * Shared type + layout layer. Loaded last on every public page (after the page's
 * inline <style> and /css/site-chrome.css), so it wins at equal specificity.
 * Geist for headings + body, Geist Mono for labels, meta and code.
 * Colors are NOT defined here: pages keep their own --bg / --text / --accent tokens.
 */
:root {
  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: none;
}

button, input, select, textarea {
  font-family: var(--font-sans);
}

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

/* ---------- Blog article reading column ---------- */
.article-wrap {
  max-width: 680px;
}

.article-meta,
.read-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

.article-wrap h1 {
  font-size: clamp(2rem, 1.45rem + 2.4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.article-dek,
.read-time {
  color: #9a9a9a; /* readability: --muted (#666) is under 4.5:1 on #0a0a0a */
}

.article-dek {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
}

.article-wrap h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 3rem 0 0.75rem;
}

.article-wrap h3 {
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.5rem;
}

.article-wrap p,
.article-wrap li {
  line-height: 1.65;
}

.article-wrap p {
  margin-bottom: 1.5rem;
  max-width: 68ch;
}

.article-wrap li {
  max-width: 68ch;
}

.article-wrap code,
.article-wrap pre,
.cmd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0;
}

.article-wrap pre {
  font-size: 13px;
  line-height: 1.7;
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-wrap table {
  font-size: 0.9em;
}

.article-wrap img,
.article-wrap video,
.article-wrap iframe {
  max-width: 100%;
}

/* ---------- Components: quiet, border-only interaction ---------- */
.post-card,
.tool-card,
.work-card {
  box-shadow: none;
}

.post-card h3,
.tool-card h3,
.work-card h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.post-tag,
.tool-tag,
.section-label {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.post-date {
  font-family: var(--font-mono);
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .article-wrap h1 {
    font-size: 2rem;
    line-height: 1.15;
  }

  .article-wrap h2 {
    margin-top: 2.5rem;
  }

  .article-wrap p,
  .article-wrap li {
    max-width: none;
  }

  .article-wrap pre {
    font-size: 12.5px;
  }
}
