/* juergennefzger.com — one stylesheet, mobile first */
:root {
  --bg: #ffffff;
  --fg: #1c1c1c;
  --muted: #7a7a7a;
  --faint: #a8a8a8;
  --line: #e6e6e6;
  --gutter: 16px;
  --max: 1240px;
  --text: 40rem;
  --header-h: 56px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (min-width: 760px) { :root { --gutter: 32px; --header-h: 72px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #000; }
h1, h2, h3 { font-weight: 400; line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }
em { font-style: italic; }
:focus-visible { outline: 2px solid #1c1c1c; outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
}
.wordmark {
  font-size: 19px; letter-spacing: .09em; text-transform: uppercase; text-decoration: none; color: #2a2a2a;
  white-space: nowrap; font-weight: 400;
}
.wordmark span { color: var(--faint); font-weight: 300; margin-right: .25em; }
@media (min-width: 760px) { .wordmark { font-size: 22px; } }

.menu-toggle {
  font: inherit; font-size: 15px; background: none; border: 0; padding: 12px 0 12px 12px; margin-right: -2px;
  color: var(--fg); cursor: pointer; position: relative; z-index: 60;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: #555; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #000; }
.site-nav a[aria-current="page"] { text-decoration: underline; }

@media (max-width: 759px) {
  .site-nav {
    position: fixed; inset: 0; background: #fff; z-index: 55;
    display: flex; align-items: center; padding: var(--gutter);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  .site-nav ul { display: grid; gap: 6px; }
  .site-nav a { font-size: 30px; line-height: 1.4; color: #222; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-nav { opacity: 1; visibility: visible; }
}
@media (min-width: 760px) {
  .menu-toggle { display: none; }
  .site-nav ul { display: flex; gap: clamp(18px, 3vw, 40px); }
  .site-nav a { font-size: 14px; letter-spacing: .02em; padding: 8px 0; }
}

main { padding: 0 var(--gutter); max-width: var(--max); margin: 0 auto; }
.site-footer { max-width: var(--max); margin: 96px auto 0; padding: 24px var(--gutter) 40px; color: var(--muted); font-size: 13px; }
.site-footer p { margin: 0; }

/* ---------- common ---------- */
.page-head { padding: 28px 0 28px; }
@media (min-width: 760px) { .page-head { padding: 48px 0 48px; } }
.page-head h1, .series-head h1 { font-size: 28px; letter-spacing: -.005em; }
@media (min-width: 760px) { .page-head h1, .series-head h1 { font-size: 34px; } }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.section-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.prose { max-width: var(--text); font-size: 16px; }
@media (min-width: 760px) { .prose { font-size: 17px; } }

details.more summary { list-style: none; cursor: pointer; color: var(--muted); display: inline-block; margin-bottom: 1em; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary:hover { color: #000; }
details.more summary span { text-decoration: underline; text-underline-offset: 3px; }
details.more .more-close, details.more[open] .more-open { display: none; }
details.more[open] .more-close { display: inline; }
details.more[open] summary { order: 2; }
details.more[open] { display: flex; flex-direction: column; }

/* ---------- home ---------- */
.hero { margin: 8px calc(-1 * var(--gutter)) 0; }
@media (min-width: 760px) { .hero { margin: 16px 0 0; } }
.hero-img { width: 100%; max-height: calc(100svh - var(--header-h) - 80px); object-fit: contain; margin: 0 auto; }
.hero-caption { color: var(--muted); font-size: 14px; padding: 10px var(--gutter) 0; }
@media (min-width: 760px) { .hero-caption { padding: 12px 0 0; text-align: center; } }
.hero-caption a { color: var(--fg); text-decoration: none; }
.hero-caption a:hover { text-decoration: underline; }
.index { margin-top: 64px; }
@media (min-width: 760px) { .index { margin-top: 112px; } }

/* ---------- series grid ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px 20px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 56px 32px; } }
.card a { text-decoration: none; display: block; }
.card-img { display: block; aspect-ratio: 5 / 4; overflow: hidden; background: #f3f3f3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.card a:hover .card-img img { transform: scale(1.02); }
.card-title { display: block; margin-top: 12px; font-size: 16px; }
.card-meta { display: block; color: var(--muted); font-size: 14px; }

/* ---------- series page ---------- */
.series-head { padding: 28px 0 20px; }
@media (min-width: 760px) { .series-head { padding: 56px 0 28px; } }
.count { color: var(--faint); }
.series > .prose { margin-bottom: 48px; }
.plates { display: grid; gap: 40px; margin: 0 calc(-1 * var(--gutter)); }
@media (min-width: 760px) { .plates { gap: 14vh; margin: 72px 0 0; } }
.plate { margin: 0; }
.plate-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.plate img { margin: 0 auto; }
@media (min-width: 760px) {
  .plate img { max-height: calc(100vh - var(--header-h) - 64px); width: auto; }
}
@media (max-width: 759px) {
  .plate.portrait img { width: calc(100% - 2 * var(--gutter)); }
}
.chapter { margin-top: 72px; }
.chapter:first-of-type { margin-top: 24px; }
.chapter-head { margin-bottom: 40px; }
.chapter-head h2 { font-size: 20px; margin-bottom: 12px; }
@media (min-width: 760px) { .chapter { margin-top: 18vh; } }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 96px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }
.pager a { text-decoration: none; }
.pager a span { display: block; color: var(--muted); font-size: 13px; }
.pager .next { text-align: right; }
.pager .all { grid-column: 1 / -1; grid-row: 2; text-align: center; color: var(--muted); padding-top: 8px; }
@media (min-width: 760px) {
  .pager { grid-template-columns: 1fr auto 1fr; align-items: end; }
  .pager .all { grid-column: 2; grid-row: 1; padding: 0; }
}

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; background: #fff; display: none; touch-action: pan-y; }
.lb.open { display: block; }
.lb-stage { position: absolute; inset: 48px 0 48px; display: flex; align-items: center; justify-content: center; }
@media (min-width: 760px) { .lb-stage { inset: 56px 72px; } }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.lb button { position: absolute; background: none; border: 0; font: inherit; color: #333; cursor: pointer; padding: 14px; }
.lb button:hover { color: #000; }
.lb-close { top: 0; right: 4px; font-size: 15px; }
.lb-count { position: absolute; top: 14px; left: var(--gutter); font-size: 14px; color: var(--muted); }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 28px; line-height: 1; }
.lb-prev { left: 4px; } .lb-next { right: 4px; }
@media (max-width: 759px) { .lb-prev, .lb-next { top: auto; bottom: 0; transform: none; } }
body.lb-on { overflow: hidden; }

/* ---------- films ---------- */
.films { display: grid; gap: 96px; }
.film header { margin-bottom: 16px; }
.film h2 { font-size: 22px; }
.embed { position: relative; aspect-ratio: 16 / 9; background: #111; margin: 0 calc(-1 * var(--gutter)) 24px; }
@media (min-width: 760px) { .embed { margin: 0 0 28px; } }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- books ---------- */
.books { display: grid; gap: 80px; }
.book { display: grid; gap: 24px; }
@media (min-width: 860px) { .book { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; } }
.book-cover img { width: 100%; max-width: 480px; }
.book h2 { font-size: 22px; }
.book h2 .sub { display: block; color: var(--muted); font-size: 16px; margin-top: 2px; }
.details { list-style: none; padding: 0; margin: 16px 0; color: #555; font-size: 14px; line-height: 1.7; }
.book-links a { font-size: 15px; }

/* ---------- news ---------- */
.news { display: grid; gap: 0; }
.news-item { display: grid; gap: 16px; padding: 32px 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .news-item { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding: 40px 0; } }
.news-img img { max-width: 240px; }
.news-body { max-width: var(--text); font-size: 15px; }
.news-body h2 { font-size: 18px; margin-bottom: 10px; }
.news-body h2 a { text-decoration: none; }
.news-body h2 a:hover { text-decoration: underline; }
.news-body p { margin: 0 0 .35em; }

/* ---------- bio ---------- */
.bio { display: grid; gap: 32px; }
@media (min-width: 900px) { .bio { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; } }
.bio-img { margin: 0; }
.bio-img img { max-width: 320px; }
.cv-lists { margin-top: 56px; border-top: 1px solid var(--line); max-width: 52rem; }
.cv { border-bottom: 1px solid var(--line); }
.cv summary { cursor: pointer; padding: 16px 0; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.cv summary::-webkit-details-marker { display: none; }
.cv summary::after { content: "+"; color: var(--muted); }
.cv[open] summary::after { content: "–"; }
.cv summary .n { color: var(--faint); font-size: 13px; margin-left: auto; padding-top: 2px; }
.cv ul { list-style: none; margin: 0; padding: 0 0 24px; font-size: 14px; color: #444; }
.cv li { padding: 3px 0; }

/* ---------- contact ---------- */
.contact { display: grid; gap: 40px; }
@media (min-width: 760px) { .contact { grid-template-columns: 1fr 1fr; gap: 64px; } }
.contact h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.contact .big { font-size: 19px; }
.legal { margin-top: 64px; color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* the menu overlay must not be clipped by the header's blur effect */
body.nav-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
body.nav-open .wordmark { position: relative; z-index: 60; }

/* ---------- captions ---------- */
.plate figcaption {
  font-size: 13px; line-height: 1.45; color: var(--muted);
  padding: 10px var(--gutter) 0; text-align: left;
}
@media (min-width: 760px) {
  .plate figcaption { padding: 12px 0 0; text-align: center; font-size: 13.5px; }
}
.lb-caption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 14px 64px calc(14px + env(safe-area-inset-bottom, 0px));
  text-align: center; font-size: 13.5px; color: var(--muted);
}
.lb-caption:empty { display: none; }
.lb-stage { bottom: 64px; }
@media (min-width: 760px) { .lb-stage { bottom: 64px; } }
@media (min-width: 760px) { .news-item.no-img .news-body { grid-column: 2; } }

/* ---------- groups of series (e.g. La Loi du Sol) ---------- */
.crumb { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.subnav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 14px 0 0; font-size: 14px; }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.subnav a { color: var(--muted); text-decoration: none; }
.subnav a:hover, .subnav a[aria-current="page"] { color: var(--fg); }
.subnav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.subnav-title { color: var(--fg) !important; }
.subnav-title::after { content: "/"; margin-left: 18px; color: var(--faint); }
@media (max-width: 759px) {
  .subnav { margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter) 0; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .subnav ul { flex-wrap: nowrap; }
  .subnav::-webkit-scrollbar { display: none; }
}
.group-cards { margin-top: 48px; }
.card-img.portrait { aspect-ratio: 4 / 5; }
/* thumbnails keep their own format; a vertical one is narrowed so that its surface
   (width x height) equals that of a horizontal one */
.card-img.portrait { aspect-ratio: auto; width: calc(var(--w, 1) * 100%); }
.card-img.portrait img { height: auto; }
.group-cards .card-img { aspect-ratio: auto; height: auto; width: calc(var(--w, 1) * 100%); }
.group-cards .card-img img { width: 100%; height: auto; }
/* wide screens: one row, equal surfaces, images aligned on their bottom edge */
@media (min-width: 1000px) {
  .group-cards { display: flex; gap: 28px; align-items: flex-end; }
  .group-cards .card { flex: var(--sr) 1 0; min-width: 0; }
  .group-cards .card-img { width: 100%; }
}
/* panoramic series: the thumbnail keeps the whole panorama and spans two columns */
.card-img.pano { aspect-ratio: auto; }
.card-img.pano img { height: auto; }
@media (min-width: 560px) { .cards:not(.group-cards) .card-pano { grid-column: span 2; } }

/* ---------- English / French switch ---------- */
.lang-switch { display: flex; gap: 2px; margin: 0 0 14px; font-size: 13px; }
.lang-switch button {
  font: inherit; letter-spacing: .04em; background: none; border: 0; padding: 4px 0; margin-right: 14px;
  color: var(--faint); cursor: pointer; text-decoration: none;
}
.lang-switch button:hover { color: var(--fg); }
.lang-switch button[aria-pressed="true"] { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }

/* tighter running text */
.prose { line-height: 1.55; }
.prose p { margin: 0 0 .6em; }
.prose p:last-child { margin-bottom: 0; }
.prose details.more summary { margin: .2em 0 .6em; }

/* tighter running text */
.prose { line-height: 1.55; }
.prose p { margin: 0 0 .6em; }
.prose p:last-child { margin-bottom: 0; }
details.more summary { margin: .2em 0 .6em; }
.series > .prose, .series > .bilingual { margin-bottom: 40px; }
