/* kurtismullins.com — direction B: warm paper.
 *
 * A book, not a website. Cream stock, ink, a rust accent that shows up about as
 * often as a printer's flourish. Prose is set in a serif that ships with the
 * operating system (Charter, Iowan, Sitka, Georgia) — zero bytes over the wire,
 * and a face that will still exist in twenty years. Inter, already self-hosted,
 * does the chrome: nav, dates, labels, the small print.
 *
 * The masthead is centred like a title page, the rule under it is a double rule
 * the way a book's half-title is, and a section break is a dinkus — three dots,
 * drawn in CSS, because the font subset is Basic Latin and has no glyph for one.
 *
 * No JavaScript. No framework. No build step: this file is served as written.
 * Inter regeneration command: docs/frontend-assets.md.
 */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2a251e;
  --ink-soft: #6b6152;
  --paper: #f7f2e8;
  --wash: #efe8da;
  --rule: #d8cdb8;
  --accent: #8a4726;
  --accent-wash: #e7d8c8;

  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, sans-serif;

  --measure: 64ch;
  --gap: 2.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9e1d2;
    --ink-soft: #a2988a;
    --paper: #1a1713;
    --wash: #232019;
    --rule: #38332a;
    --accent: #d59263;
    --accent-wash: #33291f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--gap) 1.5rem 4rem;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.68 var(--serif);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-family: var(--sans);
}

/* -------------------------------------------------------------- typography */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.24;
  text-wrap: balance;
  margin: var(--gap) 0 0.7rem;
}
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.2rem); letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.125rem; font-style: italic; font-weight: 400; }

p, ul, ol, dl, pre, figure, table { margin: 0 0 1.35rem; }
p { text-wrap: pretty; }
strong, b { font-weight: 600; }

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

/* A dinkus, drawn rather than typed: the font subset is Basic Latin. */
hr {
  height: 1.5rem;
  width: 4.2rem;
  margin: calc(var(--gap) * 1.15) auto;
  border: 0;
  background-image: radial-gradient(circle at center, var(--ink-soft) 1.6px, transparent 1.7px);
  background-size: 1.4rem 100%;
  background-repeat: repeat-x;
}

img { display: block; max-width: 100%; height: auto; }
figure img { border: 1px solid var(--rule); }
figcaption { margin-top: 0.55rem; font-family: var(--sans); font-size: 0.875rem; color: var(--ink-soft); font-style: italic; }

code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }
code { background: var(--wash); padding: 0.08em 0.3em; }
pre {
  padding: 1rem 1.15rem;
  overflow-x: auto;
  background: var(--wash);
  border: 1px solid var(--rule);
}
pre code { background: none; padding: 0; font-size: inherit; }

blockquote {
  margin: 0 0 1.35rem;
  padding: 0 1.4rem;
  border-left: 2px solid var(--accent-wash);
  color: var(--ink-soft);
  font-style: italic;
}

/* ------------------------------------------------------------ site chrome */

/* Centred, like the title page it is imitating. The double rule underneath is
   the one flourish this design allows itself. */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 1rem;
  margin-bottom: calc(var(--gap) * 1.2);
  border-bottom: 3px double var(--rule);
  text-align: center;
}
.site-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
/* The tap target lives on the link, not on the nav, so what you aim at is the
   word itself. Padding is part of the target: it buys width on short words like
   NOTES, and it holds the targets apart. Wrapping to a second row is allowed
   before the type is allowed to shrink — see the phones block. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.4rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.site-nav a { display: flex; align-items: center; min-height: 44px; }
.site-nav a, .site-name a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover, .site-name a:hover { color: var(--accent); }
.site-name a { color: inherit; }

/* ------------------------------------------------------------- home page */

.intro { display: block; }
.intro-text > p:last-child { margin-bottom: 0; }
/* A plate pasted into a book, not an avatar: paper showing through a 5px margin,
   a hairline frame, a second rule outside it answering the masthead's double
   rule, and enough sepia to read as printed rather than uploaded. Floated right
   beside the lede so the prose wraps around it like a frontispiece plate; the
   masthead above is centred, so a right float balances the left-ragged text. */
.portrait {
  float: right;
  width: 96px;
  margin: 0.25rem 0 1rem 1rem;
  padding: 5px;
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 3px;
  filter: sepia(0.26) saturate(0.88) contrast(1.03);
}
@media (prefers-color-scheme: dark) {
  .portrait { filter: sepia(0.24) saturate(0.8) brightness(0.9); }
}
.lede { margin: 0 0 1.2rem; }

/* The availability note keeps its voice down: a ruled aside, a small label, and
   the rate set in ink so the one number on the page is the one you look for. */
