/* ==========================================================================
   anki lab — öffentliche Website
   Weißer Grund, dunkler Text, Orange als sparsamer Akzent.
   Keine Webfonts von Dritten (Datenschutz, keine externen Requests).
   ========================================================================== */

:root {
    --ink:        #16181d;
    --ink-soft:   #55595f;
    --ink-faint:  #7c8189;
    --paper:      #ffffff;
    --paper-tint: #fafaf9;
    --rule:       #e3e4e6;
    --rule-soft:  #eeeff0;
    --accent:     #c2410c;
    --accent-dark:#9a3412;
    --accent-tint:#fdf4ee;
    --focus:      #1d4ed8;

    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --measure: 34rem;
    --gutter: clamp(1.25rem, 5vw, 3.5rem);
    --wrap: 68rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Sticky-Header beim Ansteuern von Ankern berücksichtigen */
    scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------- Grundlagen */

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

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

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: rgba(194, 65, 12, 0.35);
}
a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }

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

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

hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 2.5rem 0;
}

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }

blockquote {
    margin: 0 0 1.1em;
    padding-left: 1rem;
    border-left: 2px solid var(--rule);
    color: var(--ink-soft);
}

code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: var(--paper-tint);
    border: 1px solid var(--rule-soft);
    border-radius: 3px;
    padding: 0.08em 0.32em;
}

::selection { background: var(--accent-tint); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 100;
}
.skip-link:focus { left: 0; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------- Layout */

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.measure { max-width: var(--measure); }

.section {
    padding-block: clamp(3rem, 8vw, 5.5rem);
    border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: 0; }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.5rem;
    margin-bottom: 2rem;
}
.section-head h2 { margin: 0; }

.section-label {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 0.75rem;
}

.lede {
    font-size: 1.075rem;
    color: var(--ink-soft);
    max-width: var(--measure);
}

/* ------------------------------------------------------------------- Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--rule);
}

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

.brand {
    display: flex;
    align-items: center;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand__mark { color: var(--accent); }

.brand__logo {
    display: block;
    height: 2rem;
    width: auto;
    max-width: 12rem;
}

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

.site-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    padding-block: 0.2rem;
    border-bottom: 1px solid transparent;
    white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

@media (max-width: 40rem) {
    .site-header { position: static; }
    .site-header__inner { flex-direction: column; align-items: flex-start; }
    .site-nav ul { gap: 0.1rem 1rem; }
}

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

.hero { padding-block: clamp(3.5rem, 11vw, 7rem) clamp(2.5rem, 7vw, 4.5rem); }

.hero__eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1.25rem;
}

.hero h1 { max-width: 16ch; margin-bottom: 1.4rem; }

.hero__intro {
    font-size: clamp(1.1rem, 2.1vw, 1.3rem);
    line-height: 1.55;
    color: var(--ink);
    max-width: 40rem;
    margin-bottom: 1.5rem;
}

.hero__secondary {
    color: var(--ink-soft);
    max-width: var(--measure);
}

.hero__meta {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    font-size: 0.9rem;
    color: var(--ink-faint);
    max-width: 40rem;
}

/* ----------------------------------------------------------------- Research */

.topics {
    display: grid;
    gap: 0;
}

.topic {
    padding-block: 2rem;
    border-top: 1px solid var(--rule-soft);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}
.topic:first-child { border-top: 0; padding-top: 0; }

@media (min-width: 46rem) {
    .topic {
        grid-template-columns: 13rem minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
    }
    .topic--noimage { grid-template-columns: 13rem minmax(0, 1fr); }
}

.topic__index {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding-top: 0.3rem;
}

.topic__body { max-width: var(--measure); }
.topic__body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.topic__body p { color: var(--ink-soft); }

.topic__figure { margin: 0 0 1rem; }
.topic__figure img {
    width: 100%;
    border: 1px solid var(--rule);
    background: var(--paper-tint);
}

/* Referenzen unter dem Forschungstext */
.refs {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0.85rem 0 0;
    border-top: 1px solid var(--rule-soft);
}

.ref {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--ink-soft);
    margin-bottom: 0.45rem;
    /* Sauberer Umbruch auf schmalen Displays */
    overflow-wrap: anywhere;
}
.ref:last-child { margin-bottom: 0; }

.ref__cite { color: var(--ink); }
.ref__sep { color: var(--ink-faint); padding-inline: 0.4em; }
.ref__doi { white-space: nowrap; }

.ext::after {
    content: "\2197";
    display: inline-block;
    margin-left: 0.18em;
    font-size: 0.85em;
    text-decoration: none;
    vertical-align: baseline;
}

.topic__count {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------- People */

.people-group { margin-bottom: 3rem; }
.people-group:last-child { margin-bottom: 0; }

.people-group__title {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--rule-soft);
}

.people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 2rem 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.person { margin: 0; }

