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

/* Schriften wie auf den übrigen Seiten von ragunath.net: Jost (Text und Titel), DM Mono (Menü, kleine Zeilen) */
@font-face { font-family: "Jost"; src: url("fonts/jost-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Jost"; src: url("fonts/jost-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Kopfzeile: dieselben Schriften wie auf den übrigen Seiten von ragunath.net (Jost für den Namen, DM Mono für Menü und Sprache) */
@font-face {
  font-family: "Jost";
  src: url("fonts/jost-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/dm-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Standard ist die dunkle Fassung wie auf der Startseite von ragunath.net. Sie hängt bewusst an keinem Attribut,
   das ein Fremdsystem (z. B. eine Vorschau) umschalten könnte. Die helle Fassung gibt es nur mit data-look="light". */
:root {
  color-scheme: dark;
  --beton: #353432;   /* wie auf den übrigen Seiten von ragunath.net */
  --papier: #2b2a28;
  --tinte: #e9e4d8;
  --muted: #b2ab9b;
  --linie: #57534c;
  --blau: #8fa5ff;
  --papier-a82: rgba(43, 42, 40, 0.86);
  --papier-a90: rgba(43, 42, 40, 0.92);
  /* Farben des 3D-Netzes (RGB-Tripel, von network.js gelesen) */
  --net-ink: 233, 228, 216;
  --net-muted: 178, 171, 155;
  --net-blue: 143, 165, 255;
  --net-bg: 53, 52, 50;
  --net-paper: 43, 42, 40;
  --net-on-icon: 15, 14, 13;
  --net-dark: 1;
  /* Kopfzeile und Hintergrund wie auf den anderen Startseiten */
  --akzent: #e2953f;
  --tex-top: 0.16;
  --tex-foot: 0.1;

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

/* Helle Fassung (SITE["theme"] = "light"): Beton und Papier wie auf vr-labs.com */
:root[data-look="light"] {
  color-scheme: light;
  --beton: #e8e9e6;
  --papier: #f5f5f3;
  --tinte: #1e2227;
  --muted: #575d64;
  --linie: #bfc3c0;
  --blau: #2338c7;
  --papier-a82: rgba(245, 245, 243, 0.82);
  --papier-a90: rgba(245, 245, 243, 0.9);
  --net-ink: 30, 34, 39;
  --net-muted: 87, 93, 100;
  --net-blue: 35, 56, 199;
  --net-bg: 232, 233, 230;
  --net-paper: 245, 245, 243;
  --net-on-icon: 245, 245, 243;
  --net-dark: 0;
  --akzent: #2338c7;
  --tex-top: 0;
  --tex-foot: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body {
  position: relative;
  margin: 0;
  background: var(--beton);
  color: var(--tinte);
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  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; }

/* ---------- Hintergrund: Textur wie auf der Startseite (oben, nach unten ausgeblendet; unten in der Fußzeile) ---------- */
body::before, body::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 0; pointer-events: none;
  height: clamp(520px, 76svh, 820px);
}
body::before {
  background: url("texture.jpg") center / cover; filter: invert(1); opacity: var(--tex-top);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 100%);
}
body::after { background: linear-gradient(90deg, rgba(53, 52, 50, 0.8) 0%, rgba(53, 52, 50, 0.4) 50%, rgba(53, 52, 50, 0) 100%); opacity: calc(var(--tex-top) * 100); }
main, .site-footer { position: relative; z-index: 1; }
/* Kopfzeile bleibt beim Scrollen oben stehen (wie auf den übrigen Seiten von ragunath.net) */
html { scroll-padding-top: 130px; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--beton); border-image: conic-gradient(var(--beton) 0 0) fill 0 / / 0 100vmax; }

/* ---------- Kopfzeile (Maße, Schriften und Lage wie auf den anderen Startseiten) ---------- */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  max-width: var(--maxw); margin-inline: auto; padding: 24px var(--gutter);
}
.wordmark { font-family: "Jost", "Helvetica Neue", system-ui, sans-serif; font-size: 22px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.5; text-decoration: none; color: var(--tinte); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 28px; }
.site-nav a, .subnav a, .langs a, .langs span {
  font-family: "DM Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; line-height: 1.5;
}
.site-nav a { display: inline-block; padding: 14px 0; color: var(--tinte); transition: color var(--ease); }
.site-nav a:hover, .subnav a:hover, .langs a:hover { color: var(--akzent); }
.site-nav a[aria-current="page"], .subnav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--akzent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.langs { display: flex; gap: 8px; }
.langs a, .langs span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border-bottom: 2px solid transparent; color: #8f887a; transition: color var(--ease); }
.langs [aria-current] { color: var(--tinte); border-bottom-color: var(--akzent); }
.subnav { flex: 0 0 100%; display: flex; justify-content: flex-end; gap: 0 24px; margin-top: -14px; }
/* Breite Bildschirme: Unterpunkte mittig unter „Architektur & Design“ */
.site-nav li.has-sub { position: relative; }
.subnav-d { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); flex: none; margin-top: -6px; white-space: nowrap; }
.subnav-m { display: none; }
.site-header.with-sub { padding-bottom: 44px; }
.subnav a { display: inline-block; padding: 6px 0; font-size: 11px; color: var(--muted); }
.menu-btn {
  display: none; font-family: "DM Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tinte); background: none; border: 0; padding: 0 4px; min-height: 44px; cursor: pointer;
}

@media (max-width: 760px) {
  .site-header { padding-block: 12px; row-gap: 0; }
  .js .menu-btn { display: block; order: 3; }
  .js .site-nav ul { display: none; }
  .site-nav { order: 5; flex: 0 0 100%; }
  .site-nav ul { gap: 0 20px; }
  .subnav { order: 6; justify-content: flex-start; margin-top: 0; }
  .subnav-d { display: none; }
  .subnav-m { display: flex; }
  .site-header.with-sub { padding-bottom: 12px; }
  .menu-open .subnav { visibility: hidden; }
  .js .menu-open .site-nav ul {
    display: flex; flex-direction: column; gap: 0.25rem;
    position: fixed; inset: 4.5rem 0 0 0; z-index: 29;
    background: var(--beton); padding: 2rem var(--gutter);
  }
  .js .menu-open .site-nav a { font-family: "Jost", system-ui, sans-serif; font-size: clamp(2rem, 10vw, 3rem); font-weight: 400; letter-spacing: -0.02em; text-transform: none; }
}

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: 300;
  letter-spacing: -0.02em; 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); }
/* Publikationen: ganze Seite zeigen (Titelseiten haben die Angaben oft in der unteren Hälfte) */
.nc-doc { display: block; height: clamp(200px, 32vh, 330px); width: auto; max-width: 100%; margin-inline: auto; object-fit: contain; background: #fff; 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: 400; 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: 3 / 4; object-fit: contain; 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: 400; }
.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: 400; 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 { width: 100%; height: auto; margin: 0; }
  .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: 400; 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: 400; 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: 300; letter-spacing: -0.02em; 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: 400; line-height: 1.3; }
.prose .ext { margin-top: 0.8em; }

.group-title { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 400; 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: 400; 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-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: 400; 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: 400; 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: 400; 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 { margin-top: clamp(5rem, 10vw, 9rem); }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 360px; z-index: -1; pointer-events: none;
  background: url("texture.jpg") center / cover; filter: invert(1); opacity: var(--tex-foot);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 100%);
}
.footer-in { max-width: var(--maxw); margin-inline: auto; 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: 400; }
.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: var(--papier-a82); 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: 400; 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: 400; 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: var(--papier-a90); 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; } }
