/* Ragunath Vasudevan – Architektur
   Tokens: Beton (Grund), Papier (Flächen), Tinte (Text), Linie, Zeichenblau (nur Interaktion). */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --beton: #e8e9e6;
  --papier: #f5f5f3;
  --tinte: #1e2227;
  --muted: #575d64;
  --linie: #bfc3c0;
  --blau: #2338c7;

  --gutter: clamp(1rem, 3vw, 2.5rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --maxw: 1680px;
  --ease: 160ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--beton);
  color: var(--tinte);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }

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

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  background: var(--tinte); color: var(--beton); padding: 0.6rem 1rem;
}
.skip:focus { top: 0.75rem; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto auto; align-items: baseline;
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: 1rem var(--gutter);
  background: var(--beton);
}
.wordmark { font-weight: 650; font-stretch: 88%; letter-spacing: -0.01em; text-decoration: none; font-size: 1.125rem; }
.site-nav ul { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); flex-wrap: wrap; }
.site-nav a, .lang { text-decoration: none; }
.site-nav a { padding-block: 0.15rem; border-bottom: 1px solid transparent; transition: color var(--ease), border-color var(--ease); }
.site-nav a:hover { color: var(--blau); }
.site-nav a[aria-current="page"] { border-bottom-color: currentColor; }
.lang { color: var(--muted); transition: color var(--ease); }
.lang:hover { color: var(--blau); }
.menu-btn {
  display: none; font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em;
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .js .menu-btn { display: block; order: 3; }
  .js .site-nav ul { display: none; }
  .site-nav { grid-column: 1 / -1; order: 4; }
  .site-nav ul { gap: 1rem; margin-top: 0.75rem; }
  .js .menu-open .site-nav ul {
    display: flex; flex-direction: column; gap: 0.25rem;
    position: fixed; inset: 3.6rem 0 0 0; z-index: 29;
    background: var(--beton); padding: 2rem var(--gutter);
  }
  .js .menu-open .site-nav a { font-size: clamp(2rem, 10vw, 3rem); font-weight: 650; font-stretch: 85%; letter-spacing: -0.02em; border: 0; }
}

main { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }


/* ---------- Startseite: 3D-Netz ---------- */
.net { position: relative; }
.net-title {
  font-size: clamp(2rem, 4.6vw, 4.4rem); line-height: 0.98; font-weight: 700; font-stretch: 84%;
  letter-spacing: -0.025em; padding-block: clamp(1.5rem, 4vw, 3rem) 0.5rem;
}
.net canvas, .net-hint, .net-legend, .net-card { display: none; }
.js .net { height: clamp(500px, calc(100svh - 7rem), 900px); }
.js .net-title { position: absolute; left: 0; top: clamp(0.25rem, 1.5vw, 1.25rem); z-index: 2; padding: 0; pointer-events: none; max-width: 9em; }
.js .net canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.js .net-hint, .js .net-legend { display: block; position: absolute; left: 0; z-index: 2; pointer-events: none; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; max-width: 24rem; transition: opacity 500ms ease; }
.js .net-hint { bottom: 2.9rem; }
.js .net-legend { bottom: 0.25rem; }
.net.touched .net-hint { opacity: 0; }
.net.has-card .net-legend { opacity: 0; }
.net.has-card .net-title { opacity: .18; transition: opacity .4s; }

