/* ==========================================================================
   hendrikdettmer.de
   Ein Stylesheet. Keine Abhängigkeiten, keine externen Schriften, kein JS.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
	color-scheme: light dark;

	--bg: #f6f4ef;
	--surface: #fffdf9;
	--surface-2: #ece8df;
	--text: #14171c;
	--muted: #5a636e;
	--line: #ded9cf;
	--accent: #0a5f5a;
	--on-accent: #ffffff;
	--accent-soft: #dcebe7;
	--shadow: 0 1px 2px rgb(20 23 28 / 6%), 0 18px 40px -28px rgb(20 23 28 / 45%);

	--wrap: 66rem;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--radius: 16px;

	--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
		"Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0c0f11;
		--surface: #14191c;
		--surface-2: #1b2226;
		--text: #e8eae6;
		--muted: #98a2a7;
		--line: #273035;
		--accent: #74d6c6;
		--on-accent: #06201d;
		--accent-soft: #12302e;
		--shadow: 0 1px 2px rgb(0 0 0 / 55%), 0 24px 50px -30px rgb(0 0 0 / 90%);
	}
}

/* --- Basis -------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--bg);
	background-image: radial-gradient(
		70rem 34rem at 85% -12%,
		var(--accent-soft),
		transparent 68%
	);
	background-repeat: no-repeat;
	color: var(--text);
	font-family: var(--font-sans);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.6em;
	font-weight: 620;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p {
	margin: 0 0 1em;
}

p:last-child {
	margin-bottom: 0;
}

[id] {
	scroll-margin-top: 6rem;
}

a {
	color: var(--accent);
	text-decoration-line: underline;
	text-decoration-thickness: 0.06em;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 0.12em;
}

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

::selection {
	background: var(--accent);
	color: var(--on-accent);
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -5rem;
	z-index: 100;
	padding: 0.65rem 1.1rem;
	border-radius: 0.6rem;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	text-decoration: none;
	transition: top 0.15s ease;
}

.skip-link:focus {
	top: 1rem;
}

/* --- Kopfzeile ---------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(1px)) {
	.site-header {
		background: color-mix(in srgb, var(--bg) 84%, transparent);
		backdrop-filter: blur(12px) saturate(1.4);
	}
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	padding-block: 0.85rem;
}

.brand {
	display: inline-flex;
	align-items: baseline;
	gap: 0.55rem;
	color: var(--text);
	font-size: 1.05rem;
	font-weight: 650;
	letter-spacing: -0.025em;
	text-decoration: none;
	white-space: nowrap;
}

.brand__role {
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 0.68rem;
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav a {
	display: block;
	padding: 0.4rem 0.7rem;
	border-radius: 0.55rem;
	color: var(--muted);
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
}

.nav a:hover {
	background: var(--surface-2);
	color: var(--text);
}

.nav a[aria-current="page"] {
	background: var(--accent-soft);
	color: var(--accent);
}

/* --- Hero --------------------------------------------------------------- */

.hero {
	padding-block: clamp(3.25rem, 9vw, 7rem) 0;
}

