/* Nicholas Packwood — layout draft v10 (local mockup, 29 Nov 2026)
   Palatino-style serif: self-hosted TeX Gyre Pagella (GUST Font License).
   Running text +1pt vs the 20px Georgia body; one-line name on tablet/desktop too. */

@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/texgyrepagella-regular.woff2") format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/texgyrepagella-italic.woff2") format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/texgyrepagella-bold.woff2") format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/texgyrepagella-bolditalic.woff2") format("woff2");
}


:root {
  --bg: #f7f4ef;
  --ink: #1a1814;
  --muted: #3d3a34;   /* still well above 7:1 on --bg */
  --cream: #f7f4ef;
  --navy: #1f232b;
  --mat: #14171c;
  --gold: #b08a4a;           /* signature accent: rules, ornaments, brackets */
  --gold-ink: #8a6428;       /* text links on cream, 4.8:1 on --bg */
  --gold-ink-hover: #6e4e1c; /* 6.9:1 on --bg */
  --tagline: #cfc6b8;
  --on-navy: #e8e3d9;
  --hairline: rgba(26, 24, 20, 0.28);
  --page: 40rem;
  --nav-h: 4.75rem;
  --serif: "TeX Gyre Pagella", "Palatino Linotype", Palatino, "Book Antiqua", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 125%; /* 20px when the browser default is 16px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -6rem;
  background: var(--cream); color: var(--navy);
  padding: 0.4rem 0.8rem; z-index: 100;
}
.skip-link:focus { top: 1rem; }

cite { font-style: italic; }

/* ---------- Dark top band ---------- */

.top-band {
  background: var(--navy);
  color: var(--cream);
  overflow: visible;
}

.top-band a { color: var(--cream); }
.top-band :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Site navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid var(--gold);
}

.site-nav-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.7rem 1.75rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 1rem;
  color: var(--cream);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold);
  text-decoration: none;
}

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: 3.5rem 1.75rem 3.25rem;
}

.page-hero {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

/* ---------- Header / hero ---------- */

.masthead {
  display: grid;
  gap: 2rem;
  align-items: start;
  margin-bottom: 0;
}

.portrait {
  margin: 0;
  width: 100%;
  max-width: 17rem;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--mat);
  padding: 0.6rem;
  border: 1px solid var(--gold);
}
.portrait-media, .portrait-still {
  width: 100%; height: 100%;
  object-fit: cover;
}
.portrait-still { display: none; }

@media (prefers-reduced-motion: reduce) {
  .portrait-media { display: none; }
  .portrait-still { display: block; }
  html { scroll-behavior: auto; }
}

.masthead h1 {
  margin: 0;
  font-size: 3.35rem;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.masthead h1 .family-name { display: block; }

.masthead h1::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  background: var(--gold);
  margin: 0.9rem 0 0;
}

.tagline {
  margin: 1.15rem 0 1rem;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--tagline);
}

.positioning {
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--on-navy);
}

.links ul {
  display: flex; flex-wrap: wrap;
  gap: 0.7rem 0.75rem;
  list-style: none; margin: 0; padding: 0;
}

.pill {
  display: inline-block;
  padding: 0.45rem 1.15rem;
  border: 1px solid rgba(247, 244, 239, 0.38);
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  background: transparent;
  color: var(--cream);
}
.pill::before {
  content: "[";
  color: var(--gold);
  margin-right: 0.45em;
}
.pill::after {
  content: "]";
  color: var(--gold);
  margin-left: 0.45em;
}
.pill:hover,
.pill:focus-visible {
  border-color: var(--gold);
  background: rgba(176, 138, 74, 0.14);
  color: var(--cream);
  text-decoration: none;
}

/* Two-column hero from tablet up. Rem in media queries uses the
   browser's initial 16px, so 48rem was 768px — iPad portrait. Keep
   the columns top-aligned so a taller text column cannot sit above
   the photo (align-items: end caused that). */
@media (min-width: 700px) {
  :root { --page: 46rem; }
  .masthead {
    grid-template-columns: 15rem 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .masthead-text { min-width: 0; }
  .masthead h1 {
    /* One line; size tracks the text column (280px at 700, 500px from 920 up). */
    font-size: clamp(1.65rem, calc(11.75vw - 49.4px), 2.95rem);
    white-space: nowrap;
    letter-spacing: -0.02em;
  }
  .masthead h1 .family-name { display: inline; }
  .masthead-text .pill { max-width: 100%; overflow-wrap: anywhere; }
  .portrait { max-width: none; }
  .page-hero { padding-bottom: 2.25rem; }
  .feature-panel {
    margin-left: -1.4rem;
    padding-left: 1.4rem;
  }
}

/* Slight photo hang into the cream, desktop only, still top-aligned. */
@media (min-width: 1100px) {
  .portrait { margin-bottom: -2rem; }
  .page-hero { padding-bottom: 0; }
  .masthead-text { padding-bottom: 0.35rem; }
  .page-body { padding-top: 4.5rem; } /* clears the hang, then some air */
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  margin: 0;
  padding: 3.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--gold);
}