.availability {
  clear: both;
  margin: 0;
  padding: 0.95rem 1.15rem;
  background: var(--wash);
  border-left: 3px solid var(--accent);
  font-size: 1.0625rem;
  color: var(--ink-soft);
}
.availability-label {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.nowrap { white-space: nowrap; }
.rate { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.stream { margin-top: calc(var(--gap) * 1.2); }
.eyebrow {
  margin: 0 0 0.9rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.section-note { margin: 0 0 1rem; color: var(--ink-soft); font-style: italic; }
.more { margin: 1rem 0 0; font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.04em; }

/* ------------------------------------------------------------ entry lists */

.meta {
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.meta a { text-decoration: none; }
.meta a:hover { text-decoration: underline; }

.entries { list-style: none; padding: 0; margin: 0; }
.entries li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  align-items: baseline;
  gap: 0.15rem 1rem;
  padding: 0.5rem 0;
}
.entries li + li { border-top: 1px solid var(--rule); }
.entries a { text-decoration-color: transparent; }
.entries a:hover { text-decoration-color: var(--accent); }

@media (max-width: 34rem) {
  .entries li { grid-template-columns: 1fr; }
}

.notes { list-style: none; padding: 0; margin: 0; }
.note { margin-bottom: 2.1rem; padding-top: 1.8rem; border-top: 1px solid var(--rule); }
.note > :last-child { margin-bottom: 0; }
.notes .note:first-child { border-top: 0; padding-top: 0; }

/* Bookmarks: an index, not a feed. The title in the body face, where it came
   from in the small print beside it, and the commentary set quieter beneath. */
.bookmarks { list-style: none; padding: 0; margin: 0; }
.bookmarks li { margin: 0 0 1.3rem; }
/* Flex rather than inline, so a host that wraps under a long title starts flush left. */
.bookmark-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.6rem; }
.bookmarks .host {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.bookmarks .e-content { margin-top: 0.1rem; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); }
.bookmarks .e-content p { margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; padding: 0; }

/* ---------------------------------------------------------------- entries */

.entry-header {
  margin-bottom: calc(var(--gap) * 0.85);
  text-align: center;
}
.entry-title { margin-top: 0; }
.entry-meta { margin: 0.6rem 0 0; }
.page-title { margin-top: 0; }

.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: calc(var(--gap) * 1.05); }
.prose h3 { margin-top: calc(var(--gap) * 0.75); }
.prose li { margin-bottom: 0.4rem; }

/* An initial, not a gimmick: only on long-form pages, and only on the first
   paragraph of the body. */
.post .prose > p:first-of-type::first-letter {
  float: left;
  font-size: 3.1em;
  line-height: 0.84;
  padding: 0.06em 0.08em 0 0;
  color: var(--accent);
}

/* ----------------------------------------------------------------- photos */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--wash);
  border: 1px solid var(--rule);
}
.photo-grid a { display: block; text-decoration: none; }
.photo-grid a:hover img { border-color: var(--accent); }

.photo-stream { display: block; columns: 2; column-gap: 0.7rem; }
.photo-stream li { break-inside: avoid; margin: 0 0 0.7rem; }
.photo-stream img { aspect-ratio: auto; }

@media (max-width: 30rem) {
  .photo-stream { columns: 1; }
}

/* ------------------------------------------------------------------ resume */

.work-history { list-style: none; padding: 0; }
.work-history-item { margin-bottom: 1.4rem; }
.work-history-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; }
.work-history-employer { font-weight: 600; }
.work-history-years { font-family: var(--sans); color: var(--ink-soft); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.work-history-desc { margin: 0.15rem 0 0; color: var(--ink-soft); }

dt { margin-top: 1rem; font-weight: 600; }
dd { margin: 0.15rem 0 0; color: var(--ink-soft); }

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: 4.5rem;
  padding-top: 1.3rem;
  border-top: 3px double var(--rule);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-align: center;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin-bottom: 0.6rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.imprint { margin: 0.9rem 0 0; font-style: italic; letter-spacing: 0.02em; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------------------------ phones */

/* Thumbs, not cursors. 30rem catches every phone in portrait (390–430pt) with
   room to spare. The nav gets *bigger* here rather than smaller: 14px type, a
   48px-tall target, and 11px of padding on each side of the word, so the target
   is the word plus a margin of error. 12px of column gap between those padded
   boxes leaves ~34px between one word and the next — well past the 24px
   clearance WCAG 2.2 SC 2.5.8 asks of adjacent targets, and past the 44pt
   minimum in Apple's HIG (*unverified (Apple HIG)* — the guideline page would
   not render for citation; the WCAG number is verified). Five words no longer
   fit on one line at this size, and that is the trade: two comfortable rows
   beat one row nobody can hit. */
@media (max-width: 30rem) {
  .site-nav {
    flex-direction: column;   /* stack instead of wrap */
    flex-wrap: nowrap;
    align-items: center;      /* stays centered under the masthead */
    gap: 0;
    font-size: 0.9375rem;     /* room to breathe now that width is free */
    letter-spacing: 0.08em;
  }
  .site-nav a {
    min-height: 48px;
    padding: 0 0.7rem;
    width: 100%;
    justify-content: center;  /* .site-nav a is already display:flex */
  }
}

/* 27rem covers every current iPhone in portrait (390–430pt). The float stays,
   shrunk so the runaround column doesn't get too narrow to read comfortably. */
@media (max-width: 27rem) {
  body { padding-left: 1.15rem; padding-right: 1.15rem; }
  .portrait { width: 84px; margin: 0.2rem 0 0.85rem 0.85rem; }
  .site-footer nav a { display: flex; align-items: center; min-height: 40px; }
  .site-footer nav { gap: 0 1rem; }
}

/* ------------------------------------------------------------------- print */

@media print {
  :root { --ink: #000; --ink-soft: #444; --paper: #fff; --wash: #fff; --rule: #bbb; --accent: #000; --accent-wash: #ccc; }
  body { max-width: none; padding: 0; font-size: 11pt; }
  .site-header { border-bottom: 1px solid #bbb; }
  .site-nav, .site-footer nav, .photo-grid, .portrait, .skip-link { display: none; }
  a { text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; word-break: break-all; }
  pre, blockquote, img, .work-history-item, .note { break-inside: avoid; }
}
