/*
Theme Name: Paterson Editorial
Description: An editorial theme for the biography and media archive of G. Scott Paterson.
Version: 1.0.1
Requires at least: 6.8
Requires PHP: 8.0
*/

:root {
  --ink: #142735;
  --slate: #526775;
  --accent: #235d7a;
  --sky: #d8edf5;
  --mist: #eef6f9;
  --line: #d7e4ea;
  --paper: #fcfdfd;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.7 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #122f43; }
a:focus-visible, summary:focus-visible { outline: 3px solid #176c95; outline-offset: 5px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.13; }
h1 { font-size: clamp(2.35rem, 5.25vw, 4.2rem); letter-spacing: -.045em; }
h2 { margin: 1.65em 0 .45em; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.025em; }
h3 { margin: 1.3em 0 .45em; font-size: 1.4rem; }
p { margin: 0 0 1.2em; }
.wrap { width: min(1170px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 5; padding: 8px 16px; background: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.masthead { background: linear-gradient(119deg, #ecf6fa 12%, #c6e5f0 100%); border-bottom: 1px solid #c2dce8; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 122px; }
.brand { display: block; width: fit-content; color: var(--ink); font: 700 clamp(1.3rem, 2.4vw, 1.85rem)/1.12 var(--sans); letter-spacing: -.035em; text-decoration: none; text-transform: uppercase; }
.tagline { margin: 9px 0 0; color: #405c6e; font-size: .83rem; }
.masthead nav ul { display: flex; flex-wrap: wrap; gap: 24px; margin: 0; padding: 0; list-style: none; }
.masthead nav a { display: block; padding: 8px 0; color: #263f50; text-decoration: none; font-size: .86rem; font-weight: 650; }
.masthead nav a:hover, .masthead nav [aria-current="page"] { border-bottom: 2px solid var(--accent); }
.content { min-height: 55vh; padding-block: 54px 96px; overflow-wrap: anywhere; }
.content > h1:first-child, .content .wp-block-column > h1:first-child { margin: 0 0 .65em; }
.content figure { margin: 0 0 1.3rem; }
.content figure img { display: block; border-radius: 8px; }
.home { background: var(--mist); }
.home .content { margin-block: clamp(20px, 4vw, 48px); padding: clamp(20px, 4vw, 54px); border: 1px solid var(--line); border-radius: 12px; background: #fff; font: 1.065rem/1.8 var(--serif); }
.home .content h1 { font: 550 clamp(2rem, 4.4vw, 3.45rem)/1.14 var(--sans); letter-spacing: -.04em; }
.home .content a { color: #964327; }
.home .content a:hover { color: #642916; }
.biography-columns { align-items: flex-start !important; gap: clamp(26px, 4.2vw, 58px) !important; }
.biography-columns > .wp-block-column:first-child { min-width: 0; }
.biography-columns > .wp-block-column:last-child { min-width: 0; font-family: var(--sans); }
.biography-columns > .wp-block-column:last-child h3 { margin: 1.45rem 0 .45rem; font: 650 .8rem/1.4 var(--sans); letter-spacing: .1em; }
.biography-columns > .wp-block-column:last-child figure { margin-bottom: .6rem; }
.biography-columns > .wp-block-column:last-child img { width: min(100%, 240px); border: 1px solid var(--line); }
.biography-columns > .wp-block-column:last-child ul { list-style: none; margin: 0; padding: 0; }
.biography-columns > .wp-block-column:last-child li { border-bottom: 1px solid var(--line); }
.biography-columns > .wp-block-column:last-child li:last-child { border: 0; }
.biography-columns > .wp-block-column:last-child a { display: block; padding: .48rem 0; font-size: .88rem; }
.biography-intro { font: 700 .76rem/1.6 var(--sans); color: var(--accent); letter-spacing: .09em; }
.biography-intro + p { font-size: 1.22rem; line-height: 1.55; }
.home .content > h2 { border-top: 1px solid var(--line); padding-top: 1.2em; }
.home .content .wp-block-image.alignright { float: right; width: min(42%, 296px); margin: 0 0 .7em 1.15em; }
.home .content .wp-block-column > h3:first-child { margin-top: 0; }
.home .content .wp-block-columns:not(.biography-columns) > .wp-block-column { flex-shrink: 1; }
.archive-grid { gap: 1.15rem !important; margin-bottom: 1.15rem; }
.archive-grid > .wp-block-column { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.archive-grid > .wp-block-column:empty { border: 0; background: transparent; padding: 0; }
.archive-grid figure { margin: 0; }
.archive-grid figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.archive-grid h3 { margin: 1rem .2rem .45rem; font-size: 1.19rem; line-height: 1.35; }
.archive-grid h3 a { color: var(--ink); text-decoration: none; }
.archive-grid h3 a:hover { text-decoration: underline; }
.newspaper-columns { gap: max(24px, 3vw) !important; }
.newspaper-columns > .wp-block-column + .wp-block-column { border-left: 1px solid var(--line); padding-left: max(20px, 2vw); }
.media-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin-top: 32px; }
.media-list li { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); background: #fff; padding: 24px; border-radius: 12px; }
.media-list small { color: var(--slate); }
.media-list h2 { font-size: 1.35rem; line-height: 1.3; margin: .55em 0 1em; }
.media-list h2 a { color: var(--ink); text-decoration: none; }
.media-list h2 a:hover { text-decoration: underline; }
.media-list .read-source { margin-top: auto; font-size: .84rem; font-weight: 650; }
.back-link a, .pdf-link { display: inline-block; padding: 9px 15px; border-radius: 6px; background: #1f4860; color: white; text-decoration: none; font-size: .86rem; font-weight: 600; }
.back-link a:hover, .pdf-link:hover { background: #122e40; color: white; }
.document-page .content { max-width: 950px; }
.document-frame { width: 100%; min-height: 580px; height: 76vh; background: var(--mist); border: 1px solid var(--line); border-radius: 10px; }
.site-footer { background: #e4f2f7; border-top: 1px solid #c9dfe9; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding-block: 34px; }
.footer-inner small { color: #415e6e; }

@media (min-width: 782px) {
  .home .content .biography-columns { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(175px, 26%); }
}

@media (max-width: 900px) {
  .wrap { width: calc(100% - 42px); }
  .masthead-inner { align-items: flex-start; flex-direction: column; gap: 15px; padding-block: 25px 19px; }
  .media-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newspaper-columns { display: block !important; }
  .newspaper-columns > .wp-block-column + .wp-block-column { border: 0; padding: 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead nav ul { gap: 4px 17px; }
  .content { padding-block: 36px 60px; }
  .archive-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-grid h3 { font-size: 1rem; }
  .media-list { grid-template-columns: 1fr; }
  .document-frame { min-height: 400px; height: 62vh; }
  .home .content .wp-block-image.alignright { float: none; width: min(100%, 296px); margin: 0 0 1.15em; }
}
