:root {
  --bg: #2f3238;
  --text: #f3efe8;
  --muted: #b7bbc4;
  --accent: #e08a4f;
  --panel: #3a3e46;
  --line: #4b505a;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* ---------- Menü ---------- */
.menu {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  z-index: 10;
}

.menu-button {
  display: flex;
  text-decoration: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 48px;
  height: 48px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}

.menu-button:hover span { background: var(--accent); }

/* Unterseiten: fest stehendes Menüsymbol mit schmaler Hintergrundfläche, damit es beim Scrollen
   nicht über Text und Bildern liegt. Der Schatten kommt erst, wenn Inhalt unter den unteren Strich
   scrollt (Klasse .is-over-content, gesetzt in menu.js). */
body > .menu .menu-button {
  position: relative;
  isolation: isolate;
}

body > .menu .menu-button::before {
  content: "";
  position: absolute;
  inset: 7px 5px;                 /* ca. 4 px Rand um die Striche */
  z-index: -1;
  border-radius: 8px;
  background: var(--bg);
  transition: box-shadow .2s ease;
}

body > .menu .menu-button.is-over-content::before {
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

.menu-list {
  position: absolute;
  top: 54px;
  left: 0;
  width: max-content;             /* Breite passt sich dem längsten Eintrag an, kein Umbruch */
  max-width: calc(100vw - 32px);
  min-width: 150px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}

.menu-list[hidden] { display: none; }

.menu-list a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.05rem;
  white-space: nowrap;
}

.menu-list a:hover,
.menu-list a[aria-current="page"] {
  background: var(--bg);
  color: var(--accent);
}

/* ---------- Startseite ---------- */
.banner {
  background: #d7dbdf;          /* Hintergrundfarbe des Titelbilds, damit der Streifen über die volle Breite reicht */
  line-height: 0;
}

.banner img {
  display: block;
  width: 100%;                    /* füllt die verfügbare Breite, schrumpft auf dem Handy mit */
  max-width: 800px;               /* maximale Bildbreite auf großen Monitoren */
  height: auto;                   /* Höhe folgt automatisch dem Seitenverhältnis */
  margin: 0 auto;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.portrait {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 8%;
  margin-bottom: 28px;
}

h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  text-wrap: balance;
}

.social {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.social > a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  transition: transform .2s ease;
}

.social > a:hover { transform: translateY(-2px); }

.social svg { display: block; width: 30px; height: 30px; }

/* Menü in der Icon-Zeile: im Fluss statt fest oben links */
.social .menu {
  position: relative;
  top: auto;
  left: auto;
}

/* ---------- Hinweis-Pfeile unter Menü und LinkedIn ---------- */
/* Handschrift Kalam, lokal hinterlegt (SIL Open Font License, siehe assets/fonts/Kalam-OFL.txt) */
@font-face {
  font-family: "Kalam";
  src: url("assets/fonts/kalam-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.social { position: relative; margin-bottom: 72px; }

.hint {
  position: absolute;
  top: calc(100% + 2px);
  pointer-events: none;
  color: var(--muted);
  font-family: "Kalam", "Chalkboard SE", "Segoe Print", cursive;
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
  text-align: left;
}

.hint svg {
  position: absolute;
  top: 0;
  width: 56px;
  height: 45px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hint-text { display: block; padding-top: 38px; }

/* links: Pfeilspitze zeigt auf das Menü, Text läuft nach links weg */
.hint-left { right: calc(100% - 24px); }
.hint-left svg { right: -10.3px; }   /* Pfeilspitze genau auf der Mittelachse des Menüsymbols */
.hint-left .hint-text { padding-right: 44px; transform: rotate(-4deg); }

/* rechts: gespiegelt, Pfeilspitze auf LinkedIn */
.hint-right { left: calc(100% - 24px); }
.hint-right svg { left: -10.3px; transform: scaleX(-1); }   /* Pfeilspitze auf der Mittelachse des LinkedIn-Symbols */
.hint-right .hint-text { padding-left: 50px; transform: rotate(3deg); }

/* Handy: Text etwas kleiner und unter den Pfeilanfang, damit er nicht an den Rand stößt */
@media (max-width: 600px) {
  .hint { font-size: 19px; }
  .hint-text { padding-top: 51px; }
  .hint-left .hint-text { padding-right: 20px; }
  .hint-right .hint-text { padding-left: 26px; }
  /* rechts ist mobil wenig Platz: mehrteilige Labels (z. B. „professional profile“) zweizeilig */
  .hint-right .hint-text { white-space: normal; width: min-content; line-height: 1.15; }
}

/* ---------- Unterseiten / Projektbeitrag ---------- */
.page {
  width: 100%;
  flex: 1;
  --text-size: 12pt;              /* Fließtext: 12pt (≈ 16 px) */
  max-width: 760px;
  margin: 0 auto;
  padding: 110px 24px 96px;
}

.page h1 {
  margin: 0 0 32px;
  font-size: clamp(24px, 5vw, 30px);
  hyphens: auto;
  overflow-wrap: break-word;
}

.page h2 {
  margin: 0 0 16px;
  font-size: clamp(20px, 4vw, 24px);
  hyphens: auto;
  overflow-wrap: break-word;
}

.page h3 {
  margin: 0 0 12px;
  font-size: var(--text-size);
  font-weight: 700;
  hyphens: auto;
}

/* Auskommentiert damit Text die selbe Breite hat wie Überschrift und Bilder auf Projekt-Unterseite
.page p {
  max-width: 65ch;
  margin: 0 0 28px;
  color: #dcdde1;
  font-size: var(--text-size);
  line-height: 1.7;
  hyphens: auto;
}
*/

.page figure {
  margin: 0 0 28px;
}

.page figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Zwei Bilder nebeneinander: gleiche Höhe über --ar (Seitenverhältnis Breite/Höhe) */
.img-pair {
  display: flex;
  gap: 12px;
  margin: 0 0 28px;
}

.img-pair figure {
  flex: var(--ar) 1 0;
  min-width: 0;
  margin: 0;
}

/* Bilder direkt untereinander (z. B. 005 und 004) enger setzen */
.img-stack > figure,
.img-stack > .img-pair { margin-bottom: 12px; }
.img-stack { margin-bottom: 28px; }

@media (max-width: 560px) {
  .img-pair { flex-direction: column; }
  .img-pair figure { flex: none; }
}

/* ---------- Footer (Datenschutz-Link) ---------- */
.site-footer {
  padding: 20px 24px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.site-footer a {
  display: inline-block;
  padding: 8px 10px;
  color: inherit;
  text-decoration: none;
}

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

/* Listen und Links im Fließtext (Datenschutzseite)
Auskommentiert damit Listen die selbe Breite hat wie Überschrift und Bilder
.page ul {
  max-width: 65ch;
  margin: 0 0 28px;
  padding-left: 1.2em;
  color: #dcdde1;
  font-size: var(--text-size);
  line-height: 1.7;
}
*/

.page p a, .page li a { text-decoration: underline; text-underline-offset: 3px; }
.page p a:hover, .page li a:hover { color: var(--accent); }

/* Platzhalter, die noch ausgefüllt werden müssen */
.todo { background: rgba(224, 138, 79, .28); border-radius: 4px; padding: 0 4px; }


@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Startseite auf Handys: etwas kleinere Größen, Abstände wie am PC ---------- */
@media (max-width: 600px) {
  .portrait { width: 160px; height: 160px; }
  .hero h1 { font-size: 33px; }
  .subtitle { font-size: 1.08rem; }
}
