/* karl-akbari.com – schlichtes, typografisches Layout ohne externe Schriften */

:root {
  --text: #1c1c1e;
  --muted: #5d5f66;
  --bg: #ffffff;
  --accent: #1f4e79;
  --accent-hover: #0f2f4d;
  --rule: #e2e3e7;
  --field: #f6f7f9;
  --mark: #fff1a8;
  --mark-text: #3d3300;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #e9e9ec;
    --muted: #a9abb3;
    --bg: #131417;
    --accent: #9cc3ef;
    --accent-hover: #c7ddf6;
    --rule: #2c2e34;
    --field: #1c1e22;
    --mark: #5c4d00;
    --mark-text: #fff6c9;
  }
}

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

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

body {
  margin: 0 auto;
  max-width: var(--measure);
  padding: 0 1rem;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sprung {
  position: absolute;
  left: -999rem;
}
.sprung:focus { left: 1rem; top: 0.5rem; background: var(--bg); padding: 0.25rem 0.5rem; }

/* Kopf und Navigation */
.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}
.kopf .name {
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.kopf ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kopf nav a { text-decoration: none; color: var(--muted); }
.kopf nav a:hover { color: var(--accent); }
.kopf nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}
.kopf .sprache a { color: var(--accent); }

/* Inhalt */
main { padding: 1.75rem 0 2.5rem; }

h1, h2, h3 { line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.85rem; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 2.25rem 0 0.6rem; }
h3 { font-size: 1.02rem; margin: 1.4rem 0 0.3rem; }
p { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; }
li { margin: 0.2rem 0; }

.untertitel { color: var(--muted); font-size: 1.08rem; margin-top: -0.2rem; }

/* Startseite: Foto rechts, auf dem Handy oben */
.intro {
  display: grid;
  grid-template-columns: 1fr 9.5rem;
  gap: 0 1.75rem;
  align-items: start;
}
.intro .portrait {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 9.5rem;
  height: auto;
  border-radius: 0.35rem;
}
.intro > div { grid-column: 1; grid-row: 1; }

@media (max-width: 34rem) {
  .intro { grid-template-columns: 1fr; }
  .intro .portrait { grid-column: 1; grid-row: 1; width: 7.5rem; margin-bottom: 1rem; }
  .intro > div { grid-row: 2; }
}

.positionen { list-style: none; padding: 0; }
.positionen li { margin: 0 0 0.9rem; }
.positionen .rolle { font-weight: 600; }
.positionen .ort, .positionen .detail { display: block; }
.positionen .detail { color: var(--muted); }

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

/* Publikationen: hängender Einzug wie im Literaturverzeichnis */
.pubs { list-style: none; padding: 0; }
.pubs li { padding-left: 1.5rem; text-indent: -1.5rem; margin: 0 0 0.8rem; }
.pubs a { overflow-wrap: anywhere; }
.ich { font-weight: 650; }

/* Lehre */
.inst h3 .zeit { font-weight: 400; color: var(--muted); }
.inst ul { margin-top: 0.2rem; }
.detail { color: var(--muted); }

/* Formular */
form { display: grid; gap: 1rem; max-width: 34rem; }
label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  padding: 0.55rem 0.65rem;
}
textarea { min-height: 10rem; resize: vertical; }
button {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 0.3rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); }
.hinweis { color: var(--muted); font-size: 0.95rem; }
.honig { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }

/* Rechtstexte */
.recht h2 { font-size: 1.08rem; }
.kasten { border-left: 3px solid var(--accent); padding: 0.25rem 0 0.25rem 1rem; margin: 1.5rem 0; }
address { font-style: normal; margin-bottom: 1rem; }

/* Offene Platzhalter, nur in der Vorschau sichtbar */
mark.offen { background: var(--mark); color: var(--mark-text); padding: 0 0.2rem; border-radius: 0.15rem; }

.fuss {
  border-top: 1px solid var(--rule);
  padding: 1rem 0 2rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.fuss a { color: var(--muted); }
