/* Buddy Williams — cosmic personal brand.
   Dark "night sky" marketing surface; light "paper" essay reader. */

:root {
  --night: #070f24;
  --night-2: #0b1733;
  --panel: #0f1d3d;
  --panel-2: #13244a;
  --line: rgba(150, 180, 230, 0.16);
  --line-strong: rgba(150, 180, 230, 0.32);

  --text: #eaf1ff;
  --muted: #a3b6da;
  --star: #cfe0ff;

  --blue: #4f8ff7;
  --blue-deep: #2a5a9e;
  --amber: #f6b46e;
  --amber-2: #f0a157;

  /* light reader */
  --paper: #f6f8fc;
  --surface: #ffffff;
  --ink: #0d1730;
  --ink-muted: #46557a;
  --paper-line: #e1e8f3;

  --maxw: 1180px;
  --radius: 14px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --shadow: 0 24px 60px rgba(2, 8, 23, 0.45);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(7, 15, 36, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--amber) 55%, rgba(240, 161, 87, 0) 78%);
  box-shadow: 0 0 14px rgba(246, 180, 110, 0.7);
}
.brand-name {
  font-size: 1.02rem;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}
.nav-cta {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--night) !important;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  font-weight: 800 !important;
  box-shadow: 0 6px 20px rgba(246, 180, 110, 0.32);
}
.nav-cta:hover {
  filter: brightness(1.05);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}
.button:hover {
  transform: translateY(-1px);
}
.button.primary {
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: var(--night);
  box-shadow: 0 10px 30px rgba(246, 180, 110, 0.3);
}
.button.primary:hover {
  filter: brightness(1.06);
}
.button.ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--text);
}
.button.ghost:hover {
  background: rgba(255, 255, 255, 0.09);
}
.button.small {
  padding: 10px 16px;
  font-size: 0.9rem;
}
.button.large {
  padding: 16px 30px;
  font-size: 1.05rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 9vw, 120px) clamp(18px, 4vw, 48px) clamp(48px, 7vw, 96px);
  background:
    linear-gradient(
      100deg,
      rgba(5, 10, 28, 0.94) 0%,
      rgba(6, 12, 32, 0.78) 42%,
      rgba(7, 15, 38, 0.4) 100%
    ),
    url("/static/img/background.png") center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  /* deepen the bottom so the proof bar blends in */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to bottom, rgba(7, 15, 36, 0), var(--night));
  z-index: -1;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--amber);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  max-width: 16ch;
}
.hero-lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.hero-note {
  margin-top: 26px;
  color: var(--star);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  opacity: 0.85;
}
.hero-portrait {
  justify-self: center;
}
.hero-portrait img {
  width: clamp(220px, 26vw, 340px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(207, 224, 255, 0.35);
  box-shadow: 0 0 0 8px rgba(79, 143, 247, 0.08), 0 30px 70px rgba(2, 8, 23, 0.6);
}

/* ---------- Proof bar ---------- */
.proof {
  margin-top: clamp(32px, 5vw, 60px);
  padding: 0 clamp(18px, 4vw, 48px) clamp(40px, 6vw, 72px);
}
.proof-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.proof-item {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--night-2));
}
.proof-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1;
}
.proof-label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) clamp(18px, 4vw, 48px);
}
.section-head {
  max-width: 64ch;
  margin-bottom: 40px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--muted);
  font-size: 1.08rem;
}
.section-foot {
  margin-top: 36px;
}

