/* drewdickens.com design tokens. Fonts are self-hosted (SIL Open Font License). */
@font-face{font-family:"Newsreader";src:url(/assets/fonts/newsreader-latin-300-normal.woff2) format("woff2");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Newsreader";src:url(/assets/fonts/newsreader-latin-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Newsreader";src:url(/assets/fonts/newsreader-latin-500-normal.woff2) format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Newsreader";src:url(/assets/fonts/newsreader-latin-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible";src:url(/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible";src:url(/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root {
  --paper: #F5F6FA;
  --paper-2: #ECEFF6;
  --ink: #1A2036;
  --slate: #515A72;
  --accent: #3B4C86;      /* deep periwinkle: links, marks */
  --accent-soft: #8A9EC8; /* brand heritage periwinkle */
  --rule: #CBD2E2;
  --focus: #3B4C86;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 66ch;
  --wide: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121629; --paper-2: #1A1F36; --ink: #E7EAF3; --slate: #A5ADC3;
    --accent: #AFBDE6; --accent-soft: #8A9EC8; --rule: #2E3553; --focus: #AFBDE6;
  }
}
:root[data-theme="dark"] {
  --paper: #121629; --paper-2: #1A1F36; --ink: #E7EAF3; --slate: #A5ADC3;
  --accent: #AFBDE6; --accent-soft: #8A9EC8; --rule: #2E3553; --focus: #AFBDE6;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.1875rem; line-height: 1.62;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; font-family: var(--sans); z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--slate); font-weight: 400; }
.nav { font-family: var(--sans); font-size: .95rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.nav a { color: var(--slate); text-decoration: none; padding: .2rem 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent-soft); }

/* Type scale (1.25 ratio) */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin-top: 3.2rem; margin-bottom: .9rem; }
h3 { font-size: 1.35rem; margin-top: 2rem; margin-bottom: .5rem; font-weight: 500; }
p { margin: 0 0 1.1rem; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.lede { font-size: 1.35rem; line-height: 1.5; color: var(--slate); max-width: 60ch; }
.small, .meta { font-family: var(--sans); font-size: .9rem; color: var(--slate); line-height: 1.5; }

main { padding-bottom: 5rem; }
.page-head { padding: clamp(3rem, 8vw, 5.5rem) 0 2rem; }
.page-head h1 { max-width: 22ch; }
.page-head .lede { margin-top: 1.2rem; }

/* Home hero: the positioning sentence is the design */
.hero { padding: clamp(3.5rem, 10vw, 7.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero .name { font-family: var(--sans); font-size: 1rem; color: var(--slate); margin: 0 0 1.4rem; }
.hero .name strong { color: var(--ink); font-weight: 700; }
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 4.1rem); font-weight: 300; line-height: 1.12; max-width: 24ch;
  letter-spacing: -0.02em;
}
.hero h1 .field { font-style: italic; font-weight: 300; }
.creds {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0; margin: 3rem 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--rule);
}
.creds li { padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: .95rem; line-height: 1.4; }
.creds li b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: var(--ink); margin-bottom: .15rem; }
.creds li span { color: var(--slate); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn { font-family: var(--sans); font-size: 1rem; display: inline-block; padding: .7rem 1.2rem; border-radius: 3px; text-decoration: none; border: 1px solid var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--paper-2); color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* Two-column section: heading left, content right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1rem 3.5rem; padding: 3rem 0; border-top: 1px solid var(--rule); }
.split > h2 { margin: 0; font-size: 1.5rem; }
.split > h2 small { display: block; font-family: var(--sans); font-size: .9rem; color: var(--slate); font-weight: 400; margin-top: .5rem; letter-spacing: 0; line-height: 1.4; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 2.2rem 0; } }

/* Lists of entries (essays, appearances, topics) */
.entries, .prose ul.entries { list-style: none; margin: 0; padding: 0; }
.hero + .split { border-top: 0; }
.cite { overflow-wrap: anywhere; }
.entries li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.entries li:first-child { padding-top: 0; }
.entries h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.entries h3 a { color: var(--ink); text-decoration: none; }
.entries h3 a:hover { color: var(--accent); text-decoration: underline; }
.entries p { margin: .2rem 0 0; font-size: 1.05rem; color: var(--slate); }
.entries .meta { margin-top: .35rem; }

