/* Personal author site. Colours per site come from :root in the page head
   (--accent, --accent-ink, --accent-soft, --tint); everything else is shared. */
:root {
  --ink: #1b1d22;
  --ink-2: #4a4f5a;
  --ink-3: #6b717d;
  --line: #e3e1dc;
  --paper: #fbfaf7;
  --card: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --wrap: 1120px;
  --narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: calc(var(--narrow) + 40px); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark, .author-mark, .byline-mark, .profile-mark {
  display: inline-grid; place-items: center; flex: none;
  background: var(--accent); color: #fff; font-family: var(--serif); font-weight: 600; border-radius: 50%;
}
.brand-mark { width: 42px; height: 42px; font-size: 1rem; letter-spacing: .02em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.brand-role { font-size: .8rem; color: var(--ink-3); letter-spacing: .02em; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.nav a:hover { background: var(--tint); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--tint); font-weight: 600; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--tint), var(--paper)); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent-ink); margin: 0 0 .6rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero-lede { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; margin: 0 0 1.6rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.hero-mark { justify-self: center; }
.hero-mark span, .hero-mark img {
  width: min(300px, 60vw); aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), var(--accent));
  color: #fff; font-family: var(--serif); font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 600;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.35), inset 0 0 0 10px rgba(255,255,255,.12);
}

.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; border: 2px solid var(--accent); }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent-ink); }
.btn-ghost:hover { background: var(--tint); color: var(--accent-ink); border-color: var(--accent); }

/* Sections */
.topics, .latest { padding-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin-top: 0; }
.topic-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-list li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .95rem; color: var(--ink-2); }
.about-teaser { margin-top: 72px; padding: 56px 0; background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-teaser h2 { margin-top: 0; }

/* Cards */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -20px rgba(0,0,0,.25); }
.card-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px 24px; }
.card-meta { margin: 0 0 .4rem; font-size: .82rem; color: var(--ink-3); }
.card-title { margin: 0 0 .5rem; font-size: 1.22rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent-ink); text-decoration: underline; }
.card-text { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* Pages */
.page { padding-top: 40px; padding-bottom: 72px; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 1.4rem; }
.crumbs a { color: var(--ink-3); }
.lede { font-size: 1.2rem; color: var(--ink-2); margin: 0 0 2rem; }
.hub .grid { margin-top: 8px; }
.contact-email { font-size: 1.3rem; font-family: var(--serif); }

.profile-head { display: flex; align-items: center; gap: 24px; margin-bottom: 2rem; flex-wrap: wrap; }
.profile-mark { width: 120px; height: 120px; font-size: 2.6rem; }
.profile-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
.profile-head h1 { margin: 0; }
.profile-role { margin: .3rem 0 0; color: var(--accent-ink); font-weight: 600; }

/* Articles */
.article-head { padding-top: 40px; }
.article-head .lede { margin-bottom: 1.4rem; }
.byline { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: .92rem; line-height: 1.5; margin: 0 0 2rem; }
.byline a { font-weight: 600; }
.byline-mark { width: 44px; height: 44px; font-size: .95rem; }
.article-hero { margin: 0 auto 2.4rem; max-width: 1000px; }
.article-hero img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.prose { font-size: 1.08rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose h2 { padding-top: .4rem; }
.prose img { border-radius: 10px; margin: 1.6rem 0; }
.prose blockquote { margin: 1.6rem 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--tint); font-weight: 600; }
.prose code { background: var(--tint); padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }

.author-box { display: flex; gap: 20px; align-items: flex-start; margin: 3rem 0 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.author-mark { width: 72px; height: 72px; font-size: 1.5rem; }
.author-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: none; }
.author-box p { margin: 0 0 .5rem; color: var(--ink-2); font-size: .97rem; }
.author-box-label { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem !important; color: var(--ink-3) !important; }
.author-box-name { font-family: var(--serif); font-size: 1.2rem !important; color: var(--ink) !important; }
.author-box-name a { color: var(--ink); text-decoration: none; font-weight: 600; }
.author-box-name span { color: var(--ink-3); font-size: 1rem; }
.author-box-links { font-size: .9rem !important; }
.more { padding-top: 56px; padding-bottom: 24px; }

.notfound { text-align: left; }

/* Footer */
.site-footer { margin-top: 72px; background: #15171b; color: #c9ccd3; font-size: .95rem; }
.site-footer a { color: #e7e9ee; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 32px; }
.footer-name { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin: 0 0 .5rem; }
.footer-about p { margin-top: 0; max-width: 34em; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; justify-items: start; }
.footer-notice { padding-bottom: 20px; font-size: .85rem; color: #aeb3bc; }
.footer-notice p { margin: 0; max-width: 60em; padding: 14px 16px; border: 1px solid #2a2d33; border-radius: 10px; }
.footer-base { border-top: 1px solid #2a2d33; padding-top: 18px; padding-bottom: 28px; font-size: .85rem; color: #8d929c; }
.footer-base p { margin: 0; }
.type-home .site-footer, .type-hub .site-footer { margin-top: 72px; }
.about-teaser + * { margin-top: 0; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; padding-bottom: 44px; }
  .hero-mark { justify-self: start; order: -1; }
  .hero-mark span, .hero-mark img { width: 120px; font-size: 2.8rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .header-inner { min-height: 0; }
  .nav a { padding: 6px 10px; }
  .author-box { flex-direction: column; }
  .prose { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}