.person__portrait {
    width: 100%;
    max-width: 7.5rem;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--paper-tint);
    border-radius: 50%;
    margin-bottom: 0.85rem;
    filter: grayscale(100%);
    transition: filter 0.25s ease;
}
.person:hover .person__portrait { filter: grayscale(0%); }

/* Fehlende Porträts dürfen das Layout nicht stören */
.person__portrait--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--ink-faint);
    border: 1px solid var(--rule);
    filter: none;
}

.person__name {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    line-height: 1.35;
}

.person__role {
    font-size: 0.85rem;
    color: var(--accent);
    margin: 0 0 0.35rem;
}

.person__bio {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0;
    line-height: 1.5;
}

.person__affiliation {
    font-size: 0.82rem;
    color: var(--ink-faint);
    margin: 0.2rem 0 0;
}

.person__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.7rem;
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.78rem;
}
.person__links a { text-decoration: none; border-bottom: 1px solid rgba(194, 65, 12, 0.3); }
.person__links a:hover { border-bottom-color: currentColor; }

/* Kompakte Listen für Studierende und Associated */
.people-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 2.5rem;
}
@media (max-width: 38rem) { .people-list { columns: 1; } }

.people-list li {
    break-inside: avoid;
    margin-bottom: 0.55rem;
    font-size: 0.92rem;
    line-height: 1.45;
}
.people-list__name { font-weight: 600; }
.people-list__role { color: var(--ink-soft); }

/* Alumni */
.alumni { border-top: 1px solid var(--rule-soft); padding-top: 1.5rem; }

.alumni summary {
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-block: 0.25rem;
}
.alumni summary::-webkit-details-marker { display: none; }
.alumni summary::after {
    content: "+";
    font-size: 1rem;
    line-height: 1;
    color: var(--accent);
}
.alumni[open] summary::after { content: "–"; }
.alumni summary:hover { color: var(--ink); }

.alumni__intro {
    font-size: 0.88rem;
    color: var(--ink-faint);
    margin: 1rem 0 1.25rem;
}

.alumni-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 2.5rem;
}
@media (max-width: 38rem) { .alumni-list { columns: 1; } }

.alumni-list li {
    break-inside: avoid;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ink-soft);
}
.alumni-list__name { color: var(--ink); font-weight: 600; }
.alumni-list__meta { color: var(--ink-faint); }

/* ------------------------------------------------------- Highlights (Home) */

.highlights { list-style: none; margin: 0; padding: 0; }

.highlight {
    display: grid;
    gap: 1.1rem;
    padding-block: 1.75rem;
    border-top: 1px solid var(--rule-soft);
}
.highlight:first-child { border-top: 0; padding-top: 0; }

@media (min-width: 46rem) {
    .highlight {
        grid-template-columns: 13rem minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
    }
}

.highlight__figure { margin: 0; }
.highlight__figure img {
    width: 100%;
    border: 1px solid var(--rule);
    background: var(--paper-tint);
}

.highlight__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.4rem;
}

.highlight__title {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 0 0 0.5rem;
}
.highlight__title a { color: var(--ink); text-decoration: none; }
.highlight__title a:hover { color: var(--accent); }

.highlight__summary { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.6rem; max-width: var(--measure); }

/* -------------------------------------------------------- Publikationsseite */

.page-hero { padding-block: clamp(2.75rem, 7vw, 4.5rem) 2rem; }
.page-hero h1 { margin-bottom: 1rem; }

.pub-toolbar {
    position: sticky;
    top: 3.6rem;
    z-index: 10;
    background: var(--paper);
    border-block: 1px solid var(--rule);
    padding-block: 0.85rem;
    margin-bottom: 2rem;
}
@media (max-width: 40rem) { .pub-toolbar { position: static; } }

.pub-toolbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.field { display: flex; flex-direction: column; gap: 0.2rem; }
.field label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.pub-search { flex: 1 1 15rem; min-width: 0; }

input[type="search"], input[type="text"], select {
    font: inherit;
    font-size: 0.92rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 0.45rem 0.6rem;
    width: 100%;
    max-width: 100%;
}
input[type="search"]:focus, select:focus { border-color: var(--ink-faint); }

.pub-status {
    font-size: 0.85rem;
    color: var(--ink-faint);
    margin-left: auto;
    white-space: nowrap;
}