.js .net-card {
  display: grid; position: absolute; z-index: 3; right: 0; top: 50%; transform: translateY(-50%);
  width: min(23rem, 38%); gap: 0.55rem; padding: 1rem 1rem 1.1rem; background: var(--papier);
  animation: card-in 240ms ease both;
}
.js .net-card[hidden] { display: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(calc(-50% + 12px)); } to { opacity: 1; transform: translateY(-50%); } }
.nc-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--beton); }
.nc-doc { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: top; background: var(--beton); border: 1px solid var(--linie); }
.nc-meta { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.nc-title { font-size: 1.25rem; font-weight: 650; font-stretch: 92%; line-height: 1.25; letter-spacing: -0.005em; }
.nc-title.long { font-size: 1.0625rem; line-height: 1.3; }
.nc-venue { color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.nc-text { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }
.nc-vers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.nc-ver { font: inherit; text-align: left; color: var(--tinte); background: none; border: 0; padding: 0; cursor: pointer; display: grid; gap: 0.35rem; }
.nc-ver img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border: 1px solid var(--linie); background: var(--beton); transition: border-color var(--ease); }
.nc-ver span { font-size: 0.875rem; line-height: 1.3; }
.nc-ver b { display: block; font-weight: 650; }
.nc-ver:hover img, .nc-ver:focus-visible img { border-color: var(--blau); }
.nc-ver:hover b { color: var(--blau); }
.nc-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.nc-ext { font-size: 0.9375rem; color: var(--muted); }
.nc-ext:hover { color: var(--blau); }
.nc-link { font-weight: 650; width: fit-content; }
.nc-link:hover { color: var(--blau); }
.nc-close { font: inherit; font-size: 0.9375rem; color: var(--muted); background: none; border: 0; padding: 0; width: fit-content; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.nc-close:hover { color: var(--blau); }
@media (max-width: 820px) {
  .js .net { height: clamp(460px, calc(100svh - 11rem), 640px); }
  .js .net-card {
    left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto;
    grid-template-columns: 6rem 1fr; column-gap: 0.9rem; row-gap: 0.25rem; align-items: start;
    animation-name: card-in-m;
  }
  .nc-img, .nc-doc { grid-row: 1 / span 5; aspect-ratio: 3 / 4; }
  .nc-doc { object-position: top; }
  .nc-text, .nc-venue { display: none; }
  .nc-meta, .nc-title, .nc-links, .nc-close, .nc-vers { grid-column: 2; }
  .js .net-card.no-img { grid-template-columns: 1fr; }
  .net-card.no-img > * { grid-column: 1; }
  .nc-title, .nc-title.long { font-size: 1rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .nc-vers { gap: 0.45rem; }
  .nc-ver img { display: none; }
  .nc-ver { border: 1px solid var(--linie); padding: 0.35rem 0.5rem; }
  @keyframes card-in-m { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .js .net-hint { bottom: 2.6rem; font-size: 0.875rem; }
  .js .net-legend { font-size: 0.875rem; }
}
.net-intro { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero-intro { grid-column: 1 / span 6; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.45; max-width: 36rem; }
@media (max-width: 800px) { .hero-intro { grid-column: 1 / -1; } }

/* ---------- Projektkacheln: drei oben, zwei unten, gleich große Bilder je Reihe ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(2rem, 4vw, 3rem) var(--gap); align-items: start; }
.tiles .card { grid-column: span 2; }
.tiles .card:nth-child(n + 4) { grid-column: span 3; }
.tiles .card:nth-child(n + 4) .card-img { aspect-ratio: 9 / 4; }
@media (max-width: 900px) {
  .tiles .card, .tiles .card:nth-child(n + 4) { grid-column: span 3; }
  .tiles .card:nth-child(5) { grid-column: span 6; }
  .tiles .card:nth-child(n + 4) .card-img { aspect-ratio: 3 / 2; }
  .tiles .card:nth-child(5) .card-img { aspect-ratio: 3 / 1; }
}
@media (max-width: 560px) {
  .tiles .card, .tiles .card:nth-child(n + 4), .tiles .card:nth-child(5) { grid-column: span 6; }
  .tiles .card:nth-child(5) .card-img { aspect-ratio: 3 / 2; }
}

/* ---------- Blöcke ---------- */
.block { margin-top: clamp(4rem, 9vw, 8rem); }
.block.tight { margin-top: clamp(2.5rem, 5vw, 4rem); }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.block-head h2, .small-h { font-size: 1.5rem; font-weight: 650; font-stretch: 90%; letter-spacing: -0.01em; line-height: 1.2; }
.small-h { font-size: 1.125rem; margin-bottom: 0.9rem; }
.more, .ext a { color: var(--tinte); }
.more:hover, .ext a:hover { color: var(--blau); }
.ext { margin-top: 1.5rem; }
.ext.rg { margin-top: 2rem; }

.card a { display: block; text-decoration: none; }
.card-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--papier); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card a:hover .card-img img, .card a:focus-visible .card-img img { transform: scale(1.03); }
.card-text { display: block; padding-top: .85rem; }
.card-title { display: block; font-size: 1.2rem; font-weight: 600; font-stretch: 92%; line-height: 1.2; }
.card-cap { display: block; margin-top: .3rem; color: var(--muted); line-height: 1.4; }
.card-cat { display: block; margin-top: .5rem; color: var(--muted); font-size: .875rem; }
.card a:hover .card-title { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Seitenkopf ---------- */
.page-head { padding-block: clamp(2rem, 6vw, 5rem) 0; }
.page-title, .project-title {
  font-size: clamp(2.6rem, 8vw, 7rem); line-height: 0.98; font-weight: 700;
  font-stretch: 84%; letter-spacing: -0.025em; overflow-wrap: anywhere;
}
.lead { margin-top: 1.5rem; max-width: 38rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.45; }

/* ---------- Projektseite ---------- */
.project-head { padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.crumb { color: var(--muted); margin-bottom: 1.25rem; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--blau); text-decoration: underline; }
.project-tag { margin-top: 1.25rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 38rem; }
.project-hero { aspect-ratio: var(--r); max-width: calc(100vh * var(--r)); width: 100%; overflow: hidden; }
.project-hero img { width: 100%; height: 100%; object-fit: cover; }

.project-body {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); row-gap: 2.5rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.facts { grid-column: 1 / span 4; align-self: start; }
.facts div { padding-block: 0.7rem; border-top: 1px solid var(--linie); }
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.prose { grid-column: 6 / -1; max-width: 40rem; }
.prose p + p { margin-top: 1.1em; }
@media (max-width: 900px) { .facts, .prose { grid-column: 1 / -1; } }

.inline { aspect-ratio: var(--r); width: 100%; max-width: var(--mw, 1366px); margin-top: clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.inline img { width: 100%; height: 100%; object-fit: cover; }

.prose-sub { margin-top: 2.2rem; margin-bottom: 0.8rem; font-size: 1.125rem; font-weight: 650; font-stretch: 90%; line-height: 1.3; }
.prose .ext { margin-top: 0.8em; }

.group-title { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 650; font-stretch: 90%; line-height: 1.2; padding-top: 0.9rem; margin-bottom: 1.25rem; border-top: 1px solid var(--linie); }

.gallery { margin-top: clamp(3rem, 7vw, 6rem); }
.g-grid { columns: 3; column-gap: var(--gap); }
@media (max-width: 900px) { .g-grid { columns: 2; } }
@media (max-width: 520px) { .g-grid { columns: 1; } }
.g-item { display: block; aspect-ratio: var(--r); margin-bottom: var(--gap); break-inside: avoid; overflow: hidden; cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--ease); }
.g-item:hover img { opacity: 0.86; }

.drawings { margin-top: clamp(3.5rem, 8vw, 7rem); }
.drawing { margin: 0 0 clamp(1.5rem, 3vw, 2.5rem); max-width: 1366px; }
.drawing a { display: block; aspect-ratio: var(--r); cursor: zoom-in; }
/* Zeichnungen haben weißen Grund: multiply lässt ihn in den Beton-Ton der Seite übergehen */
.drawing img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.drawing figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 1000px) {
  .drawings { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); column-gap: var(--gap); align-items: start; }
  .drawings .group-title { grid-column: 1 / -1; }
  .drawing.wide { grid-column: 1 / -1; order: 3; }
}

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: clamp(4rem, 9vw, 8rem); border-top: 1px solid var(--linie); }
.pager a { display: block; padding-block: 1.25rem 0.5rem; text-decoration: none; font-weight: 650; font-stretch: 92%; font-size: clamp(1.1rem, 2vw, 1.5rem); transition: color var(--ease); }
.pager a:hover { color: var(--blau); }
.pager a span { display: block; font-weight: 400; font-stretch: 100%; font-size: 0.9375rem; color: var(--muted); }
.pager a[rel="next"] { text-align: right; }

/* ---------- Forschung ---------- */
.ic { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.papers { border-bottom: 1px solid var(--linie); }
.paper {
  display: grid; grid-template-columns: 5rem minmax(0, 1fr); column-gap: var(--gap);
  padding-block: 1.6rem; border-top: 1px solid var(--linie); scroll-margin-top: 5rem;
}
.paper:target { background: var(--papier); }
.paper-year { color: var(--muted); font-variant-numeric: tabular-nums; }
.paper h3 { font-size: 1.1875rem; font-weight: 650; font-stretch: 94%; line-height: 1.3; letter-spacing: -0.005em; max-width: 42rem; }
.paper-main > p { margin-top: 0.5rem; color: var(--muted); max-width: 40rem; }
.versions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 1rem var(--gap); margin-top: 1.25rem; }
.ver { scroll-margin-top: 5rem; }
.ver:target .ver-link { outline: 2px solid var(--blau); outline-offset: 4px; }
.ver-link { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 0.9rem; text-decoration: none; align-items: start; }
.ver-thumb { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: var(--papier); border: 1px solid var(--linie); }
.ver-text { display: grid; gap: 0.2rem; align-content: start; min-width: 0; }
.ver-kind { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.9375rem; }
.ver-title { font-weight: 600; font-stretch: 94%; line-height: 1.3; }
.ver-link:hover .ver-title, .ver-link:focus-visible .ver-title { color: var(--blau); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.ver-venue, .ver-authors { color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }
@media (max-width: 900px) {
  .paper { grid-template-columns: 4rem minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .paper { grid-template-columns: 1fr; row-gap: 0.4rem; }
  .ver-link { grid-template-columns: 4.5rem minmax(0, 1fr); }
}

/* ---------- Über, Kontakt ---------- */
.about { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); row-gap: 2.5rem; align-items: start; }
.portrait { grid-column: 1 / span 4; position: sticky; top: 5rem; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--tinte); }
.about-main { grid-column: 6 / -1; max-width: 44rem; }
.about-main .prose { grid-column: auto; max-width: none; }
.about-main .prose p { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.55; }
.cv-block { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
@media (max-width: 900px) {
  .portrait { grid-column: 1 / -1; position: static; width: min(100%, 22rem); }
  .about-main { grid-column: 1 / -1; }
}
.cv li { display: grid; grid-template-columns: 7.5rem 1fr; column-gap: 1rem; padding-block: 0.7rem; border-top: 1px solid var(--linie); }
.cv-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv li > span:last-child { line-height: 1.45; }
.cv-block .cv { border-bottom: 1px solid var(--linie); }
@media (max-width: 480px) { .cv li { grid-template-columns: 1fr; } }

.contact-list div { display: grid; grid-template-columns: minmax(7rem, 14rem) 1fr; column-gap: var(--gap); padding-block: 1rem; border-top: 1px solid var(--linie); }
.contact-list div:last-child { border-bottom: 1px solid var(--linie); }
.contact-list dt { color: var(--muted); }
.contact-list dd { font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 600; font-stretch: 92%; overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--blau); text-decoration: underline; }
@media (max-width: 520px) { .contact-list div { grid-template-columns: 1fr; } }

/* ---------- Fußzeile ---------- */
.site-footer { max-width: var(--maxw); margin: clamp(5rem, 10vw, 9rem) auto 0; padding: 1.5rem var(--gutter) 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--gap); border-top: 1px solid var(--linie); padding-top: 1.25rem; }
.footer-name { font-weight: 650; font-stretch: 90%; }
.footer-name span { font-weight: 400; color: var(--muted); }
.footer-links { display: grid; gap: 0.25rem; align-content: start; }
.footer-links a { text-decoration: none; transition: color var(--ease); }
.footer-links a:hover { color: var(--blau); text-decoration: underline; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Großansicht ---------- */
dialog#lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: transparent; color: var(--tinte);
}
dialog#lightbox::backdrop { background: var(--beton); }
.lb { display: grid; grid-template-rows: auto 1fr; height: 100%; padding: 1rem var(--gutter) 1.25rem; position: relative; }
.lb-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; }
.lb-count { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.lb-bar button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0.25rem 0; cursor: pointer; flex: none;
  text-decoration: underline; text-underline-offset: 0.2em;
}
.lb-bar button:hover { color: var(--blau); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding-top: 1rem; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 5.5rem); max-height: calc(100dvh - 5.5rem); width: auto; height: auto; object-fit: contain; }
dialog#lightbox.zoomable .lb-stage img { cursor: zoom-in; }
dialog#lightbox.zoomed .lb-stage { overflow: auto; place-items: start center; overscroll-behavior: contain; }
dialog#lightbox.zoomed .lb-stage img { max-width: none; max-height: none; width: clamp(900px, 100%, 1200px); cursor: zoom-out; }