/* Hub: table of contents + sections */
.hub { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3.5rem; }
.toc { position: sticky; top: 1.5rem; align-self: start; font-family: var(--sans); font-size: .92rem; }
.toc p { font-weight: 700; margin-bottom: .6rem; }
.toc ol { margin: 0; padding-left: 1.3rem; color: var(--slate); }
.toc li { margin-bottom: .4rem; }
.toc a { color: var(--slate); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 900px) { .hub { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .toc { position: static; border: 1px solid var(--rule); padding: 1rem 1.2rem; border-radius: 3px; } }
.hub section { scroll-margin-top: 1.5rem; }
.hub section h2 { margin-top: 3rem; }
.hub section:first-child h2 { margin-top: 0; }
.answer { font-size: 1.28rem; line-height: 1.5; border-left: 3px solid var(--accent-soft); padding-left: 1.1rem; margin: 0 0 1.3rem; }
.go-deeper { font-family: var(--sans); font-size: .95rem; background: var(--paper-2); padding: .9rem 1.1rem; border-radius: 3px; margin-top: 1.2rem; }
.go-deeper ul { margin: .35rem 0 0; padding-left: 1.1rem; }

/* Citation blocks */
.cite { font-family: var(--sans); font-size: .95rem; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; padding: 1rem 1.2rem; overflow-x: auto; }
pre.cite { white-space: pre; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; font-family: var(--sans); font-size: .98rem; margin: 0; }
dl.facts dt { color: var(--slate); }
dl.facts dd { margin: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: .7rem; } }

/* Forms */
form.contact { max-width: 38rem; font-family: var(--sans); }
form.contact label { display: block; font-size: .95rem; margin: 1.1rem 0 .35rem; }
form.contact input, form.contact select, form.contact textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .65rem .75rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink);
}
form.contact textarea { min-height: 9rem; }
form.contact button { margin-top: 1.4rem; cursor: pointer; }
.hidden { position: absolute; left: -9999px; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; font-family: var(--sans); font-size: .92rem; color: var(--slate); }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-foot p { margin-bottom: .6rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .35rem; }
.site-foot a { color: var(--slate); }
.site-foot a:hover { color: var(--ink); }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .cols > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .name { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero h1 { animation-delay: .08s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media print { .site-head, .site-foot, .toc { display: none; } body { background: #fff; color: #000; } }
@media (max-width: 600px) { .hero h1 { font-weight: 400; } }

/* Portrait */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 3.5rem; align-items: end; }
.portrait { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; background: var(--paper-2); }
.split .portrait { max-width: 220px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero-grid .portrait { order: -1; width: 132px; aspect-ratio: 1; object-position: 50% 18%; border-radius: 50%; }
  .split .portrait { max-width: 160px; }
}

/* Hero v2: name as headline, positioning sentence as italic statement */
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 400; max-width: none; }
.hero .statement {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.45; color: var(--slate);
  max-width: 34em; margin: 1.4rem 0 0; padding-left: 1.2rem; border-left: 3px solid var(--accent-soft);
}
@media (prefers-reduced-motion: no-preference) { .hero .statement { animation: rise .9s cubic-bezier(.2,.7,.2,1) .16s both; } }
@media (max-width: 600px) { .hero h1 { font-weight: 400; } .hero .statement { font-weight: 400; } }

/* As heard on */
.heard { padding: 0 0 0.4rem; margin-top: -1rem; font-family: var(--sans); font-size: 1rem; color: var(--slate); }
.heard p { margin: 0; max-width: 80ch; line-height: 1.6; }
.heard span { color: var(--ink); font-weight: 700; margin-right: .35rem; }
.heard a { margin-left: .35rem; white-space: nowrap; }
.heard + .split { border-top: 0; }
