/* Hank Marquardt — editorial personal site.
   Warm paper, serif display, restrained accent, no JavaScript.
   Structure: tokens, reset, layout, header, type, components, responsive, print. */

:root {
  color-scheme: light dark;

  --paper: #f8f4ec;
  --paper-deep: #efe7d9;
  --ink: #1a1713;
  --ink-soft: #4b463e;
  --ink-muted: #746c60;
  --rule: #dcd2c0;
  --accent: #9a3d21;
  --accent-ink: #fdf8f1;
  --moss: #45604a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 42rem;
  --radius: 3px;
  --step: clamp(1rem, 0.85rem + 0.6vw, 1.25rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15130f;
    --paper-deep: #1e1b16;
    --ink: #ece6da;
    --ink-soft: #c6beb0;
    --ink-muted: #9b9285;
    --rule: #332e27;
    --accent: #e4936c;
    --accent-ink: #1a1713;
    --moss: #a3bda6;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0 0 1.2em;
  padding-left: 1.2em;
}

li {
  margin-bottom: 0.4em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

a:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

strong {
  font-weight: 600;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-200%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: none;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 92%, var(--paper-deep));
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.35rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.93rem;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
  font-size: 0.93rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.75rem 3rem;
}

.footer-mark {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.footer-line {
  color: var(--ink-muted);
  margin: 0;
}

.footer-meta {
  text-align: left;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.2rem;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration-color: color-mix(in srgb, var(--ink-muted) 45%, transparent);
}

.footer-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Page and hero type */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.hero {
  max-width: 56rem;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.hero h1 {
  font-size: clamp(2.5rem, 7.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 22ch;
  margin-bottom: 1.1rem;
}

.lede {
  font-size: clamp(1.08rem, 1rem + 0.55vw, 1.32rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 56ch;
}

.hero-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-muted);
  max-width: 46ch;
  margin-top: 1.6rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--rule);
}

.page-head {
  max-width: 54rem;
  padding-bottom: clamp(1rem, 3vw, 2rem);
}

.page-head h1 {
  font-size: clamp(2.05rem, 5vw, 3.3rem);
  letter-spacing: -0.028em;
  max-width: 28ch;
  margin-bottom: 0.75rem;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

main.wrap {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5.5rem);
}

/* Sections and lists */

.section {
  margin-top: clamp(2.75rem, 6vw, 4.5rem);
}

.section h2 {
  font-size: clamp(1.42rem, 1.1rem + 1vw, 1.85rem);
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.35rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  border-top: 0;
  padding-top: 0;
  margin: 0;
}

.section-link {
  margin: 0;
  font-size: 0.92rem;
}

.section-link a::after {
  content: " →";
}

.section-intro {
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 1.75rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem clamp(1.75rem, 4vw, 3.5rem);
  max-width: 62rem;
}

.columns > * {
  min-width: 0;
}

.mini-title {
  font-size: 1.12rem;
  margin-bottom: 0.35rem;
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}

.work-item {
  margin: 0;
  padding: 1.6rem 1.75rem 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.work-item:nth-child(odd) {
  padding-right: 2rem;
}

.work-item:nth-child(even) {
  padding-left: 2rem;
  border-left: 1px solid var(--rule);
}

.work-kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.45rem;
}

.work-item h3 {
  font-size: 1.32rem;
  margin-bottom: 0.45rem;
}

.work-item h3 a {
  color: var(--ink);
  text-decoration-color: transparent;
}

.work-item h3 a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.work-item p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.note-list li {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 0.2rem 1.75rem;
  margin: 0;
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
}

.note-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.note-date {
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 0.4rem;
}

.note-title {
  font-family: var(--serif);
  font-size: 1.24rem;
  line-height: 1.25;
  color: var(--ink);
  text-decoration: none;
  grid-column: 2;
}

.note-title:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.note-summary {
  grid-column: 2;
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  max-width: 62ch;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 60rem;
}

.link-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
  align-items: baseline;
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.link-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.link-list .note-date {
  min-width: 8.5rem;
  padding-top: 0;
  font-size: 0.7rem;
}


/* Work entries, notes, prose */

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  margin: 0;
  padding: 1.85rem 0 1.7rem;
  border-top: 1px solid var(--rule);
}

.entry-list > .entry:last-child {
  border-bottom: 1px solid var(--rule);
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-bottom: 0.55rem;
}

.entry-head h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.55rem);
  margin: 0;
}

.entry-head h3 a {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.entry-head h3 a:hover {
  color: var(--accent);
}

.entry-domain {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
}

.entry-summary {
  max-width: 64ch;
  color: var(--ink-soft);
}

.entry-fields {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.45rem 1.5rem;
  margin: 1.15rem 0 0;
  max-width: 64rem;
}

.entry-fields dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 0.36rem;
}

.entry-fields dd {
  margin: 0;
  color: var(--ink-soft);
  max-width: 62ch;
}

.entry-note {
  color: var(--ink-muted);
  font-size: 0.94rem;
  margin-bottom: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-right: 0.35rem;
  white-space: nowrap;
}

.empty-state {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  max-width: 58rem;
}

.empty-state p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.empty-title {
  font-family: var(--serif);
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}

.article {
  max-width: 46rem;
}

.article-head {
  padding-bottom: 1.5rem;
}

.article-head h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  letter-spacing: -0.028em;
  max-width: 26ch;
  margin-bottom: 0.7rem;
}

.article-meta {
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.article-meta .tag {
  text-transform: none;
  letter-spacing: 0.04em;
}

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

.article-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
  border-top: 1px solid var(--rule);
  padding-top: 1.2rem;
  margin-top: 1.2rem;
}


.prose {
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--ink);
}

.prose > * {
  max-width: var(--measure);
}

.prose h2 {
  font-size: clamp(1.35rem, 1.2rem + 0.4vw, 1.55rem);
  margin-top: 2.4em;
  margin-bottom: 0.5em;
}

.prose h3 {
  font-size: 1.18rem;
  margin-top: 2em;
  margin-bottom: 0.4em;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: 0.35em;
}

.prose blockquote {
  margin: 1.75rem 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
}

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

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.08em 0.32em;
}

.prose pre {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.55;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.85rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.5rem 0;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.prose img {
  max-width: 100%;
  height: auto;
}

.article-foot {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.94rem;
}

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

.principles {
  max-width: 62rem;
}

.principles li {
  margin-bottom: 0.9rem;
  color: var(--ink-soft);
}

.principles strong {
  color: var(--ink);
}

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

/* Responsive */

@media (max-width: 46rem) {
  .wrap {
    width: min(100% - 1.75rem, 68rem);
  }

  .hero h1 {
    max-width: 18ch;
  }

  .columns,
  .work-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-item,
  .work-item:nth-child(odd),
  .work-item:nth-child(even) {
    padding: 1.35rem 0;
    border-left: 0;
  }

  .note-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }

  .note-title,
  .note-summary {
    grid-column: 1;
  }

  .note-date {
    padding-top: 0;
  }

  .entry-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem 0;
  }

  .entry-fields dd {
    margin-bottom: 0.7rem;
  }

  .link-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .link-list .note-date {
    min-width: 0;
  }

  .footer-meta {
    width: 100%;
  }
}

@media (max-width: 26rem) {
  .site-nav ul {
    gap: 0.3rem 0.9rem;
    font-size: 0.88rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .section-link,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .article {
    max-width: none;
  }
}