.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; padding: 0; border: 0; border-radius: 50%;
  background: rgba(245, 245, 243, 0.82); color: var(--tinte); cursor: pointer; transition: background var(--ease), color var(--ease);
}
.lb-arrow svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-arrow:hover, .lb-arrow:focus-visible { background: var(--papier); color: var(--blau); }
.lb-prev { left: 0; }
.lb-next { right: 0; }
dialog#lightbox.single .lb-arrow { display: none; }
@media (hover: none) { .lb-arrow { display: none; } }  /* Touch: Wischen statt Pfeile */

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

/* ---------- Impressum, Datenschutz ---------- */
.legal { max-width: 44rem; }
.legal section + section { margin-top: 2.2rem; }
.legal h2 { font-size: 1.125rem; font-weight: 650; font-stretch: 90%; line-height: 1.3; margin-bottom: 0.6rem; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 0.8em; }
.legal ul { padding-left: 1.2rem; list-style: disc; }
.legal li + li { margin-top: 0.25rem; }
.legal a { text-decoration: underline; text-underline-offset: 0.2em; }
.legal a:hover { color: var(--blau); }
.legal-date { margin-top: 2.2rem; color: var(--muted); }


/* ---------- Seiten der Publikationen ---------- */
.pages { margin-top: 1.1rem; }
.pages-head { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.6rem; }
.pages-head span { color: var(--muted); font-weight: 400; }
.pages-rg { margin-left: 0.9rem; font-weight: 400; }
.pages-rg:hover { color: var(--blau); }
.versions.has-pages { grid-template-columns: 1fr; gap: 2rem; }
.versions.has-pages .pg-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.6rem; align-items: start; }
.pg { position: relative; display: block; aspect-ratio: var(--r); background: var(--papier); box-shadow: 0 0 0 1px var(--linie); cursor: zoom-in; overflow: hidden; }
.pg img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity var(--ease); }
.pg:hover img, .pg:focus-visible img { opacity: 0.82; }
.pg:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
.pg-n { position: absolute; right: 0.25rem; bottom: 0.2rem; font-size: 0.75rem; line-height: 1; padding: 0.15rem 0.3rem; background: rgba(245, 245, 243, 0.9); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .pg-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 0.45rem; } }
