/* ==========================================================================
   danbmiller.net — shared stylesheet
   Editorial / text-forward. No external fonts, no JS, no tracking.
   ========================================================================== */

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  --bg: #fdfcfa;
  --bg-soft: #f4f1ec;
  --text: #1c1b19;
  --muted: #5f5b55;
  --accent: #094a68;
  --accent-soft: #0d6389;
  --rule: #e3ddd3;

  --measure: 34rem;
  --wide: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181a;
    --bg-soft: #1d2124;
    --text: #e9e6e0;
    --muted: #a5a099;
    --accent: #7cc2e2;
    --accent-soft: #a3d6ee;
    --rule: #2e3438;
  }
}

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

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

body {
  margin: 0;
  padding: 0 1.5rem 5rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
}

/* ---------- Header / nav ---------- */

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 2.25rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.site-head .wordmark {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.site-head .wordmark:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3rem);
}
h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
}
h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
}

p {
  margin: 0 0 1.15rem;
  max-width: var(--measure);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
a:hover {
  color: var(--accent-soft);
}

.lede {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--text);
}

.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.muted {
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3.5rem 0;
}

/* ---------- Home hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}

.hero img {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: var(--bg-soft);
}

@media (max-width: 34rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero img {
    width: 128px;
    height: 128px;
  }
}

/* ---------- Buttons / link rows ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.75rem 0 0;
}

.btn {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  transition: border-color 0.15s, color 0.15s;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .btn-primary,
  .btn-primary:hover {
    color: #0f1416;
  }
}

/* ---------- Resume ---------- */

.job {
  margin-bottom: 2.25rem;
  max-width: var(--measure);
}

.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.15rem 1.5rem;
}

.job-title {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0;
}
.job-org {
  font-weight: 400;
  color: var(--muted);
}
.job-dates {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}

ul {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  max-width: var(--measure);
}
li {
  margin-bottom: 0.4rem;
  padding-left: 0.2rem;
}
li::marker {
  color: var(--muted);
}

/* ---------- Item lists (writing, blog index) ---------- */

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.items li {
  padding: 1.4rem 0;
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
.items li:first-child {
  border-top: 1px solid var(--rule);
}

.item-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.3rem;
}
.item-title a {
  text-decoration: none;
  color: var(--text);
}
.item-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.item-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.item-desc {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- Empty state ---------- */

.empty {
  max-width: var(--measure);
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 1.6rem 1.7rem;
}
.empty p:last-child {
  margin-bottom: 0;
}

/* ---------- Blog post ---------- */

.post-body {
  max-width: var(--measure);
}
.post-body p,
.post-body ul,
.post-body ol {
  font-size: 1.125rem;
}
.post-body blockquote {
  margin: 1.6rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

/* ---------- Footer ---------- */

.site-foot {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  justify-content: space-between;
}
.site-foot a {
  color: var(--muted);
}
.site-foot a:hover {
  color: var(--accent);
}

/* ---------- Print (resume) ---------- */

@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --muted: #444;
    --accent: #000;
    --rule: #bbb;
  }
  body {
    font-size: 10.5pt;
    line-height: 1.4;
    padding: 0;
  }
  .site-head,
  .site-foot,
  .actions,
  .skip,
  .no-print {
    display: none !important;
  }
  h2 {
    margin-top: 1.4rem;
  }
  .job {
    margin-bottom: 1rem;
    page-break-inside: avoid;
  }
  a {
    text-decoration: none;
  }
}
