/* grischott.me — Redesign
   Plus Jakarta Sans (Display) + Public Sans (Text) + JetBrains Mono (Code) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700&family=Public+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --bg: oklch(98% 0.012 85);
  --bg-alt: oklch(96% 0.012 85);
  --bg-card: oklch(100% 0 0);
  --border: oklch(90% 0.01 85);
  --border-soft: oklch(93% 0.01 85);
  --text: oklch(22% 0.02 260);
  --text-muted: oklch(45% 0.02 260);
  --text-soft: oklch(52% 0.02 260);
  --accent: oklch(50% 0.15 200);
  --accent-strong: oklch(42% 0.15 200);
  --accent-bg: oklch(94% 0.03 200);
  --accent-2: oklch(55% 0.15 40);
  --accent-2-strong: oklch(47% 0.15 40);
  --accent-2-bg: oklch(94% 0.05 40);
  --neutral-mark: oklch(44% 0.01 260);
  --neutral-mark-strong: oklch(38% 0.012 260);
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Public Sans', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-strong); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img, svg { max-width: 100%; display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--neutral-mark);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--neutral-mark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--neutral-mark);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
}

nav.main-nav {
  display: flex;
  gap: 34px;
  align-items: center;
}

nav.main-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

nav.main-nav a[aria-current="page"] {
  font-weight: 600;
}

nav.main-nav a[href="index.html"][aria-current="page"] {
  color: var(--neutral-mark-strong);
  border-bottom-color: var(--neutral-mark-strong);
}

nav.main-nav a[href="matherialien.html"][aria-current="page"] {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
}

nav.main-nav a[href="kontakt.html"][aria-current="page"] {
  color: var(--accent-2-strong);
  border-bottom-color: var(--accent-2);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 760px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { width: 100%; padding: 10px 0; border-bottom: none; }
  nav.main-nav a[aria-current="page"] { border-bottom: none; }
  .nav-toggle { display: flex; }
}

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

.hero {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  padding-top: 52px;
  padding-bottom: 32px;
}

.hero-text {
  flex: 1 1 auto;
  min-width: 0;
}

.hero h1 {
  font-size: 21px;
  margin-bottom: 12px;
  white-space: nowrap;
}

.hero p.lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

.hero-portrait { flex: 0 0 130px; }

.portrait-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background: var(--accent-bg);
}

@media (max-width: 1150px) {
  .hero { flex-direction: column; text-align: left; padding-top: 40px; }
  .hero-portrait { flex: 0 0 auto; width: 130px; }
  .hero p.lede { white-space: normal; }
}

/* ---------- Timeline ---------- */

.timeline-section { padding-top: 12px; padding-bottom: 18px; }

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
  align-items: start;
}

.timeline-col { display: flex; flex-direction: column; }

@media (max-width: 700px) {
  .timeline { grid-template-columns: 1fr; }
}

.timeline-item {
  display: flex;
  gap: 26px;
  padding-bottom: 10px;
}

.timeline-year {
  flex: 0 0 110px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-soft);
  padding-top: 1px;
}

.timeline-rail {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-soft);
  flex-shrink: 0;
  margin-top: 5px;
}

.timeline-line {
  width: 1.5px;
  flex: 1 1 auto;
  background: var(--border);
  margin-top: 4px;
}

.timeline-body { flex: 1 1 0; }
.timeline-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.timeline-detail { font-size: 13.5px; color: var(--text-soft); line-height: 1.45; }

@media (max-width: 560px) {
  .timeline-item { gap: 16px; }
  .timeline-year { flex-basis: 78px; font-size: 13px; }
}

/* ---------- Teaser cards ---------- */

.teasers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 88px;
}

@media (max-width: 700px) {
  .teasers { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--accent-bg);
}
.card-icon.alt { background: var(--accent-2-bg); }

.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin: 0 0 18px; }

.card-link {
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link.alt { color: var(--accent-2); }

/* ---------- Page header (Mat(h)erialien / Kontakt) ---------- */

.page-head { padding-top: 52px; padding-bottom: 8px; }
.page-head h1 { font-size: 21px; margin-bottom: 12px; }
.page-head p { font-size: 16px; color: var(--text-muted); max-width: 640px; margin: 0; line-height: 1.6; }
.page-head p + p { margin-top: 2px; }

.page-head p.nowrap-line { max-width: none; white-space: nowrap; }

@media (max-width: 960px) {
  .page-head p.nowrap-line { white-space: normal; max-width: 640px; }
}

/* ---------- Filter chips ---------- */

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 8px;
}

.chip {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 9px 16px;
  border-radius: 100px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
}

.chip .count {
  font-size: 12px;
  color: var(--text-soft);
  background: var(--bg-alt);
  padding: 1px 7px;
  border-radius: 100px;
}

.chip[aria-pressed="true"] {
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.chip[aria-pressed="true"] .count {
  color: var(--bg);
  background: color-mix(in oklab, var(--accent) 60%, black 10%);
}

/* ---------- Material categories ---------- */

.category-section { padding-top: 40px; padding-bottom: 8px; }

.category-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}
.category-heading h2 { font-size: 21px; }
.category-heading .count-label { font-size: 14px; color: var(--text-soft); }

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .material-grid { grid-template-columns: 1fr; }
}

.material-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.material-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.material-links {
  display: flex;
  gap: 16px;
  font-size: 13.5px;
  font-weight: 600;
}

.materials-list {
  padding-bottom: 88px;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  column-gap: 22px;
  row-gap: 10px;
  padding-top: 32px;
}

.info-card { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 22px; }
.map-card { grid-column: 2; grid-row: 1; }
.map-link { grid-column: 2; grid-row: 2; }

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
  .info-card { grid-column: 1; grid-row: 1; }
  .map-card { grid-column: 1; grid-row: 2; }
  .map-link { grid-column: 1; grid-row: 3; }
}

.info-row { display: flex; gap: 14px; align-items: flex-start; }
.info-row svg { flex-shrink: 0; margin-top: 2px; }
.info-label { font-size: 13px; color: var(--text-soft); margin-bottom: 2px; }
.info-value { font-size: 15.5px; font-weight: 500; }
.info-value a { color: var(--text); }
.info-value a:hover { color: var(--accent); }

.map-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 220px;
}

.map-card iframe {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: block;
  border: 0;
}

.map-link {
  margin: 10px 0 0;
  font-size: 13.5px;
}
.map-link a { color: var(--text-soft); }
.map-link a:hover { color: var(--accent); }

.gpg-card { margin: 22px 0 0; }
.gpg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.gpg-head-left { display: flex; align-items: center; gap: 12px; }
.gpg-head h2 { font-size: 17px; }

.copy-btn {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-2);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.copy-btn:hover { color: var(--accent-2-strong); }

.fingerprint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  word-break: break-all;
}

.gpg-note { font-size: 13.5px; color: var(--text-soft); margin: 0 0 16px; }

details.key-block summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-2);
  cursor: pointer;
  margin-bottom: 12px;
}

pre.key-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.5;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

.links-section { padding-top: 32px; padding-bottom: 88px; }
.links-section .section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 14px;
}
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-row a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 100px;
}
.pill-row a:hover { border-color: var(--text); color: var(--text); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 26px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer p { margin: 0; font-size: 13px; color: var(--text-soft); }
