/* Runde 6: one size for text, one for statements, black on white, 21px rhythm, 12 columns with a 20px gutter. */
@font-face {
	font-family: Inter;
	src: url(../fonts/InterVariable.woff2) format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
/* the true italic of the same release (Inter 4.1), so <i> and <em> are not a slanted roman */
@font-face {
	font-family: Inter;
	src: url(../fonts/InterVariable-Italic.woff2) format("woff2");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--ink: #000000;
	--grey: #767676;
	--ground: #ffffff;
	--font: Inter, ui-sans-serif, system-ui, sans-serif;
	--track: -0.02em;
	--gutter: 20px;
	--line: 21px;
	--head: 47px; /* site.js measures the sticky header and jump links, these are the one-line values */
	--sticky: 47px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--sticky) + 21px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	padding: 16px var(--gutter) 63px;
	background: var(--ground);
	color: var(--ink);
	font: 400 16px/var(--line) var(--font);
	font-optical-sizing: auto;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
p { margin: 0; }
h1 { margin: 0; font-weight: 400; }
strong, b { font-weight: 400; }
img, video { display: block; max-width: 100%; }
figure { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.grey { color: var(--grey); }
.on, .u, .prose a, .prose-inline a { text-decoration: underline; text-underline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 4px; background: var(--ground); z-index: 11; }

/* frame: the header stays on top, its ground reaches over the body padding */
.top { display: flex; justify-content: space-between; gap: var(--gutter); flex-wrap: wrap; position: sticky; top: 0; z-index: 10; margin: -16px calc(-1 * var(--gutter)) 0; padding: 16px var(--gutter) 10px; background: var(--ground); }
.top nav { display: flex; gap: var(--gutter); flex-wrap: wrap; }

/* statements and headlines */
.big { margin: 84px 0 0; max-width: 24em; font-size: 46px; font-weight: 400; line-height: 53px; letter-spacing: var(--track); text-wrap: pretty; }
.big.flush { margin: 0; text-wrap: balance; }
.big p { margin: 0; }
.big a, .mail a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.sub { margin-top: 10px; }

/* grid */
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.g.first { margin-top: 84px; }
.g.block { margin-top: 63px; }
.txt { grid-column: 1 / span 6; }
.facts { grid-column: 8 / span 5; }
.col { grid-column: 4 / span 6; }
.side { grid-column: 1 / span 3; color: var(--grey); }
.side a { color: var(--grey); }
.source { margin-top: 42px; }

/* index and view bar */
.bar { display: flex; justify-content: space-between; gap: 8px var(--gutter); flex-wrap: wrap; }
.statement-bar { margin-top: 105px; }
.bar.first { margin: 84px 0 21px; }
.filters { display: flex; gap: var(--gutter); flex-wrap: wrap; }
.idx { columns: 4; column-gap: var(--gutter); margin-top: 21px; }
.idx > div { padding-bottom: 42px; }
.idx a { display: block; padding-left: calc(var(--depth, 0) * 21px); }
.idx .keep { break-inside: avoid; }
.idx .label { display: block; color: var(--grey); margin-bottom: 21px; }
#view > .row, #view > .li.head { margin-top: 42px; }

/* grids of works */
a.w:hover { text-decoration: none; }
a.w:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.w { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.cap { display: flex; justify-content: space-between; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 42px var(--gutter); align-items: flex-start; }
/* a title wider than its image stretches the card: the image fills it instead of distorting */
.row .w img { height: 240px; width: auto; object-fit: cover; }
.li { display: grid; grid-template-columns: 140px minmax(0, 4fr) 80px minmax(0, 2fr) minmax(0, 4fr); column-gap: var(--gutter); align-items: end; padding: 10px 0; border-top: 1px solid var(--ink); }
.li.head { border-top: 0; padding-top: 0; }
.th { height: 64px; display: flex; align-items: flex-end; }
.th img { max-height: 64px; max-width: 140px; width: auto; height: auto; }
.end { border-top: 1px solid var(--ink); }
.li .t { padding-left: calc(var(--depth, 0) * 21px); }

/* work and exhibition pages */
.media { margin-top: 63px; display: flex; flex-direction: column; gap: 42px; }
.media:empty { display: none; }
.hero img { max-height: 720px; width: auto; height: auto; }
.hero video { max-height: 720px; width: 100%; background: var(--ink); }
.embed { width: 100%; max-width: 1280px; }
.embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.more { display: flex; flex-wrap: wrap; gap: 42px var(--gutter); align-items: flex-end; }
.more img { height: 320px; width: auto; }
.facts-row { margin-top: 84px; align-items: start; }
.dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); column-gap: var(--gutter); row-gap: var(--line); margin: 0; }
.dl dt { color: var(--grey); }
.dl dd { margin: 0; }
/* a web address stays on one line and ends in … where it doesn't fit */
.url { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.shown { margin-top: 84px; }
.shown .grey { margin-bottom: 21px; }
.pager { display: flex; justify-content: space-between; gap: var(--gutter); margin-top: 105px; }
/* on a short page the pager sits on the window's bottom line, as far from it as the header from the top */
body:has(main > .pager) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: 16px; }
body:has(main > .pager) main { flex: 1 0 auto; display: flex; flex-direction: column; }
main > .pager { margin-top: auto; padding-top: 105px; }

/* zoom view: the page's own white ground and black type instead of PhotoSwipe's dark default */
.zoom { display: block; cursor: zoom-in; }
.pswp {
	--pswp-bg: var(--ground);
	--pswp-placeholder-bg: #f2f2f2;
	--pswp-icon-color: var(--ink);
	--pswp-icon-color-secondary: var(--ground);
	--pswp-icon-stroke-color: var(--ground);
	--pswp-error-text-color: var(--ink);
	font-family: var(--font);
}
.pswp__counter { color: var(--ink); text-shadow: none; font-size: 16px; line-height: 21px; }
.pswp__caption { position: absolute; left: 20px; right: 20px; bottom: 16px; color: var(--ink); font-size: 16px; line-height: 21px; }

/* running text */
.prose { max-width: 36em; }
.prose > * { margin: 0 0 var(--line); }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { font: inherit; }
.prose img { height: auto; }
.prose ul, .prose ol { padding-left: 1.2em; }
.page { margin-top: 84px; }

/* CV */
.sublinks { display: flex; gap: var(--gutter); flex-wrap: wrap; margin-top: 42px; }
.sublinks.below { margin: 0 0 21px; }
/* the CV's jump links stay under the header */
.sublinks:not(.below) { position: sticky; top: var(--head); z-index: 9; margin: 32px calc(-1 * var(--gutter)) 0; padding: 10px var(--gutter); background: var(--ground); }
.readmore { margin-top: 21px; }
.readmore summary { list-style: none; cursor: pointer; width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.readmore summary::-webkit-details-marker { display: none; }
.readmore .prose { margin-top: 21px; }
.sec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: 84px; }
.lab { grid-column: 1 / span 3; color: var(--grey); }
.lst { grid-column: 4 / span 9; }
.r { display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: var(--gutter); }
.r.gap { margin-top: 10px; }
.r.sub { margin-top: var(--line); }
.r.sub:first-child { margin-top: 0; }

/* texts */
.tx { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-top: 21px; margin-bottom: 42px; }
.tx .a { grid-column: 1 / span 3; }
.tx .t { grid-column: 4 / span 9; margin: 0; max-width: 20em; text-wrap: balance; }

/* links */
.lk { display: block; padding: 11px 0; border-top: 1px solid var(--ink); }
.lk:last-child { border-bottom: 1px solid var(--ink); }
.linklist img { width: 100%; height: auto; }

/* contact */
.kdl { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--line); margin: 105px 0 0; }
.kdl dt { grid-column: 1 / span 3; color: var(--grey); }
.kdl dd { grid-column: 4 / span 9; margin: 0; }
.listmonk-form { display: flex; flex-direction: column; gap: 8px; max-width: 24em; }
.listmonk-form label { display: flex; flex-direction: column; }
.listmonk-form input { font: inherit; color: inherit; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 4px 0; background: none; min-height: 44px; }
.listmonk-form button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: flex; align-items: center; align-self: flex-start; }

