/*
 * Kevin Reinhardt — archive
 * Editorial design system, translated from the Claude design canvas
 * "Kevin Reinhardt.dc.html". Warm paper, Georgia serif, IBM Plex Mono
 * labels, green accent. Drives the homepage, posts and pages.
 */

/* ------------------------------------------------------------------ *
 * Tokens
 * ------------------------------------------------------------------ */
:root {
  --paper:        #f3f1ea;
  --paper-2:      #ece8dd;
  --ink:          #211f1b;
  --ink-strong:   #1c1b18;
  --text:         #3a382f;
  --muted:        #56534a;
  --faint:        #6f6b62;
  --label:        #908b80;
  --rule:         #d9d4c7;
  --rule-soft:    #e2ddd0;
  --accent:       #3f6b54;
  --rust:         #9c4a36; /* inline code / small accents */
  --thumb-bg:     #e7e2d6;
  --thumb-border: #d2ccbd;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 820px; /* main column width */
}

/* ------------------------------------------------------------------ *
 * Resets & base
 * ------------------------------------------------------------------ */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #d9e2d4; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

/* Shared monospace eyebrow/label */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--label);
  text-transform: uppercase;
}

/* KR Maps brand mark — the krmaps.com favicon (local SVG copy) */
.krmaps-icon {
  width: 14px;
  height: 14px;
  flex: none;
  display: block;
}
.krmaps-icon--lg { width: 30px; height: 30px; }

/* ------------------------------------------------------------------ *
 * Layout
 * ------------------------------------------------------------------ */
.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 28px;
}

/* Top utility bar -------------------------------------------------- */
.topbar { border-bottom: 1px solid var(--rule); }
.topbar__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 28px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}
.topbar__brand { color: var(--faint); white-space: nowrap; }
.topbar__brand:hover { color: var(--ink); }
.topbar__nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar__nav a:not(.krmaps):hover { color: var(--ink); }

/* KR Maps link (top bar + footer) */
.krmaps {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.16em;
}
.krmaps:hover { opacity: 0.65; }
.krmaps__arrow { opacity: 0.55; }

/* ------------------------------------------------------------------ *
 * Homepage — masthead
 * ------------------------------------------------------------------ */
.masthead { padding: 78px 0 0; }
.masthead__title {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 60px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.04;
  color: var(--ink-strong);
}
.masthead__tagline {
  margin-top: 10px;
  font-size: clamp(18px, 2.4vw, 23px);
  color: var(--faint);
  font-style: italic;
}
.masthead__intro {
  margin: 30px 0 0;
  font-size: 18px;
  line-height: 1.66;
  color: var(--text);
  max-width: 600px;
}
.masthead .eyebrow { display: block; margin-bottom: 26px; }

/* KR Maps "NOW" callout */
.callout {
  margin-top: 30px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper-2);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: flex-start;
}
.callout__head {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
}
.callout__name {
  font-family: var(--mono);
  letter-spacing: 0.2em;
  font-size: 16px;
  color: var(--ink-strong);
}
.callout__badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.callout__text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.55;
}
.callout__text a,
.link-underline {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(63, 107, 84, 0.4);
}
.callout__text a:hover,
.link-underline:hover { text-decoration-color: var(--accent); }

/* ------------------------------------------------------------------ *
 * Homepage — index of work
 * ------------------------------------------------------------------ */
.index { padding: 64px 0 0; }
.index__label { padding-bottom: 8px; }

.entry {
  display: flex;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 1px solid var(--rule); }

.entry__thumb { flex: none; width: 152px; }
.entry__frame {
  aspect-ratio: 3 / 2;
  border: 1px solid var(--thumb-border);
  background: var(--thumb-bg);
  overflow: hidden;
}
.entry__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Placeholder frame for entries with no surviving image */
.entry__frame--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}
.entry__frame--empty span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  line-height: 1.5;
}

.entry__body { flex: 1; min-width: 0; }
.entry__meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--label);
}
.entry__title {
  margin: 9px 0 0;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.18;
}
.entry__title a {
  color: var(--ink-strong);
  border-bottom: 1px solid #cfc9ba;
}
.entry__title a:hover { color: var(--accent); border-color: var(--accent); }
.entry__desc {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
}
.entry__links {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}
.entry__links a { color: var(--accent); }
.entry__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.entry__links .muted { color: #a8a294; }

/* ------------------------------------------------------------------ *
 * Homepage — toolset colophon
 * ------------------------------------------------------------------ */
.colophon { padding: 60px 0 0; }
.colophon .eyebrow { display: block; margin-bottom: 18px; }
.colophon dl {
  margin: 0;
  display: grid;
  grid-template-columns: 130px 1fr;
  font-size: 15px;
}
.colophon dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--label);
  padding: 13px 0;
  border-top: 1px solid var(--rule-soft);
}
.colophon dd {
  margin: 0;
  padding: 13px 0;
  border-top: 1px solid var(--rule-soft);
  color: var(--text);
  line-height: 1.55;
}
.colophon dl > dt:last-of-type,
.colophon dl > dd:last-of-type { border-bottom: 1px solid var(--rule-soft); }

