/* marcdhauser.com — recreates the original dark, uppercase-heading look.
   Original fonts were Adobe "Rooney Sans" (headings) and "Freight Sans Pro" (text);
   these free, self-hosted stand-ins are the closest open equivalents. */

@font-face { font-family: "Nunito Sans"; src: url("/fonts/nunito-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/nunito-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #000;
  --band: #1c1c1c;          /* lighter band of the original background gradient */
  --text: #fff;
  --muted: #b9b9bb;
  --line: #3a3a3c;
  --card: #111112;
  --accent: #e90;           /* the original's orange accent (links, dates, categories) */
  --head: "Nunito Sans", "Rooney Sans", system-ui, sans-serif;
  --body: "Source Sans 3", "Freight Sans Pro", system-ui, sans-serif;
  --max: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 400 1.2rem/1.7 var(--body);
  /* Same black → charcoal → black band as the original grad-bgnd image, drawn in CSS */
  background: linear-gradient(180deg, #000 0, #000 12%, var(--band) 55%, #0a0a0a 85%, #000 100%) fixed, var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { opacity: .8; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; text-transform: uppercase; line-height: 1.2; letter-spacing: .01em; margin: 1.6em 0 .6em; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
h4 { font-size: 1.3rem; }
.pg-section > :first-child { margin-top: 0; }

.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* ---------- Header & navigation (matches original: charcoal bar, social left, centred logo + menu, Contact button right) ---------- */
.site-header {
  background: #141415; position: relative; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem;
  padding: 2.25rem var(--gutter) 1.25rem;
}
.hdr-social .social { margin: 0; }
.hdr-center { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.hdr-action { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }
.logo img { width: clamp(220px, 30vw, 420px); height: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; gap: 2.2rem; align-items: center; justify-content: center; }
.site-nav .nav-plain { display: none; }          /* Contact lives in the button on the right on desktop */
.site-nav a, .folder-btn {
  font: 700 .8rem/2.2 var(--head); text-transform: uppercase; letter-spacing: .05em;
  color: #fff; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
}
.folder { position: relative; }
.folder-list {
  display: none; position: absolute; top: 100%; left: -1em; min-width: 13rem; padding: .5em 1em;
  background: #141415 url("/img/adult-child-mind2.png") center / contain no-repeat;
  box-shadow: -2px 5px 14px 1px rgba(0,0,0,.5);
}
.folder-list a { display: block; line-height: 1.3; padding: 6px 0 8px; border-bottom: 1px solid rgba(255,255,255,.72); }
.folder.open .folder-list { display: block; }
@media (hover: hover) and (min-width: 901px) { .folder:hover .folder-list, .folder:focus-within .folder-list { display: block; } }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: #fff; }
.bars, .bars::before, .bars::after { display: block; width: 26px; height: 3px; background: currentColor; position: relative; margin: 0 auto; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -8px; } .bars::after { top: 8px; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; padding: 1.25rem var(--gutter); }
  .hdr-social, .hdr-action .btn-small { display: none; }
  .hdr-center { align-items: flex-start; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #141415; border-top: 1px solid var(--line); padding: 1rem var(--gutter) 2rem; }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .site-nav .nav-plain { display: block; }
  .site-nav a, .folder-btn { font-size: 1rem; line-height: 1.4; padding: .6rem 0; display: block; width: 100%; text-align: left; }
  .folder-list { position: static; padding: 0 0 0 1rem; background: none; box-shadow: none; }
  .folder-list a { border-bottom-color: var(--line); }
}

/* ---------- Page body ---------- */
main { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 1rem var(--gutter) 5rem; }
.pg-section { margin-bottom: 3rem; }
.pg-section.narrow, .prose { max-width: 46rem; }
.pg-section p, .pg-section li { max-width: 46rem; }
.pg-img { margin: 2rem 0; }
.pg-img img { max-height: 70vh; width: auto; }
.pg-img figcaption { margin-top: .9rem; font-family: var(--head); text-transform: uppercase; }
.pg-img figcaption p { margin: .2rem 0; }
.pg-img figcaption p + p { font: 400 .78rem/1.3 var(--body); letter-spacing: .08em; color: var(--muted); }
iframe { width: 100%; max-width: 46rem; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 1.5rem 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
/* Original buttons: small, outlined, rounded */
.btn {
  display: inline-block; font: 700 .8rem/1.2 var(--head); text-transform: uppercase; letter-spacing: .04em;
  padding: .85rem 1.5rem; border: 1px solid #fff; border-radius: 6px; color: #fff; background: transparent; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #fff; color: #141415; opacity: 1; }
.btn-small { padding: .55rem 1rem; font-size: .72rem; }
.pill-row .btn { background: transparent; color: #fff; padding: .7rem 1.1rem; }
.pill-row .btn:hover { background: #fff; color: #000; }

/* Home: 4-up book covers; caption fades in over the cover on hover (as on the original) */
.page-home .pg-section:first-child { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem 1.5rem; align-items: start; margin-top: 1.5rem; }
.page-home .pg-section:first-child .pg-img { margin: 0; position: relative; }
.page-home .pg-section:first-child .pg-img img { width: 100%; max-height: none; }   /* full cover, never cropped */
.page-home .pg-img figcaption {
  position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 1rem; background: rgba(0,0,0,.8); opacity: 0; transition: opacity .25s; pointer-events: none;
  font: 600 12px/1.2 var(--body); letter-spacing: 1px; text-transform: uppercase;
}
.page-home .pg-img figcaption p + p { font-size: 12px; color: #fff; margin-top: .6rem; }
.page-home .pg-img:hover figcaption, .page-home .pg-img:focus-within figcaption { opacity: 1; }
@media (hover: none) {   /* touch screens can't hover: show the caption beneath the cover instead */
  .page-home .pg-img figcaption { position: static; opacity: 1; background: none; padding: .6rem 0 0; }
}
/* About block sits on a pale grey band with dark text, edge to edge */
.page-home .about {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center;
  margin: 4rem calc(50% - 50vw) -5rem; padding: 4rem max(var(--gutter), calc(50vw - var(--max) / 2));
  background: linear-gradient(180deg, #f7f7f7, #bdbdbd); color: #141415;
}
.page-home .about .btn { color: #141415; border-color: #141415; }
.page-home .about .btn:hover { background: #141415; color: #fff; }
.page-home .about .pg-img img { width: 100%; max-height: none; }
@media (max-width: 900px) {
  .page-home .pg-section:first-child { grid-template-columns: repeat(2, 1fr); }
  .page-home .about { grid-template-columns: 1fr; }
}
body { overflow-x: hidden; }

/* Centred page intros (Media, Speaking, Events): heading, subtitle, illustration, call to action */
.intro-split { text-align: center; display: flex; flex-direction: column; align-items: center; }
.intro-split > div { display: contents; }
.intro-split h1 { margin-bottom: .4rem; }
.intro-split p { margin: .4rem auto; }
.intro-split .pg-img { order: 2; margin: 1rem 0; }
.intro-split .pg-img img { max-height: 300px; margin: 0 auto; }
.intro-split p:last-child { order: 3; }
main .pg-section a:not(.btn):not(.card-img), .prose a { color: var(--accent); }

/* Photo / cover galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin: 2rem 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Accordions (Book Reviews, Essays & OpEds) */
.acc { border-top: 1px solid var(--line); max-width: 46rem; }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary { cursor: pointer; padding: 1.1rem 0; font: 400 1.25rem/1.3 var(--head); text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 1.5rem; line-height: 1; }
.acc[open] summary::after { content: "–"; }
.acc > :not(summary) { margin: .3rem 0; }
.acc[open] { padding-bottom: 1rem; }

/* Social icons */
.social { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; gap: 1rem; }
.social a { display: block; width: 22px; height: 22px; }
.social svg { width: 100%; height: 100%; }

/* Cards (article & event lists) */
.cards { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 2.5rem; }
.card { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.card[hidden] { display: none; }
.card.no-img { grid-template-columns: 1fr; }
.card-img img { width: 100%; height: auto; background: var(--card); border: 1px solid #fff; border-radius: 2px; }   /* whole image, never cropped */
.card h3 { margin: .3rem 0 .6rem; font-size: 1.35rem; }
.card h3 a, main .pg-section .card h3 a:not(.btn) { text-decoration: none; color: #fff; }
.card .meta { font-weight: 700; color: var(--accent); }
.card .excerpt { color: var(--muted); margin: 0 0 .6rem; }
.card .more { margin: 0; font: 700 .8rem/1 var(--head); text-transform: uppercase; letter-spacing: .05em; }
.meta { font: 400 .8rem/1.4 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
@media (max-width: 640px) { .card { grid-template-columns: 1fr; gap: 1rem; } }

.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.filters input, .filters select {
  font: inherit; font-size: 1rem; color: #fff; background: #0b0b0c; border: 1px solid var(--line); padding: .6rem .8rem; min-width: 12rem;
}
.filters input { flex: 1 1 16rem; }
.filter-status { margin: 0; color: var(--muted); font-size: .9rem; }

/* Single article / event */
.item { max-width: 52rem; }
.item-back { margin: 0 0 1.5rem; font: 700 .8rem/1 var(--head); text-transform: uppercase; letter-spacing: .05em; }
.item-back a { text-decoration: none; }
.item-head h1 { margin: .4rem 0 1rem; }
.item-image { margin: 0 0 2rem; }
.item-image img { max-height: 520px; width: auto; }
.prose img { margin: 1.5rem 0; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid #fff; font-style: italic; }
.topics { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }
.topics a { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--line); padding: .3rem .6rem; text-decoration: none; }
.location { color: var(--muted); }

/* Contact form */
.contact-form { max-width: 40rem; }
.contact-form label { display: block; font: 700 .8rem/1.3 var(--head); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .35rem; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; color: #fff; background: #0b0b0c; border: 1px solid var(--line); padding: .75rem .9rem;
}
.contact-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .contact-form .row2 { grid-template-columns: 1fr; } }
.page-contact .pg-section { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.page-contact .pg-section > h1, .page-contact .pg-section > h3 { grid-column: 1 / -1; }
@media (max-width: 800px) { .page-contact .pg-section { grid-template-columns: 1fr; } }

/* Footer: name, book icon (links to Books), orange outlined buttons, orange social icons */
.site-footer { background: #000; padding: 0 var(--gutter); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 2.5rem 0; border-top: 1px solid #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
}
.footer-name { font: 400 1.6rem/1.2 var(--head); text-transform: uppercase; margin: 0; }
.footer-books img { width: 60px; height: auto; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }
.footer-social .social { margin: 0; }
.footer-social .social a { color: var(--accent); }
.credit { max-width: var(--max); margin: 0 auto; padding: 0 0 2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* Orange outlined buttons (Articles shortcuts, footer) */
.btn-accent { color: var(--accent) !important; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent); color: #000 !important; }
.article-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #fff; }
.article-bar .pill-row { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 0; }
.article-bar .btn { padding: .55rem .7rem; font-size: .72rem; }
.search-box { margin: 0; flex: 0 1 30rem; }
.search-box input { width: 100%; font: inherit; color: #fff; background: transparent; border: 1px solid #fff; padding: .7rem 1rem .7rem 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3Cpath d='M15 15l6 6' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: .8rem center; background-size: 1.1rem; }
.filters { margin-top: 1rem; }

.center { text-align: center; }
figure.center img { margin: 0 auto; }

/* Books page: full covers, large sentence-case titles, full description (as on the original) */
.books-list .card { grid-template-columns: 270px 1fr; }
.books-list .card h3 { text-transform: none; font-size: clamp(1.8rem, 3.4vw, 3rem); font-weight: 400; line-height: 1.2; }
.books-list .card .meta time { display: none; }
.books-list .card .excerpt { color: #fff; }
.books-list .card .more { text-transform: none; font: 400 1.1rem/1 var(--body); letter-spacing: 0; }
@media (max-width: 640px) { .books-list .card { grid-template-columns: 1fr; } .books-list .card-img img { max-width: 260px; } }

/* Bio page */
.bio-intro { text-align: center; max-width: 60rem; margin: 2rem auto 2.5rem; }
.bio-intro p { max-width: none; font-size: 1.35rem; }
.bio-banner { position: relative; margin: 0 calc(50% - 50vw) 3rem; }
.bio-banner img { width: 100%; max-height: 640px; object-fit: cover; }
.bio-banner-social { position: absolute; top: 1.5rem; right: 18%; }
.bio-banner-social .social a { width: 26px; height: 26px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.bio-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.bio-side { text-align: center; }
.bio-side iframe { margin: 1rem 0; }
.bio-side .btn-row { justify-content: center; }
.accent-h { color: var(--accent); font-weight: 700; margin: 0; }
@media (max-width: 800px) { .bio-split { grid-template-columns: 1fr; } .bio-banner-social { right: 1rem; } }

/* Photo carousel: three photos per view, swipe or use the arrows */
.carousel { position: relative; margin: 3rem 0; }
.car-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.car-track::-webkit-scrollbar { display: none; }
.car-track { gap: .5rem; }
/* Same height for every photo, width follows each photo's own shape, so nothing is cropped */
.slide { flex: 0 0 auto; scroll-snap-align: start; }
.slide img { height: clamp(260px, 38vw, 560px); width: auto; max-width: none; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #fff; background: rgba(0,0,0,.55); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.car-prev { left: .75rem; } .car-next { right: .75rem; }
@media (max-width: 700px) { .slide img { height: 300px; } }

/* Row of book covers at the bottom of the Bio page, each linking to its book */
.cover-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1.5rem; margin: 3rem 0 0; }
.cover-strip img { width: 100%; height: auto; }   /* whole cover */
.cover-strip { align-items: start; }
@media (max-width: 800px) { .cover-strip { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

/* Card lists use the full page width (overrides the reading-width limit on paragraphs/list items) */
.pg-section .cards > li.card, .pg-section .card p { max-width: none; }
.pg-section .card .excerpt { max-width: 60rem; }
