/*
Theme Name: Nearly Not Quite
Theme URI: https://www.nearlynotquite.com
Author: April Hooley
Description: Cozy comics, character-led stories and creative work. Built from the Nearly Not Quite Figma design; pairs with the Nearly Not Quite Universe plugin.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: nearly-not-quite
*/

/* ---------- reset (replaces Tailwind's preflight) ---------- */
@layer reset, base;
@layer reset {
  *, ::before, ::after { margin: 0; padding: 0; border: 0 solid; box-sizing: border-box; }
  ul, ol { list-style: none; }
  button, input, textarea, select { color: inherit; background: transparent; }
}
[hidden] { display: none !important; }

:root {
  --cream: #f6f0e4;
  --paper: #fffdf8;
  --teal: #148f91;
  --burgundy: #712e49;
  --mustard: #e9b34e;
  --forest: #263c2b;
  --charcoal: #262421;
  --line: #d8cdbb;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --hand: 'Kalam', cursive;
  --shadow: 0 1.5rem 4rem rgb(38 36 33 / 14%);
}

@layer base {
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--cream); color: var(--charcoal); font-family: var(--sans); }
  a { color: inherit; text-decoration: none; }
  button, input { font: inherit; }
  button { cursor: pointer; }
  img { display: block; width: 100%; height: auto; }
  h1, h2, h3 { margin: 0 0 .5em; }
  p { margin: 0 0 1.25rem; }
  h1, h2, h3 { font-family: var(--serif); line-height: .98; letter-spacing: -.035em; }
  h1 { font-size: clamp(3.4rem, 7.5vw, 7.2rem); }
  h2 { font-size: clamp(2.3rem, 4.5vw, 4.3rem); }
  h3 { font-size: 1.6rem; }
  p { line-height: 1.7; }
  em { color: var(--teal); font-weight: 500; }
  small { color: var(--burgundy); font-size: .7rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
  dt { color: var(--burgundy); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  dd { margin: .25rem 0 0; font-weight: 700; }
}

body::before { content: ''; position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .1; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E"); }
.icon { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header { height: 6.25rem; padding: .6rem clamp(1.2rem, 4vw, 4rem); position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 30; display: flex; align-items: center; justify-content: space-between; background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(1rem); border-bottom: 1px solid var(--line); }
.brand img { width: 5rem; height: 5rem; object-fit: contain; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.3vw, 2.5rem); }
.nav > a:not(.button) { font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.nav > a:hover { color: var(--teal); }
.header-actions { display: flex; gap: .5rem; }
.icon-button { width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; }
.menu { display: none; }
.button { min-height: 3.15rem; padding: .75rem 1.35rem; display: inline-flex; justify-content: center; align-items: center; gap: .7rem; border: 1px solid var(--charcoal); border-radius: 99rem; background: var(--mustard); color: var(--charcoal); box-shadow: .22rem .22rem 0 var(--charcoal); font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: .2s; }
.button:hover { transform: translate(-.12rem, -.12rem); box-shadow: .36rem .36rem 0 var(--charcoal); }
.button.secondary { background: transparent; box-shadow: none; }
.buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.eyebrow { display: block; margin-bottom: 1rem; color: var(--burgundy); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: var(--mustard); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.6; }
.text-link { display: inline-flex; align-items: center; gap: .5rem; padding-bottom: .25rem; border-bottom: 1px solid; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tag { display: inline-flex; padding: .36rem .7rem; border: 1px solid var(--line); border-radius: 99rem; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.tag:hover { background: var(--mustard); border-color: var(--charcoal); color: var(--charcoal); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 1.5rem; }
.breadcrumb { margin-bottom: 2rem; font-size: .72rem; opacity: .7; }

.hero { min-height: calc(100vh - 6.25rem); padding: 3rem clamp(1.2rem, 6vw, 7rem) 5rem; display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 75% 42%, rgb(233 179 78 / 42%) 0 16%, transparent 16.2%); }
.hero-copy { max-width: 47rem; z-index: 2; }
.hero-copy h1 { margin: 1.5rem 0; }
.hero-copy .lead { max-width: 40rem; }
.hero-kicker { max-width: 37rem; padding-bottom: .8rem; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero-kicker span { color: var(--burgundy); font-family: var(--hand); letter-spacing: 0; text-transform: none; transform: rotate(-2deg); }
.hero-art { height: min(75vh, 50rem); margin-left: 2rem; position: relative; }
.hero-art > div { position: absolute; inset: 2% 2% 3% 7%; overflow: hidden; background: var(--burgundy); clip-path: polygon(5% 0,100% 4%,95% 100%,0 95%); }
.hero-art img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.sticker { width: 7rem; height: 7rem; padding: 1.1rem; position: absolute; right: 0; top: 1%; display: grid; place-items: center; border: 2px solid var(--charcoal); border-radius: 50%; background: var(--teal); color: white; text-align: center; font: 700 .75rem/1.1 var(--hand); text-transform: uppercase; transform: rotate(8deg); }
.note { position: absolute; left: 0; bottom: 4%; padding: 1rem 1.2rem; border: 1px solid var(--charcoal); background: var(--paper); box-shadow: .3rem .3rem 0 var(--charcoal); font-family: var(--hand); transform: rotate(-2deg); }
.marquee { position: absolute; bottom: 0; left: 0; width: 100%; padding: .9rem; background: var(--burgundy); color: white; font-size: .7rem; letter-spacing: .24em; text-align: center; white-space: nowrap; overflow: hidden; }

.section { padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 6vw, 7rem); }
.section.compact { padding-top: 4rem; }
.paper { background: var(--paper); }
.tinted { background: #eee3d1; }
.section-heading { margin-bottom: 3.5rem; padding-bottom: 1.6rem; display: flex; justify-content: space-between; align-items: end; gap: 2rem; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; }
.comic-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; }
.comic-card { display: grid; grid-template-columns: 1.1fr .9fr; background: var(--cream); border: 1px solid var(--line); }
.comic-card.card-1 { display: block; }
.card-image { min-height: 30rem; position: relative; overflow: hidden; }
.card-image img { height: 100%; object-fit: cover; object-position: 50% 28%; }
.card-image span { position: absolute; top: 1rem; left: 1rem; padding: .45rem .7rem; border: 1px solid; border-radius: 99rem; background: var(--mustard); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.card-1 .card-image { display: block; height: 20rem; min-height: 0; }
.card-copy { padding: 2rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.card-copy h3 { margin: .7rem 0; font-size: clamp(2rem, 3vw, 3.3rem); }
.latest { padding: clamp(4rem, 8vw, 7rem); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 7rem); align-items: center; background: var(--forest); color: white; }
.latest h2 { color: white; }
.latest em { color: var(--mustard); }
.latest i { display: inline-block; color: var(--mustard); border-bottom: 2px solid; font: 700 1rem var(--hand); transform: rotate(-3deg); }
.meta { margin: 2rem 0; padding: 1rem 0; display: flex; gap: 2rem; border-block: 1px solid rgb(255 255 255 / 25%); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.latest-image { display: block; height: 40rem; position: relative; overflow: hidden; clip-path: polygon(3% 0,100% 3%,97% 97%,0 100%); }
.latest-image img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.latest-image b { position: absolute; right: 1rem; bottom: 1rem; padding: .6rem; background: var(--mustard); color: var(--charcoal); }
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.post-image { height: 20rem; margin-bottom: 1.3rem; display: block; overflow: hidden; }
.post-image img { height: 100%; object-fit: cover; object-position: 50% 30%; transition: .35s; }
.post-grid article:nth-child(2) img { object-position: 50% 70%; }
.post-grid article:hover img { transform: scale(1.03); }
.post-grid h3 { margin: .8rem 0; }
.work { background: var(--burgundy); color: white; }
.work .eyebrow { color: var(--mustard); }
.work .section-heading { border-color: rgb(255 255 255 / 30%); }
.project-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.project { min-height: 32rem; padding: 2rem; display: flex; align-items: end; position: relative; overflow: hidden; }
.project::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 30%,rgb(0 0 0 / 83%)); }
.project > img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: 50% 30%; }
.project > span { position: absolute; z-index: 2; top: 1rem; left: 1rem; padding: .45rem; background: var(--mustard); color: var(--charcoal); font-size: .65rem; font-weight: 800; }
.project > div { position: relative; z-index: 2; max-width: 28rem; }
.project h3 { margin: .5rem 0; font-size: 2.5rem; }
.project b, .disciplines b { display: flex; align-items: center; gap: .5rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.about-preview { min-height: 50rem; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.about-preview > div:first-child { height: 100%; max-height: 52rem; overflow: hidden; background: var(--teal); }
.about-preview > div:first-child img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.about-preview > div:last-child { padding: clamp(3rem, 8vw, 8rem); }

footer.site-footer { padding: 4rem clamp(1.2rem, 6vw, 7rem) 2rem; background: var(--charcoal); color: white; }
.footer-main { padding-bottom: 3rem; display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 3rem; border-bottom: 1px solid rgb(255 255 255 / 25%); }
.footer-main > img { width: 7rem; }
.footer-main h2 { margin-bottom: .5rem; font-size: 2.5rem; }
.footer-main p, .footer-bottom { color: #c8c1b7; }
.footer-email { padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid; font-weight: 700; }
.footer-bottom { padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; font-size: .74rem; }
.footer-bottom p { margin: 0; }
.footer-bottom div { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.search-overlay { position: fixed; inset: 0; z-index: 50; padding: clamp(2rem, 12vw, 12rem); display: flex; flex-direction: column; justify-content: center; background: var(--burgundy); color: white; }
.search-overlay form { max-width: 65rem; padding-bottom: 1.5rem; display: flex; gap: 1rem; border-bottom: 1px solid rgb(255 255 255 / 50%); }
.search-overlay input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: white; font: 500 clamp(1.5rem,4vw,3.5rem) var(--serif); }
.search-overlay input::placeholder { color: rgb(255 255 255 / 45%); }
.search-close { position: absolute; right: 3rem; top: 3rem; color: white; border-color: rgb(255 255 255 / 50%); }

.page-hero { min-height: 35rem; padding: clamp(5rem,10vw,9rem) clamp(1.2rem,8vw,9rem); display: flex; align-items: center; overflow: hidden; background: var(--paper); }
.page-hero > div:first-child { max-width: 62rem; z-index: 2; }
.page-hero h1 { margin-bottom: 2rem; }
.page-hero .lead { max-width: 48rem; }
.page-hero.has-image { padding-bottom: 0; display: grid; grid-template-columns: 1fr .75fr; }
.page-hero.has-image > div:last-child { height: 100%; overflow: hidden; clip-path: polygon(10% 0,100% 4%,100% 100%,0 100%); }
.page-hero.has-image img { height: 100%; object-fit: cover; object-position: 50% 28%; }
.filters { margin-bottom: 3rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button, .filters a { padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 99rem; background: transparent; font-size: .72rem; font-weight: 700; }
.filters button:hover, .filters button.active, .filters a:hover, .filters a.active { background: var(--charcoal); color: white; }
.series-list { display: grid; gap: 3rem; }
.series-row { padding-top: 2.5rem; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem,6vw,6rem); align-items: center; border-top: 1px solid var(--line); }
.series-row > div:first-child { height: 38rem; position: relative; overflow: hidden; }
.series-row > div:first-child img { height: 100%; object-fit: cover; object-position: 50% 28%; }
.series-row > div:first-child span { position: absolute; top: 1rem; left: 1rem; padding: .5rem; border: 1px solid; background: var(--mustard); font-size: .65rem; font-weight: 800; }
.series-row > div:last-child { max-width: 47rem; }
.series-row dl, .profile-hero dl { margin: 1.5rem 0 2rem; padding: 1.3rem 0; display: flex; gap: 3rem; border-block: 1px solid var(--line); }
.series-hero { min-height: 43rem; display: grid; grid-template-columns: 1fr 1fr; background: var(--forest); color: white; }
.series-hero > div:first-child { height: 43rem; overflow: hidden; }
.series-hero > div:first-child img { height: 100%; object-fit: cover; object-position: 50% 28%; }
.series-hero > div:last-child { padding: clamp(3rem,7vw,7rem); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.series-logo { width: min(16rem,60%); margin: 1rem 0 2rem; }
.series-hero .tag { border-color: rgb(255 255 255 / 40%); }
.subnav { padding: 1rem; display: flex; justify-content: center; gap: clamp(1rem,4vw,4rem); overflow-x: auto; background: var(--burgundy); color: white; }
.subnav a { font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.feature { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem,7vw,7rem); align-items: center; }
.feature > :first-child { height: 34rem; overflow: hidden; }
.feature img { height: 100%; object-fit: cover; object-position: 50% 30%; }

.reader { padding: 2rem clamp(.5rem,5vw,5rem) 7rem; background: #ded6c8; }
.reader-top { display: flex; justify-content: space-between; }
.reader-title { margin: 3rem auto; text-align: center; }
.reader-title h1 { margin-bottom: 1rem; font-size: clamp(3rem,6vw,5.5rem); }
.comic-page { max-width: 62rem; margin: auto; padding: 1rem; background: white; box-shadow: var(--shadow); }
.comic-page img { max-height: 80rem; object-fit: contain; }
.reader-controls { padding: 2rem 0; display: flex; justify-content: center; align-items: center; gap: .5rem; }
.reader-btn { padding: .7rem 1rem; border: 1px solid; border-radius: 99rem; background: var(--paper); font-weight: 700; }
.reader-btn[aria-disabled] { opacity: .35; cursor: default; }
.reader-note { max-width: 48rem; margin: 4rem auto 0; padding-top: 3rem; border-top: 1px solid #b5aa98; }
.archive-tools { margin-bottom: 4rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.search-field { width: min(32rem,100%); padding: .8rem 0; display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; }
.start { margin-bottom: 4rem; padding: clamp(2rem,5vw,5rem); background: var(--teal); color: white; }
.start > span { color: var(--mustard); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.start p { max-width: 42rem; }
.chapter { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(2rem,8vw,8rem); }
.episodes { border-top: 1px solid var(--line); }
.episodes > a { padding: 1.2rem 0; display: grid; grid-template-columns: 3rem 1fr auto; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); }
.episodes h3, .episodes p { margin: 0; }
.episodes h3 { font-size: 1.2rem; }
.episodes p, .episodes > a > span { color: #6d4d3d; font-size: .7rem; }

.blog-feature { margin-bottom: 3rem; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; background: var(--burgundy); color: white; }
.blog-feature > :first-child { height: 35rem; overflow: hidden; }
.blog-feature img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.blog-feature > div:last-child { padding: clamp(2rem,5vw,5rem); }
.article { padding: 5rem clamp(1.2rem,8vw,9rem) 9rem; }
.article header { max-width: 70rem; margin: 4rem auto; text-align: center; }
.article header h1 { font-size: clamp(3.5rem,7vw,6.5rem); }
.byline { font-size: .75rem; font-weight: 700; }
.article-hero { height: min(70vw,48rem); overflow: hidden; }
.article-hero img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.article-body { max-width: 46rem; margin: 5rem auto; font-size: 1.07rem; }
.article-body h2 { margin: 4rem 0 1.5rem; font-size: 2.8rem; }
.dropcap::first-letter { float: left; padding-right: .6rem; color: var(--burgundy); font: 600 5rem/.8 var(--serif); }
.article-body blockquote { margin: 4rem -5rem; padding: 2rem 5rem; border-block: 1px solid var(--line); color: var(--burgundy); font: 600 2rem/1.3 var(--serif); }
.article-image { margin: 4rem -8rem; }
.article-image small { display: block; padding-top: .7rem; }

.wiki-search { padding: 2rem clamp(1.2rem,8vw,9rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; background: var(--teal); color: white; }
.wiki-search .tag { border-color: rgb(255 255 255 / 50%); }
.wiki-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.wiki-card > div:first-child { height: 26rem; margin-bottom: 1.2rem; overflow: hidden; background: var(--teal); }
.wiki-card img { height: 100%; object-fit: cover; object-position: 50% 28%; transition: .35s; }
.wiki-card:hover img { transform: scale(1.03); }
.wiki-card h3 { margin: .5rem 0; font-size: 2rem; }
.index { margin-top: 6rem; padding-top: 3rem; display: grid; grid-template-columns: .6fr 1.4fr; gap: 3rem; border-top: 1px solid var(--line); }
.index > div:last-child { display: grid; grid-template-columns: repeat(9,1fr); gap: .5rem; }
.index > div:last-child a, .index > div:last-child span { aspect-ratio: 1; border: 1px solid var(--line); background: var(--paper); font-weight: 800; }
.index > div:last-child a:hover, .index > div:last-child a[aria-current] { background: var(--mustard); }
.profile-hero { min-height: 48rem; display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); }
.profile-hero > div:first-child { height: 48rem; overflow: hidden; }
.profile-hero > div:first-child img { height: 100%; object-fit: cover; object-position: 50% 28%; }
.profile-hero > div:last-child { padding: clamp(3rem,7vw,7rem); display: flex; flex-direction: column; justify-content: center; }
.profile-content { padding: 6rem clamp(1.2rem,8vw,9rem); display: grid; grid-template-columns: 15rem 1fr; gap: clamp(3rem,8vw,8rem); }
.profile-content aside { line-height: 3; color: var(--burgundy); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.profile-content article { max-width: 53rem; font-size: 1.05rem; }
.profile-content article h2 { margin: 3rem 0 1rem; }
.related { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.related img { height: 18rem; object-fit: cover; object-position: 50% 28%; }
.related h3 { margin: 1rem 0 .3rem; }

.disciplines { margin-bottom: 8rem; display: grid; grid-template-columns: repeat(2,1fr); }
.disciplines > a { min-height: 22rem; margin: -1px 0 0 -1px; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; border: 1px solid; }
.disciplines .teal { background: var(--teal); color: white; }
.disciplines .plum { background: #b88eaa; }
.disciplines .mustard { background: var(--mustard); }
.disciplines .forest { background: var(--forest); color: white; }
.disciplines h2 { margin: auto 0 1rem; font-size: 3rem; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 3rem 2rem; }
.portfolio-card > div { height: 32rem; margin-bottom: 1.3rem; overflow: hidden; }
.portfolio-card img { height: 100%; object-fit: cover; object-position: 50% 30%; transition: .35s; }
.portfolio-card:hover img { transform: scale(1.03); }
.portfolio-card h3 { margin: .6rem 0; font-size: 2.1rem; }
.project-hero { min-height: 44rem; display: grid; grid-template-columns: .8fr 1.2fr; background: var(--forest); color: white; }
.project-hero > div:first-child { padding: clamp(3rem,7vw,7rem); display: flex; flex-direction: column; justify-content: center; }
.project-hero > div:last-child { overflow: hidden; }
.project-hero img { height: 100%; object-fit: cover; object-position: 50% 25%; }
.project-hero em { color: var(--mustard); }
.case-intro { padding: 6rem clamp(1.2rem,8vw,9rem); display: grid; grid-template-columns: 1.2fr .8fr; gap: 5rem; }
.case-intro dl { display: grid; gap: 1rem; }
.case-intro dl div { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.case-body { padding: 0 clamp(1.2rem,8vw,9rem) 9rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.case-body > div { height: 35rem; overflow: hidden; }
.case-body > div.wide { height: 50rem; grid-column: 1/-1; }
.case-body img { height: 100%; object-fit: cover; object-position: 50% 30%; }
.case-body article { padding: clamp(2rem,6vw,6rem); }
.about-hero { min-height: 47rem; padding-left: clamp(1.2rem,8vw,9rem); display: grid; grid-template-columns: 1fr .8fr; align-items: center; overflow: hidden; background: var(--paper); }
.about-hero > div:last-child { height: 47rem; overflow: hidden; clip-path: polygon(12% 0,100% 0,100% 100%,0 95%); }
.about-hero img { height: 100%; object-fit: cover; object-position: 50% 25%; }
.about-story { padding: 8rem clamp(1.2rem,8vw,9rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem,8vw,8rem); }
.about-story > div:last-child { max-width: 44rem; font-size: 1.05rem; }
.skills { display: flex; flex-wrap: wrap; gap: .6rem; }
.skills span { padding: .6rem .9rem; border: 1px solid; border-radius: 99rem; font-size: .72rem; font-weight: 700; }
.contact { padding: 8rem 1.5rem; background: var(--burgundy); color: white; text-align: center; }
.contact > span { display: block; color: var(--mustard); font: 1.3rem var(--hand); }
.contact em { color: var(--mustard); }
.big-search { display: flex; align-items: center; gap: 1rem; border-bottom: 2px solid; }
.big-search .icon { width: 2rem; height: 2rem; }
.big-search input { min-width: 0; flex: 1; padding: 1.5rem 0; border: 0; outline: 0; background: transparent; font: 500 clamp(2rem,5vw,4rem) var(--serif); }
.big-search button { padding: 1rem 1.5rem; border: 0; background: var(--mustard); font-weight: 800; }
.result { padding: 1.5rem 0; display: grid; grid-template-columns: 8rem 1fr auto; align-items: center; gap: 2rem; border-top: 1px solid var(--line); }
.result:last-child { border-bottom: 1px solid var(--line); }
.result > span { color: var(--burgundy); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.result h3, .result p { margin: 0; }
.tag-cloud { margin-bottom: 6rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.tag-cloud .tag { padding: .8rem 1.2rem; font-size: 1rem; }
.legal-content { max-width: 50rem; margin: 0 auto; padding: clamp(4rem, 8vw, 8rem) 1.2rem; font-size: 1.05rem; }
.legal-content h2 { margin: 3.5rem 0 1rem; font-size: clamp(2rem, 4vw, 3rem); }
.legal-content h2:first-of-type { margin-top: 1.5rem; }
.legal-content a { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: .2rem; }
.legal-content ul { padding-left: 1.25rem; line-height: 1.8; }
.legal-content li + li { margin-top: .65rem; }
.legal-date { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); color: var(--burgundy); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 1000px) {
  .menu { display: grid; }
  .nav { display: none; position: fixed; top: calc(6.25rem + var(--wp-admin--admin-bar--height, 0px)); inset-inline: 0; height: calc(100vh - 6.25rem); padding: 3rem; flex-direction: column; align-items: stretch; background: var(--cream); }
  .nav.open { display: flex; }
  .nav > a:not(.button) { padding-bottom: 1rem; border-bottom: 1px solid var(--line); font: 600 2rem var(--serif); text-transform: none; }
  .hero { grid-template-columns: 1fr 1fr; padding-inline: 2.5rem; }
  .hero-art { margin-left: 0; }
  .comic-grid { grid-template-columns: 1fr; }
  .comic-card.card-1 { display: grid; }
  .post-grid { grid-template-columns: repeat(2,1fr); }
  .page-hero.has-image { grid-template-columns: 1fr 1fr; }
  .footer-main { grid-template-columns: auto 1fr; }
  .footer-email { grid-column: 1/-1; }
  .wiki-grid { grid-template-columns: repeat(2,1fr); }
  .wiki-card:last-child { grid-column: span 2; max-width: 50%; }
  .chapter, .profile-content { grid-template-columns: 1fr; }
  .profile-content aside { display: none; }
}

@media (max-width: 700px) {
  h1 { font-size: clamp(3rem,15vw,4.5rem); }
  h2 { font-size: clamp(2.2rem,10vw,3.2rem); }
  .header { height: 5rem; }
  .brand img { width: 4rem; height: 4rem; }
  .nav { top: calc(5rem + var(--wp-admin--admin-bar--height, 0px)); height: calc(100vh - 5rem); }
  .hero { min-height: auto; padding: 4rem 1.2rem 5rem; grid-template-columns: 1fr; }
  .hero-kicker { align-items: flex-start; }
  .hero-art { height: 34rem; margin-top: 3rem; }
  .sticker { width: 6rem; height: 6rem; }
  .comic-card, .comic-card.card-1 { display: block; }
  .card-image, .card-1 .card-image { display: block; min-height: 25rem; height: 25rem; }
  .latest, .about-preview, .series-row, .series-hero, .feature, .blog-feature, .profile-hero, .project-hero, .case-intro, .about-hero, .about-story { grid-template-columns: 1fr; }
  .latest-image { height: 29rem; }
  .post-grid, .project-grid, .portfolio-grid, .disciplines, .case-body { grid-template-columns: 1fr; }
  .post-image { height: 24rem; }
  .about-preview > div:first-child { height: 35rem; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .project { min-height: 27rem; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-email { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .search-overlay { padding-inline: 1.5rem; }
  .search-overlay form { flex-direction: column; }
  .search-close { top: 1.5rem; right: 1.5rem; }
  .page-hero, .page-hero.has-image { padding: 4rem 1.2rem 0; display: flex; flex-direction: column; align-items: stretch; }
  .page-hero:not(.has-image) { padding-bottom: 4rem; }
  .page-hero.has-image > div:last-child { height: 25rem; margin-top: 2rem; }
  .series-row > div:first-child { height: 30rem; }
  .series-row dl, .profile-hero dl { flex-wrap: wrap; gap: 1.5rem; }
  .series-hero > div:first-child { height: 35rem; }
  .series-hero > div:last-child { padding: 3rem 1.2rem; }
  .subnav { justify-content: flex-start; }
  .reader-top { display: block; }
  .reader-controls { flex-wrap: wrap; }
  .archive-tools, .wiki-search { flex-direction: column; align-items: flex-start; }
  .blog-feature > :first-child { height: 27rem; }
  .article { padding-inline: 1.2rem; }
  .article-body blockquote { margin: 3rem 0; padding: 2rem 0; }
  .article-image { margin: 3rem 0; }
  .wiki-grid { grid-template-columns: 1fr; }
  .wiki-card:last-child { grid-column: auto; max-width: none; }
  .index { grid-template-columns: 1fr; }
  .index > div:last-child { grid-template-columns: repeat(6,1fr); }
  .profile-hero, .profile-hero > div:first-child { min-height: 0; height: auto; }
  .profile-hero > div:first-child { height: 35rem; }
  .profile-hero > div:last-child { padding: 3rem 1.2rem; }
  .profile-content { padding: 4rem 1.2rem; }
  .related { grid-template-columns: 1fr; }
  .case-body { display: block; padding-inline: 1.2rem; }
  .case-body > div, .case-body > div.wide { height: 28rem; margin-bottom: 1rem; }
  .case-body article { padding: 3rem 0; }
  .about-hero { padding: 4rem 0 0; }
  .about-hero > div:first-child { padding: 0 1.2rem 3rem; }
  .about-hero > div:last-child { height: 35rem; }
  .result { grid-template-columns: 5rem 1fr auto; gap: 1rem; }
  .big-search button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}


/* ---------- WordPress additions ---------- */
#wpadminbar img { width: auto; display: inline; }
body.menu-open { overflow: hidden; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed !important; z-index: 100; top: 1rem; left: 1rem; width: auto; height: auto; clip: auto; padding: .8rem 1.2rem; background: var(--mustard); color: var(--charcoal); font-weight: 800; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.nav > a[aria-current] { color: var(--teal); }
.index { align-items: start; }
.index > div:last-child a, .index > div:last-child span { display: grid; place-items: center; }
.index span[aria-disabled] { opacity: .35; }
.reader-btn { display: inline-block; color: var(--charcoal); }
.reader-count { padding: 0 1rem; font-weight: 800; }
.tag.active { background: var(--mustard); border-color: var(--charcoal); }
.subnav a[aria-current] { box-shadow: 0 2px 0 var(--mustard); }
.note { color: var(--charcoal); }
.marquee span { display: inline-block; }
.hero h1 em, .page-hero h1 em { font-style: italic; }
.series-title { color: white; margin: 1rem 0 2rem; }
.series-hero .lead p { margin-bottom: 1rem; }
.soon { display: inline-block; padding: .6rem 1rem; border: 1px solid rgb(255 255 255 / 50%); border-radius: 99rem; color: var(--mustard); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.page-hero.has-image > div:last-child { height: 38rem; align-self: end; }
.project-hero > div:last-child { height: 44rem; }
.nnq-placeholder { background: #eadfcb; }
.empty-note { padding: 2rem; border: 1px dashed var(--line); color: #6d4d3d; text-align: center; }
.result-count { margin: 2rem 0 1rem; }
.results { margin-top: 1rem; }
.socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.socials a { padding: .4rem .8rem; border: 1px solid rgb(255 255 255 / 35%); border-radius: 99rem; font-size: .72rem; font-weight: 700; }
.socials a:hover { background: var(--mustard); border-color: var(--mustard); color: var(--charcoal); }
.skills a { padding: .6rem .9rem; border: 1px solid; border-radius: 99rem; font-size: .72rem; font-weight: 700; }
.skills a:hover { background: var(--mustard); }
.about-story h3 { margin: 2.5rem 0 1rem; }
.related a { display: block; }
.profile-content aside nav { position: sticky; top: 8rem; display: flex; flex-direction: column; }
.profile-content aside a:hover { color: var(--teal); }
.tagline { margin-top: 0 !important; }
.comic-content img, .comic-content figure { width: 100%; height: auto; margin: 0 auto; }
.comic-content p:empty { display: none; }
.transcript { margin-top: 2rem; padding: 1.2rem 1.4rem; border: 1px solid #b5aa98; background: var(--paper); }
.transcript summary { cursor: pointer; font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.transcript p { margin-top: 1rem; }

/* Editor content */
.entry-content a { color: var(--teal); text-decoration: underline; text-underline-offset: .2rem; }
.entry-content .tags a, .entry-content .skills a { color: inherit; text-decoration: none; }
.entry-content ul, .entry-content ol { margin: 0 0 1.5rem 1.25rem; line-height: 1.8; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content figure { margin: 3rem 0; }
.entry-content figcaption { padding-top: .7rem; color: var(--burgundy); font-size: .7rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.entry-content img { height: auto; }
.entry-content blockquote { color: var(--burgundy); font: 600 1.8rem/1.3 var(--serif); border-block: 1px solid var(--line); padding: 1.5rem 0; margin: 2.5rem 0; }
.entry-content blockquote p { margin: 0; }
.article-body .alignwide, .article-body .wp-block-image.alignwide { margin-inline: -8rem; }
.article-body > p:first-child::first-letter, .dropcap-first > p:first-child::first-letter, .about-story .entry-content > p:first-child::first-letter { float: left; padding-right: .6rem; color: var(--burgundy); font: 600 5rem/.8 var(--serif); }
.legal-content > p:first-child { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); color: var(--burgundy); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.case-body .entry-content p:last-child { margin-bottom: 0; }

/* Post navigation and pagination */
.post-nav { max-width: 46rem; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.post-nav div:last-child { text-align: right; }
.post-nav a { display: block; }
.post-nav small { display: block; margin-bottom: .3rem; }
.post-nav span { font: 600 1.3rem/1.2 var(--serif); }
.pagination { margin-top: 4rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.pagination .page-numbers { padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 99rem; font-size: .8rem; font-weight: 700; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--charcoal); color: white; }

@media (max-width: 1000px) {
  .article-body .alignwide { margin-inline: 0; }
}
@media (max-width: 700px) {
  .page-hero.has-image > div:last-child { height: 25rem; }
  .project-hero > div:last-child { height: 30rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav div:last-child { text-align: left; }
  .reader-controls { gap: .4rem; }
  .reader-count { order: -1; width: 100%; text-align: center; }
}

/* Dark sections: outline buttons in white */
.series-hero .button.secondary, .latest .button.secondary, .project-hero .button.secondary, .blog-feature .button.secondary { color: white; border-color: rgb(255 255 255 / 70%); }
/* Tall heroes: keep the image filling the full height of the text column */
.series-hero > div:first-child, .profile-hero > div:first-child { position: relative; height: auto; min-height: 43rem; }
.series-hero > div:first-child img, .profile-hero > div:first-child img { position: absolute; inset: 0; height: 100%; }
.profile-hero > div:first-child { min-height: 48rem; }
.related a, .related a:hover { color: inherit; text-decoration: none; }
@media (max-width: 700px) {
  .series-hero > div:first-child, .profile-hero > div:first-child { min-height: 0; height: 35rem; }
}

@media (max-width: 700px) {
  .hero { background: radial-gradient(circle at 78% 70%, rgb(233 179 78 / 42%) 0 34%, transparent 34.2%); }
}