/* ---------- Refine showcase ---------- */
.showcase-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.showcase-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.showcase-points li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: 1.05rem;
}
.showcase-points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--amber) 60%, rgba(240, 161, 87, 0));
  box-shadow: 0 0 10px rgba(246, 180, 110, 0.6);
}
.showcase-points li.showcase-link {
  padding-left: 0;
  margin-top: 8px;
}
.showcase-points li.showcase-link::before {
  display: none;
}
/* Sliding gallery (Refine screenshots) */
.gallery-viewport {
  position: relative;
}
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.gallery-track::-webkit-scrollbar {
  display: none;
}
.gallery-slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
}
.gallery-slide img {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
}
.gallery-slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 16px 12px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(to top, rgba(6, 12, 30, 0.92), rgba(6, 12, 30, 0));
  color: var(--star);
  font-size: 0.9rem;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(7, 15, 36, 0.72);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, opacity 0.15s ease;
  z-index: 2;
}
.gallery-nav:hover {
  background: rgba(7, 15, 36, 0.95);
}
.gallery-nav.prev {
  left: 12px;
}
.gallery-nav.next {
  right: 12px;
}
.gallery-nav:disabled {
  opacity: 0.25;
  cursor: default;
}
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(163, 182, 218, 0.4);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.gallery-dot[aria-current="true"] {
  width: 22px;
  background: var(--amber);
}

/* ---------- Cards / writing ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.essay-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--night-2));
  text-decoration: none;
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.essay-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
.essay-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.15;
}
.essay-card p {
  color: var(--muted);
  font-size: 0.98rem;
}
.card-more {
  color: var(--amber);
  font-weight: 700;
  font-size: 0.92rem;
}

.badge {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.badge-working {
  color: #8ce0c0;
  border-color: rgba(140, 224, 192, 0.4);
  background: rgba(140, 224, 192, 0.08);
}
.badge-final {
  color: var(--amber);
  border-color: rgba(246, 180, 110, 0.4);
  background: rgba(246, 180, 110, 0.08);
}
.badge-draft {
  color: var(--star);
}

/* ---------- Consulting band ---------- */
.consulting-band {
  max-width: none;
  padding-inline: clamp(18px, 4vw, 48px);
}
.consulting-card {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(79, 143, 247, 0.16), transparent 55%),
    linear-gradient(180deg, var(--panel-2), var(--night-2));
}
.consulting-head {
  max-width: 60ch;
  margin-bottom: 36px;
}
.consulting-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.06;
  margin-bottom: 16px;
}
.covers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.cover {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.cover h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.cover p {
  color: var(--muted);
  font-size: 0.96rem;
}
.consulting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.consulting-note {
  margin-top: 22px;
  color: var(--star);
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 70ch;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.project {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--night-2));
}
.project-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.project-top h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
}
.project-top a {
  text-decoration: none;
}
.project-top a:hover {
  color: var(--amber);
}
.project-period {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.project p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
}
.final-cta h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 12px;
}
.final-cta p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--night-2);
  padding: clamp(32px, 5vw, 56px) clamp(18px, 4vw, 48px) 36px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-name {
  font-weight: 800;
}
.footer-tag {
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--text);
}
.footer-fine {
  max-width: var(--maxw);
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------- Generic page shell (dark) ---------- */
.page-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(18px, 4vw, 48px) clamp(56px, 8vw, 100px);
}
.page-head {
  max-width: 70ch;
  margin-bottom: 44px;
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.page-sub {
  color: var(--muted);
  font-size: 1.1rem;
}

/* writings index */
.writing-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.writing-row {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--night-2));
  text-decoration: none;
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.writing-row:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}
.writing-row-main {
  min-width: 0;
}
.writing-row-main h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 10px 0 8px;
}
.writing-row-main p {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 75ch;
}
.writing-row-meta {
  text-align: right;
  white-space: nowrap;
  display: grid;
  gap: 8px;
}
.writing-row-meta span:first-child {
  color: var(--muted);
  font-size: 0.85rem;
}

/* consulting page */
.consult-section {
  max-width: var(--maxw);
  margin: 0 auto clamp(40px, 6vw, 72px);
}
.consult-section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 24px;
}
.steps {
  display: grid;
  gap: 16px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 1.05rem;
}
.steps strong {
  color: var(--text);
}
.scheduler-embed {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(79, 143, 247, 0.16), transparent 55%),
    linear-gradient(180deg, var(--panel-2), var(--night-2));
}
.cal-inline {
  width: 100%;
  min-height: 640px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
}
.scheduler-embed h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 12px;
}
.scheduler-embed .button {
  margin-top: 24px;
}
.scheduler-fallback {
  margin-top: 22px;
  color: var(--muted);
}
.scheduler-fallback a {
  color: var(--amber);
}