.pub-reset {
    font-size: 0.85rem;
    background: none;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    padding: 0.2rem 0;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.js-only { display: none; }
.js .js-only { display: block; }
.js .field.js-only { display: flex; }
.js .pub-toolbar.js-only { display: block; }

.year-group { margin-bottom: 2.75rem; }
.year-group[hidden] { display: none; }

.year-group__title {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
    margin: 0 0 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 7.2rem;
    background: var(--paper);
}
@media (max-width: 40rem) { .year-group__title { position: static; } }

.pub-list { list-style: none; margin: 0; padding: 0; }

.pub {
    display: grid;
    gap: 0.85rem;
    padding-block: 1.25rem;
    border-top: 1px solid var(--rule-soft);
}
.pub:first-child { border-top: 0; }
.pub[hidden] { display: none; }

@media (min-width: 42rem) {
    .pub { grid-template-columns: 7rem minmax(0, 1fr); gap: 1.75rem; align-items: start; }
    .pub--nothumb { grid-template-columns: 7rem minmax(0, 1fr); }
}

.pub__figure { margin: 0; }
.pub__figure img {
    width: 100%;
    max-width: 7rem;
    border: 1px solid var(--rule);
    background: var(--paper-tint);
}

.pub__body { min-width: 0; }

.pub__title {
    font-family: var(--serif);
    font-size: 1.06rem;
    line-height: 1.4;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--ink);
    text-wrap: pretty;
}
.pub__title a { color: inherit; text-decoration: none; }
.pub__title a:hover { color: var(--accent); }

.pub__authors {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin: 0 0 0.2rem;
    overflow-wrap: break-word;
}

.pub__venue {
    font-size: 0.88rem;
    color: var(--ink-faint);
    margin: 0 0 0.35rem;
    font-style: italic;
}

.pub__desc {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin: 0.5rem 0 0;
    max-width: var(--measure);
}

.pub__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.9rem;
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.82rem;
}
.pub__meta a { text-decoration: none; border-bottom: 1px solid rgba(194, 65, 12, 0.3); white-space: nowrap; }
.pub__meta a:hover { border-bottom-color: currentColor; }
.pub__meta .doi { color: var(--ink-soft); }

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-tint);
    border-radius: 2px;
    padding: 0.08rem 0.4rem;
    vertical-align: 0.12em;
    margin-left: 0.35rem;
}
.badge--muted { color: var(--ink-faint); background: var(--paper-tint); border: 1px solid var(--rule-soft); }

.pub__variants {
    font-size: 0.82rem;
    color: var(--ink-faint);
    margin: 0.35rem 0 0;
}

.empty-state {
    padding: 2.5rem 0;
    color: var(--ink-soft);
    border-top: 1px solid var(--rule-soft);
}
.empty-state[hidden] { display: none; }

.pub-footnote {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------ Kontakt */

.contact-grid {
    display: grid;
    gap: 2.25rem;
}
@media (min-width: 46rem) {
    .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
}

.contact-block address {
    font-style: normal;
    line-height: 1.7;
}
.contact-block__name { font-weight: 600; }

.profile-list { list-style: none; margin: 0; padding: 0; }
.profile-list li {
    padding-block: 0.5rem;
    border-bottom: 1px solid var(--rule-soft);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    font-size: 0.92rem;
}
.profile-list li:first-child { border-top: 1px solid var(--rule-soft); }
.profile-list__owner { font-size: 0.78rem; color: var(--ink-faint); }

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

.site-footer {
    border-top: 1px solid var(--rule);
    padding-block: 2.5rem 3.5rem;
    font-size: 0.85rem;
    color: var(--ink-faint);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    justify-content: space-between;
    align-items: flex-start;
}

.site-footer p { margin: 0 0 0.5rem; max-width: 34rem; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }

.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
}

/* -------------------------------------------------------------- Inhaltsseiten */

.prose { max-width: var(--measure); }
.prose h3 { margin-top: 2.25rem; font-size: 1.2rem; }
.prose h4 { margin-top: 1.75rem; font-family: var(--sans); font-size: 0.95rem; letter-spacing: 0; }
.prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; }
.prose li::marker { color: var(--ink-faint); }

/* In Markdown-Texten per ![]() eingebettete Bilder und Videos */
.prose img, .prose video,
.topic__body img, .topic__body video {
    width: 100%;
    height: auto;
    margin: 1.25rem 0;
    border: 1px solid var(--rule);
    background: var(--paper-tint);
}
.prose p:has(> img:only-child), .prose p:has(> video:only-child),
.topic__body p:has(> img:only-child), .topic__body p:has(> video:only-child) {
    margin: 0;
}

.breadcrumb {
    font-size: 0.82rem;
    color: var(--ink-faint);
    margin: 0 0 1.25rem;
}
.breadcrumb a { color: var(--ink-faint); text-decoration: none; border-bottom: 1px solid var(--rule); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- Weiterleitung */

.redirect-note {
    max-width: 34rem;
    margin: 15vh auto;
    padding-inline: var(--gutter);
    text-align: left;
}

/* ------------------------------------------------------------------- Vorschau */

.preview-bar {
    background: var(--ink);
    color: #fff;
    font-family: var(--sans);
    font-size: 0.82rem;
    padding: 0.55rem var(--gutter);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: center;
    justify-content: space-between;
}
.preview-bar a { color: #ffd9c2; }
.preview-bar strong { color: #fff; }

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

@media print {
    .site-header, .site-footer, .pub-toolbar, .preview-bar, .skip-link { display: none !important; }
    body { font-size: 11pt; }
    a { text-decoration: none; color: inherit; }
    .pub, .topic, .highlight { break-inside: avoid; }
}