/* ------------------------------------------------------------------ *
 * Site footer (colophon) — shared across all pages
 * ------------------------------------------------------------------ */
.sitefooter {
  padding: 56px 0 80px;
  margin-top: 48px;
  border-top: 2px solid var(--ink);
}
.sitefooter__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
}
.sitefooter__bio { max-width: 430px; }
.sitefooter__bio-name {
  font-size: 19px;
  color: var(--ink-strong);
  margin-bottom: 8px;
}
.sitefooter__bio p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--faint);
}
.sitefooter__meta {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 2.1;
  color: var(--muted);
}
.sitefooter__meta a { color: var(--accent); }
.sitefooter__meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sitefooter__row { display: flex; align-items: center; gap: 7px; }
.sitefooter__copy { color: var(--label); }

/* ------------------------------------------------------------------ *
 * Posts & pages
 * ------------------------------------------------------------------ */
.post,
.page { padding: 56px 0 0; }

.post__header { margin-bottom: 34px; }
.post__eyebrow { display: block; margin-bottom: 16px; }
.post__title,
.page__title {
  margin: 0;
  font-size: clamp(28px, 4.6vw, 42px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink-strong);
}

/* Rendered markdown body --------------------------------------------- */
.content { font-size: 17px; color: var(--text); }
.content > :first-child { margin-top: 0; }

.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-strong);
  margin: 2em 0 0.6em;
  letter-spacing: -0.01em;
}
.content h1 { font-size: 1.7rem; }
.content h2 { font-size: 1.4rem; }
.content h3 { font-size: 1.2rem; }
.content h4, .content h5, .content h6 {
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
}

.content p { margin: 0 0 1.1rem; }
.content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(63, 107, 84, 0.35);
}
.content a:hover { text-decoration-color: var(--accent); }

.content ul, .content ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.content li { margin-bottom: 0.3rem; }

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

.content img {
  display: block;
  margin: 1.4rem 0;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.content blockquote {
  margin: 1.2rem 0;
  padding: 0.4rem 0 0.4rem 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.content blockquote > :last-child { margin-bottom: 0; }

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

/* Code */
.content code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--rust);
  background: #efeadd;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}
.content pre,
.content .highlight {
  margin: 0 0 1.2rem;
  background: #efeadd;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  overflow: auto;
}
.content pre {
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.5;
}
.content .highlight pre { margin: 0; border: 0; }
.content pre code {
  padding: 0;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

/* Embedded archived maps / videos. Scoped to TOP-LEVEL iframes so the
   About page's framed hero iframe (nested in its own styled wrapper)
   keeps its original layout untouched. */
.content iframe { max-width: 100%; }
.content > iframe {
  display: block;
  width: 100%;
  margin: 1.4rem 0;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper-2);
}

/* Tables */
.content table {
  width: 100%;
  margin: 0 0 1.2rem;
  border-collapse: collapse;
  border: 1px solid var(--rule);
  font-size: 0.92em;
}
.content th, .content td {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--rule);
  text-align: left;
}
.content thead th { background: var(--paper-2); }

/* Post footer navigation ------------------------------------------- */
.post__nav {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.post__back {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.post__back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* "More from the archive" list */
.related { margin-top: 28px; }
.related .eyebrow { display: block; margin-bottom: 14px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.related li a { color: var(--ink-strong); font-size: 17px; }
.related li a:hover { color: var(--accent); }
.related li small {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--label);
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap, .topbar__inner { padding: 0 20px; }
  .masthead { padding-top: 54px; }
  .index { padding-top: 48px; }

  .entry { gap: 16px; }
  .entry__thumb { width: clamp(92px, 28vw, 130px); }
  .entry__title { font-size: 22px; }

  .colophon dl { grid-template-columns: 92px 1fr; }
}

@media (max-width: 420px) {
  .topbar__inner { letter-spacing: 0.1em; gap: 10px; }
  .entry { flex-direction: column; }
  .entry__thumb { width: 100%; max-width: 220px; }
}

/* ------------------------------------------------------------------ *
 * About page
 * ------------------------------------------------------------------ */
.content .about-lead {
  font-size: 20px;
  line-height: 1.62;
  color: var(--text);
  max-width: 620px;
  margin: 0 0 22px;
}
.content .about-contact {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 44px;
}
.content .about-contact strong { color: var(--ink-strong); font-weight: 500; }
.content .about-contact a { color: var(--accent); text-decoration: none; }
.content .about-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }

.content .about-section { margin: 0 0 40px; }
.content .about-section > .eyebrow { display: block; margin-bottom: 4px; }

.content .about-group {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--rule-soft);
}
.content .about-section .about-group:last-of-type { border-bottom: 1px solid var(--rule-soft); }
.content .about-group__label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
  padding-top: 5px;
}
.content .chips { display: flex; flex-wrap: wrap; gap: 7px; }
.content .about-recent { margin-top: 14px; }
.content .chip {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 4px 9px;
  line-height: 1.4;
}
@media (max-width: 560px) {
  .content .about-group { grid-template-columns: 1fr; gap: 8px; }
}