.notfound {
  text-align: center;
}
.notfound .hero-actions {
  justify-content: center;
}

/* ---------- Essay reader (light) ---------- */
.reader-body {
  background: var(--paper);
}
.reader-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 72px) clamp(18px, 4vw, 48px) clamp(56px, 8vw, 96px);
}
.reader {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: 18px;
  padding: clamp(26px, 4vw, 56px);
  box-shadow: 0 20px 50px rgba(13, 23, 48, 0.08);
  color: var(--ink);
}
.reader-back {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--blue-deep);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.reader h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 14px 0 16px;
}
.reader .badge {
  border-color: var(--paper-line);
  color: var(--ink-muted);
}
.reader .badge-working {
  color: #1d8a64;
  background: rgba(29, 138, 100, 0.08);
  border-color: rgba(29, 138, 100, 0.3);
}
.reader-blurb {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-bottom: 28px;
}
.reader-toc {
  padding: 18px 20px;
  margin-bottom: 32px;
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  background: var(--paper);
}
.toc-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: 10px;
}
.reader-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.reader-toc a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.94rem;
}
.reader-toc a:hover {
  color: var(--blue-deep);
}
.reader-toc .toc-l3 {
  padding-left: 16px;
  font-size: 0.88rem;
}

/* markdown body */
.markdown {
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.72;
  color: #1c2742;
}
.markdown > *:first-child {
  margin-top: 0;
}
.markdown h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--ink);
  margin: 2em 0 0.5em;
  scroll-margin-top: 90px;
}
.markdown h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.42rem;
  color: var(--ink);
  margin: 1.6em 0 0.4em;
  scroll-margin-top: 90px;
}
.markdown h4 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
  margin: 1.4em 0 0.4em;
}
.markdown p,
.markdown li {
  margin: 0 0 1.1em;
}
.markdown a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.markdown ul,
.markdown ol {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}
.markdown blockquote {
  margin: 1.6em 0;
  padding: 0.4em 1.2em;
  border-left: 3px solid var(--amber-2);
  color: var(--ink-muted);
  font-style: italic;
}
.markdown code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: #eef2fb;
  padding: 0.12em 0.36em;
  border-radius: 5px;
  color: #1d2c52;
}
.markdown pre {
  overflow-x: auto;
  background: #0c162e;
  color: #e8eefc;
  padding: 18px 20px;
  border-radius: 12px;
  margin: 1.6em 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.markdown pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.markdown img {
  border-radius: 12px;
  margin: 1.6em auto;
  border: 1px solid var(--paper-line);
}
.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-family: var(--sans);
  font-size: 0.96rem;
}
.markdown th,
.markdown td {
  border: 1px solid var(--paper-line);
  padding: 10px 14px;
  text-align: left;
}
.markdown th {
  background: var(--paper);
}
.markdown hr {
  border: none;
  border-top: 1px solid var(--paper-line);
  margin: 2.4em 0;
}

.reader-pager {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-line);
}
.pager-link {
  display: grid;
  gap: 4px;
  max-width: 46%;
  text-decoration: none;
  color: var(--ink);
}
.pager-link span {
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pager-link strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.2;
}
.pager-next {
  text-align: right;
}

.reader-book {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 44px;
  padding: 24px 28px;
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  background: linear-gradient(120deg, #eef3fc, var(--surface));
}
.reader-book p {
  margin: 0;
  max-width: 46ch;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-portrait {
    order: -1;
    justify-self: start;
  }
  .hero-portrait img {
    width: 160px;
  }
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .showcase-body,
  .card-grid,
  .covers-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }
  .proof-grid {
    grid-template-columns: 1fr;
  }
  .writing-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .writing-row-meta {
    text-align: left;
  }
  .reader-pager {
    flex-direction: column;
  }
  .pager-link,
  .pager-next {
    max-width: 100%;
    text-align: left;
  }
}