/* toggles: a short crossfade instead of a page load, dimmed only if the server takes a moment */
[data-swap][aria-busy="true"] { opacity: 0.4; transition: opacity 150ms 120ms; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
@media (prefers-reduced-motion: reduce) {
	::view-transition-old(root), ::view-transition-new(root) { animation: none; }
	[data-swap][aria-busy="true"] { transition: none; }
}

@media (max-width: 1100px) {
	.idx { columns: 2; }
}
@media (max-width: 900px) {
	.txt, .facts, .col, .side, .lab, .lst, .tx .a, .tx .t, .kdl dt, .kdl dd { grid-column: 1 / -1; }
	.g { row-gap: 42px; }
	.dl { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
	.dl dd { margin-bottom: 17px; }
	.lab { margin-bottom: 21px; }
	.linklist img { width: 120px; }
	.r { grid-template-columns: 88px minmax(0, 1fr); } /* fits a range like 2024–2025 on one line */
	.li { grid-template-columns: 96px minmax(0, 1fr) 56px; }
	.li .x { display: none; }
	.th img { max-width: 100%; }
	.kdl { row-gap: 4px; }
	.kdl dd { margin-bottom: 17px; }
}
@media (max-width: 640px) {
	.big { font-size: 30px; line-height: 36px; }
	.idx { columns: 1; }
	.row .w img, .more img { height: auto; width: 100%; }
	/* the sticky bars stay one line each: tighter nav, jump links scroll sideways */
	.top { row-gap: 8px; }
	.top nav { column-gap: 12px; }
	.top nav a[href$="#newsletter"] { display: none; } /* six links don't fit; Kontakt opens on the newsletter form */
	.sublinks:not(.below) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
	.sublinks:not(.below)::-webkit-scrollbar { display: none; }
	/* view and group links wrap like a line of text, balanced, so no group stands alone */
	.filters { display: block; text-wrap: balance; }
	.filters > * { margin-right: 8px; }
	.filters > a { white-space: nowrap; }
}
