/* daviddamato.com — one column, system type, no JavaScript.
   Deliberately plain: the content is meant to carry the page. */

:root {
  --bg: #f1f0ee;
  --fg: #1a1a1a;
  --muted: #6d6a66;
  --rule: #d9d7d3;
  --accent: #9c5a30;
  --measure: 41rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #e6e4e0;
    --muted: #98948d;
    --rule: #2e2e33;
    --accent: #cf9a63;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

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

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--fg); color: var(--bg); padding: 0.5rem 0.75rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

/* ── header ─────────────────────────────────────── */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  margin-bottom: 3rem;
}
.me { font-weight: 600; text-decoration: none; }
.top nav { display: flex; gap: 1.25rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }

/* ── intro ──────────────────────────────────────── */
.intro {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.portrait {
  width: 116px;
  height: 116px;
  flex: none;
  border-radius: 3px;
  object-fit: cover;
  filter: saturate(0.95);
}

.intro-text { padding-top: 0.15rem; }

h1 {
  font-size: 1.6rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0 0 0.3rem;
}

.role { color: var(--muted); margin: 0 0 0.65rem; }

.links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; font-size: 0.9375rem; }

/* social glyph row */
.icons { display: flex; align-items: center; gap: 1.05rem; margin: 0; }
.icons a {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.icons a:hover { color: var(--fg); }
.icons svg { display: block; }

/* ── sections ───────────────────────────────────── */
section { margin-top: 2.75rem; }

h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.num { color: var(--accent); margin-right: 0.55rem; }

.entry { margin-bottom: 1.9rem; }
.entry:last-of-type { margin-bottom: 0; }

.entry-head { margin-bottom: 0.45rem; }
.entry-head strong { font-weight: 600; }
.entry-head .where {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
}

.aside { margin-top: 1.6rem; color: var(--muted); font-size: 0.9375rem; }

/* ── blog ───────────────────────────────────────── */
main > h1 {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.lede { color: var(--muted); margin-bottom: 2.25rem; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-item { margin-bottom: 1.9rem; }
.post-item:last-child { margin-bottom: 0; }

.back { font-size: 0.9375rem; margin-bottom: 2rem; }
.back a { color: var(--muted); }
.back a:hover { color: var(--accent); }

.post article h1 { margin-bottom: 0.5rem; }
.post .meta { color: var(--muted); font-size: 0.9375rem; margin-bottom: 2rem; }

.post article h2 {
  font-size: 1.0625rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: -0.005em;
  color: var(--fg);
  border-bottom: 0;
  padding-bottom: 0;
  margin: 2.25rem 0 0.75rem;
}

.post article h3 {
  font-size: 1rem;
  font-weight: 650;
  margin: 1.75rem 0 0.6rem;
}

.post article ul,
.post article ol { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.post article li { margin-bottom: 0.4rem; }

.post article blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}

.post article img { margin: 1.75rem 0; border-radius: 3px; }

.post article hr { border: 0; border-top: 1px solid var(--rule); margin: 2.25rem 0; }

.post article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
@media (prefers-color-scheme: dark) {
  .post article code { background: rgba(255, 255, 255, 0.08); }
}

/* ── footer ─────────────────────────────────────── */
footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}
footer p { margin-bottom: 0.9rem; }
footer .links { margin-top: 0; }

/* ── narrow ─────────────────────────────────────── */
@media (max-width: 30rem) {
  .page { padding-top: 2rem; }
  .intro { gap: 1rem; }
  .portrait { width: 88px; height: 88px; }
  h1 { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