.eyebrow {
	margin: 0 0 0.9rem;
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.hero h1 {
	margin: 0;
	font-size: clamp(2.75rem, 8vw, 5rem);
	letter-spacing: -0.045em;
	line-height: 1;
}

.hero .lead {
	max-width: 46ch;
	margin-top: 1.35rem;
	color: var(--muted);
	font-size: clamp(1.05rem, 1.8vw, 1.3rem);
	line-height: 1.55;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-top: 2rem;
}

.hero__note {
	max-width: 54ch;
	margin-top: 2.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9rem;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.2rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 550;
	line-height: 1.3;
	text-decoration: none;
	transition:
		transform 0.15s ease,
		background-color 0.15s ease,
		border-color 0.15s ease;
}

.btn--primary {
	background: var(--accent);
	color: var(--on-accent);
}

.btn--ghost {
	background: var(--surface);
	border-color: var(--line);
	color: var(--text);
}

@media (hover: hover) {
	.btn:hover {
		transform: translateY(-1px);
	}

	.btn--primary:hover {
		background: color-mix(in srgb, var(--accent) 88%, var(--text));
	}

	.btn--ghost:hover {
		border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
	}
}

/* --- Abschnitte --------------------------------------------------------- */

.section {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	margin-bottom: 1.75rem;
}

.section__head h2 {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.section__head p {
	max-width: 46ch;
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

/* --- Karten ------------------------------------------------------------- */

.card {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: clamp(1.25rem, 3vw, 1.7rem);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition:
		transform 0.18s ease,
		border-color 0.18s ease;
}

.card h3 {
	margin: 0;
	font-size: 1.15rem;
}

.card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.card__link {
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
}

.card__link::after {
	content: " →";
}

@media (hover: hover) {
	.card:hover {
		transform: translateY(-3px);
		border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
	}
}

.meta {
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.pill {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	vertical-align: middle;
}

.award {
	line-height: 1.2;
}

/* --- Band (Kontakt) ----------------------------------------------------- */

.band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2.5rem;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 6px);
	box-shadow: var(--shadow);
}

.band h2 {
	margin-bottom: 0.4rem;
	font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.band p {
	max-width: 48ch;
	margin: 0;
	color: var(--muted);
}

/* --- Textseiten --------------------------------------------------------- */

.page {
	padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
}

.page__head {
	margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.page__head h1 {
	margin-bottom: 0.5rem;
	font-size: clamp(2.25rem, 6vw, 3.5rem);
	letter-spacing: -0.04em;
}

.page__head .lead {
	max-width: 52ch;
	margin: 0;
	color: var(--muted);
	font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.prose {
	max-width: 68ch;
}

.prose > * + * {
	margin-top: 1em;
}

.prose h2 {
	margin-top: 2.25em;
	font-size: 1.5rem;
}

.prose h3 {
	margin-top: 1.75em;
	font-size: 1.15rem;
}

.prose ul,
.prose ol {
	margin: 0;
	padding-left: 1.25em;
}

.prose li + li {
	margin-top: 0.35em;
}

/* --- Arbeiten ----------------------------------------------------------- */

.page section + section {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.page section > h2 {
	margin-bottom: 0.5rem;
	font-size: clamp(1.4rem, 2.6vw, 1.75rem);
}

.work {
	margin-top: 1rem;
	padding: clamp(1.25rem, 3.5vw, 2rem);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.work h3 {
	margin: 0.15rem 0 0.6rem;
	font-size: clamp(1.15rem, 2.2vw, 1.35rem);
}

.work p {
	color: var(--muted);
}

.work p + p {
	margin-top: 0.6em;
}

.work .meta {
	margin: 0;
}

.downloads {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 1.25rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.downloads a {
	font-size: 0.92rem;
	font-weight: 550;
}

.downloads .size {
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 0.8rem;
}

.work__formats {
	margin-top: 0.85rem;
	color: var(--muted);
	font-size: 0.82rem;
}

.work__formats summary {
	width: fit-content;
	padding-block: 0.15rem;
	cursor: pointer;
}

.work__formats summary:hover {
	color: var(--accent);
}

.work__formats p {
	margin: 0.4rem 0 0;
	font-size: 0.82rem;
}

/* --- Links -------------------------------------------------------------- */

.linklist {
	display: grid;
	gap: 0.75rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.linklist li {
	padding: 1rem 1.15rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.linklist a {
	font-weight: 600;
	text-decoration: none;
}

.linklist a:hover {
	text-decoration: underline;
}

.linklist p {
	margin: 0.25rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

/* --- Impressum ---------------------------------------------------------- */

.legal address {
	margin: 1.25rem 0;
	padding: 1.15rem 1.35rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-style: normal;
}

.legal address strong {
	display: block;
	margin-bottom: 0.15rem;
}

.note {
	margin-top: 2.5rem;
	padding: 1.15rem 1.35rem;
	background: var(--accent-soft);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 0.9rem;
}

.note p {
	margin: 0;
}

/* --- Fußzeile ----------------------------------------------------------- */

.site-footer {
	margin-top: clamp(3rem, 8vw, 6rem);
	padding-block: 2.25rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.88rem;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	color: var(--muted);
}

.site-footer a:hover {
	color: var(--accent);
}

/* --- Schmale Bildschirme ------------------------------------------------ */

@media (max-width: 34rem) {
	body {
		--gutter: 1rem;
	}

	.site-header__inner {
		gap: 0.4rem;
		padding-block: 0.7rem;
	}

	.brand__role {
		display: none;
	}

	.nav {
		width: 100%;
	}

	.nav ul {
		justify-content: space-between;
		gap: 0;
	}

	.nav a {
		padding: 0.25rem 0.35rem;
		font-size: 0.8rem;
	}

	.eyebrow {
		letter-spacing: 0.12em;
	}
}

/* --- Bewegung reduzieren ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* --- Druck -------------------------------------------------------------- */

@media print {
	:root {
		--bg: #ffffff;
		--surface: #ffffff;
		--text: #000000;
		--muted: #333333;
		--line: #cccccc;
	}

	body {
		background: #ffffff;
		font-size: 11pt;
	}

	.site-header,
	.site-footer,
	.actions,
	.skip-link {
		display: none;
	}

	.card,
	.work,
	.band {
		box-shadow: none;
	}

	.work,
	.card,
	.linklist li {
		break-inside: avoid;
	}
}