.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.85rem;
  height: 3px;
  background: var(--gold);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 8px var(--bg);
}

.section-first { padding-top: 0; }

.section h2 {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section h2::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  background: var(--gold);
  margin-top: 0.7rem;
}

.section p { margin: 0 0 1.25rem; max-width: 36rem; font-size: calc(1rem + 1pt); }

.section-feature {
  padding: 3.5rem 0;
  border: none;
  border-top: 1px solid var(--gold);
  background: none;
}

.feature-panel {
  padding: 0.1rem 0 0.1rem 1.25rem;
  border-left: 3px solid var(--gold);
}
.feature-panel p:last-child { margin-bottom: 0; }

/* ---------- Selected writing ---------- */

.writing-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.writing-item {
  margin: 0;
  padding: 0 0 2.25rem;
  border-bottom: 1px solid rgba(176, 138, 74, 0.35);
}
.writing-item + .writing-item { margin-top: 2.25rem; }
.writing-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.writing-meta {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-variant: small-caps;
  line-height: 1.45;
}
.writing-meta cite { font-style: normal; }

.writing-title {
  margin: 0 0 0.55rem;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.writing-teaser { margin: 0 0 0.9rem; font-size: calc(1rem + 1pt); }

.writing-meta,
.writing-title,
.writing-teaser,
.writing-action {
  max-width: none;
}

.writing-action { margin: 0; }

.writing-cta {
  font-size: calc(1rem + 1pt);
  color: var(--gold-ink);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.writing-cta::after { content: " \2192"; }
.writing-cta:hover,
.writing-cta:focus-visible {
  color: var(--gold-ink-hover);
  text-decoration-thickness: 2px;
}

/* ---------- Also published ---------- */

.pubs { margin: 0; padding: 0; list-style: none; }
.pubs li {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
  text-indent: -1.25rem;
  line-height: 1.6;
  font-size: calc(1rem + 1pt);
}
.pubs li:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 2.5rem 1.75rem 2.25rem;
  margin: 0;
  border-top: 1px solid var(--gold);
}
.site-footer :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
}
.site-footer .links { margin: 0 0 1.15rem; }
.site-footer p { margin: 0; }
.site-footer small {
  font-size: 0.95rem;
  color: var(--tagline);
}

/* Phones (under the 700px two-column breakpoint).
   Portrait rules are unchanged from v5 (width 100%, max-width 17rem,
   padding 0.6rem). Only type is adjusted: one-line nav and one-line name. */
@media (max-width: 699px) {
  :root { --nav-h: 2.85rem; }

  .site-nav-inner { padding: 0.35rem 0.5rem; }
  .site-nav ul {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.15rem 0.35rem;
  }
  .site-nav a {
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
  }

  .page { padding: 2.75rem 1.25rem 2.25rem; }
  .page-hero { padding: 1.75rem 1.25rem 2.5rem; }
  .site-footer { padding: 2.15rem 1.25rem 2rem; }

  .masthead h1 {
    /* Sized so Pagella "Nicholas Packwood" fills ~99% of the column at 375px. */
    font-size: 10.3vw;
    white-space: nowrap;
    letter-spacing: -0.02em;
  }
  .masthead h1 .family-name { display: inline; }

  .section, .section-feature { padding: 2.85rem 0; }
  .section-first { padding-top: 0; }
  .sample h1 { font-size: 1.85rem; }
}

@media print {
  body, .top-band, .site-footer { background: #fff; color: #000; }
  .skip-link, .portrait-media, .site-nav { display: none; }
  .portrait-still { display: block; }
  .portrait { margin-bottom: 0; border-color: #000; }
  a { text-decoration: none; }
  .masthead h1, .tagline, .positioning, .pill, .site-footer, .site-footer small {
    color: #000;
  }
  .masthead h1::after,
  .section h2::after,
  .section + .section::before,
  .feature-panel { background: #000; border-color: #000; }
  .section + .section { border-top-color: #000; }
  .section + .section::before { box-shadow: 0 0 0 8px #fff; background: #000; }
  .pill { border-color: #000; }
  .pill::before, .pill::after { color: #000; }
  .writing-cta { color: #000; }
}

/* ---------- Writing sample pages ---------- */

.sample-masthead { margin: 0 0 2.5rem; }

.site-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}
.site-name a:hover,
.site-name a:focus-visible {
  color: var(--gold-ink);
}

.sample h1 {
  margin: 0 0 0.5rem;
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.pub-line {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.intro {
  margin: 0 0 2rem;
  font-style: italic;
  max-width: 36rem;
  font-size: calc(1rem + 1pt);
}

.excerpt p {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  font-size: calc(1rem + 1pt);
}
.excerpt p:last-child { margin-bottom: 0; }

.credit {
  margin: 2rem 0 0;
  font-size: calc(1rem + 1pt);
  max-width: 36rem;
}


.end-excerpt { text-align: center; font-style: italic; margin: 2rem 0 1rem; letter-spacing: 0.02em; }
