/* Thomas Pölzler – Website im Stil des bisherigen Google-Sites-Themes */
:root {
  --accent: #947979;
  --ink: #212121;
  --grey: #6a6a6a;
  --gutter: 56px;
  --bar-h: 56px;
  --sans: 'Open Sans', Arial, sans-serif;
  --head: Roboto, Arial, sans-serif;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.56 var(--sans);
}
main { flex: 1 0 auto; }
body.lock { overflow: hidden; }

a { color: inherit; text-decoration: underline; }
a.nu { text-decoration: none; }
.u { text-decoration: underline; }

button { font: inherit; color: inherit; }
button svg { display: block; }

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 60;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
}
.skip:focus { top: 8px; }

/* ---------- Kopfleiste ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--bar-h);
  background: #fff;
}
.brand { color: var(--ink); text-decoration: none; }
.logo { position: absolute; left: 26px; top: 6px; width: 52px; height: 44px; }
.brand-name {
  position: absolute;
  left: 91px;
  top: 0;
  font: 500 20px/56px var(--head);
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.main-nav { position: absolute; right: 60px; top: 0; height: 56px; }
.main-nav ul { margin: 0; padding: 0; list-style: none; }
.main-nav > ul { display: flex; align-items: center; height: 100%; }
.main-nav > ul > li { position: relative; display: flex; align-items: center; height: 56px; }
.main-nav > ul > li + li { margin-left: 26.2px; }
.main-nav > ul > li + li::before {
  content: "·";
  position: absolute;
  left: -26.2px;
  top: 0;
  width: 26.2px;
  text-align: center;
  line-height: 56px;
  color: var(--grey);
}
.main-nav a { color: var(--grey); text-decoration: none; line-height: 56px; }
.main-nav a:hover { color: var(--ink); }
.main-nav .current > a { color: var(--ink); font-weight: 700; }

.chev {
  margin: 0 .8px 0 7.5px;
  padding: 0;
  width: 12.6px;
  height: 24px;
  border: 0;
  background: none;
  cursor: pointer;
}
.chev svg { fill: var(--grey); }

.sub { list-style: none; }
.main-nav .sub {
  display: none;
  position: absolute;
  left: -42px;
  top: 48.5px;
  width: 245px;
  padding: 8px 0;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 4px 14px rgba(0, 0, 0, .15);
}
.main-nav .has-sub:hover > .sub,
.main-nav .has-sub:focus-within > .sub,
.main-nav .has-sub.open > .sub { display: block; }
.main-nav .sub li { display: block; }
.main-nav .sub a { display: block; padding: 0 16px 0 42px; font-size: 16px; line-height: 42px; color: var(--grey); white-space: nowrap; }
.main-nav .sub a:hover, .main-nav .sub a:focus { color: var(--ink); background: #f1f1f1; }
.main-nav .sub .current > a { color: var(--ink); font-weight: 400; }

.menu-btn, .search-btn, .search-back, .drawer-close, .toggle {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.search-btn { position: absolute; right: 12px; top: 16px; width: 24px; height: 24px; }
.search-btn svg { fill: var(--grey); }
.menu-btn { display: none; }

/* ---------- Suche (Desktop) ---------- */
.search-panel {
  display: none;
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: 74px;
  padding: 12.5px 0;
  background: #f4f4f4;
}
.search-open .search-panel { display: block; }
.search-card {
  display: flex;
  align-items: center;
  width: 50%;
  height: 49px;
  margin: 0 auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 1px 1px rgba(0, 0, 0, .12);
}
.search-back {
  position: absolute;
  left: 30px;
  top: 23.4px;
  width: 24px;
  height: 24px;
}
.search-back svg, .search-icon { fill: var(--grey); }
.search-icon { flex: 0 0 24px; margin-left: 12px; position: relative; top: 2.5px; }
.search-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  margin: 0 12px 0 25.7px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 17.6px var(--head);
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--grey); opacity: 1; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Abdunklung ---------- */
.scrim {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility 0s .2s;
}
.menu-open .scrim { opacity: .6; visibility: visible; transition: opacity .2s; }
.search-open .scrim { opacity: .24; visibility: visible; transition: opacity .2s; }

/* ---------- Seitenmenü (nur Handy) ---------- */
.drawer { display: none; }

/* ---------- Titelbild ---------- */
.hero {
  position: relative;
  height: 310px;
  margin-top: calc(-1 * var(--bar-h));
  overflow: hidden;
  background: #4b4538 url(../img/header.svg) center / 2400px 320px repeat-x;
}
.hero h1 {
  position: absolute;
  left: 0;
  right: 0;
  top: 144px;
  margin: 0;
  padding: 0 16px;
  text-align: center;
  color: #fff;
  font: 500 59px/1 var(--head);
}
.hero .bar {
  position: absolute;
  left: 50%;
  top: 222px;
  width: 100px;
  height: 8px;
  margin-left: -50px;
  background: var(--accent);
}

/* ---------- Inhalt ---------- */
/* Textspalte wie bei Google Sites: wächst mit der Fensterbreite (97,5 % minus 92,8 px), höchstens 1154,4 px */
.page { width: min(1154.4px, 97.5% - 92.8px); margin: 0 auto; }
.content { padding: 32.7px 0 49px; }
.content.p-start { padding-top: 38px; }
/* Seiten, die im Original mit einer Leerzeile enden */
.content.p-about-education, .content.p-about-contact, .content.p-research-interests,
.content.p-about-positions, .content.p-research-projects { padding-bottom: 73px; }
.content.p-teaching-materials { padding-bottom: 31px; }
.content p { margin: 0 0 16px; padding: 0 8px; }
.content > p:last-child { margin-bottom: 0; }

/* Abschnittsüberschriften (Google-Sites-Stil „Heading“, 26 pt) */
.content h2.sec {
  margin: 42.16px 0 17.88px;
  padding: 0 48px 0 8px;
  color: var(--accent);
  font: 400 34.67px/1.5 var(--head);
}
.content h2.sec.tight { margin-top: 25.66px; }
.content h2.sec.hub { margin-top: 27.66px; }
.content.p-research-publications h2.sec { margin-top: 44.16px; }
.content > h2.sec:first-child, .content.p-research-publications > h2.sec:first-child { margin-top: -1.9px; }
/* Unterüberschriften (18 pt), z. B. im Impressum */
.content h3.sub {
  margin: 36.2px 0 17.3px;
  padding: 0 8px;
  color: var(--accent);
  font: 400 24px/1.5 var(--head);
}
.content h3.sub.x { margin-top: 45.2px; }
.content.p-imprint p { padding-right: 19px; }
.content .lead-s { padding-top: 18px; }
.content .big-num { font-size: 18px; line-height: 0; }
.content .big-num::after { content: ""; display: inline-block; height: 0; vertical-align: -9.3px; }

/* Eingebettete PDF-Datei (Lebenslauf) */
.embed-pdf {
  position: relative;
  height: 498px;
  margin: 55.8px 0 39px;
  background: #202124;
  overflow: hidden;
}
.pdf-pages {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 12px;
}
.pdf-pages img {
  display: block;
  width: min(800px, 100% - 24px);
  height: auto;
  margin: 0 auto 8px;
  background: #fff;
}
.pdf-open {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(32, 33, 36, .85);
}
.pdf-open svg { fill: #fff; }
.pdf-open:hover, .pdf-open:focus-visible { background: #3c4043; }
/* Kompakte Vorschaukarte am Handy (wie die Drive-Einbettung im Original) */
.pdf-card { display: none; }

/* Bilderkarussell (Pictures): Kachel über 9 von 12 Spalten, Seitenverhältnis 1,381 einschließlich
   einer leeren Zeile für Bildunterschriften; Pfeile erscheinen beim Darüberfahren oder Antippen */
.carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc(100% * 72.5 / 97.5);
  min-height: 0;
  aspect-ratio: 1.381 / 1;
  margin: 55.4px auto 16px;   /* zentriert (im Original rechtsbündig) */
}
.car-track {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 25.4px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: #f1f1f1;
}
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.car-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.car-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.car-btn {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, .7);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s;
}
.car-btn svg { fill: #fff; }
/* Mit Maus: beim Darüberfahren; mit Tastatur: solange ein Element den Fokus hat;
   am Handy: nach dem Antippen für drei Sekunden (Klasse .ctrl, per Skript) */
.carousel.ctrl .car-btn,
.carousel:has(.car-btn:focus-visible, .car-track:focus-visible) .car-btn { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .carousel:hover .car-btn { opacity: 1; }
}
.car-prev { left: 10px; }
.car-next { right: 10px; }

.portrait { margin: 32px 0 29px; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption { margin-top: 15px; padding: 0 8px; text-align: right; }

/* ---------- Fußbereich ---------- */
.site-footer { background: var(--accent); color: #fff; }
.site-footer .page { padding: 37px 8px 32px; }
.site-footer p { margin: 0; padding: 0; }
.site-footer .name { font: 400 34.67px/42px var(--head); }
.site-footer .links { font: 400 24px/38px var(--head); }
.site-footer .name + .links { margin-top: 24px; }

/* ---------- Handy ---------- */
@media (max-width: 767px) {
  :root { --gutter: 19.5px; }
  /* Handy: Textspalte 94 % minus 15 px (aus Messungen bei 360, 375 und 393 px Breite) */
  .page { width: calc(94% - 15px); margin: 0 auto; }

  .menu-btn {
    display: grid;
    place-items: center;
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 56px;
  }
  .menu-btn svg { fill: var(--ink); }
  .logo { left: 46px; }
  .brand-name, .main-nav { display: none; }
  /* Seitenmenü öffnen: das Menüsymbol dreht sich schnell, dann fährt das Menü von links herein */
  .menu-open .site-header { visibility: hidden; transition: visibility 0s .4s; }
  .menu-btn.spin svg { animation: spin-out .4s cubic-bezier(.4, 0, .2, 1); }

  .search-panel { height: 76px; padding: 14px 8px; }
  .search-card { width: auto; height: 48px; }
  .search-back { position: static; flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; }
  .search-icon { display: none; }
  .search-input { margin-left: 13.4px; }

  .drawer {
    display: block;
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(250px, 100% - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s .25s;
  }
  .menu-open .drawer { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, 0, .2, 1) .12s; }
  .menu-open .drawer-close svg { animation: spin-in .45s cubic-bezier(.2, 0, .2, 1) .1s both; }

  .drawer-close {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 56px;
    display: grid;
    place-items: center;
  }
  .drawer-close svg { fill: var(--ink); }

  .drawer-nav, .drawer-nav ul { margin: 0; padding: 0; list-style: none; }
  .drawer-nav { padding: 56px 0 24px; }
  .drawer-nav li { position: relative; }
  .drawer-nav a {
    display: block;
    padding: 8px 16px 8px 40px;
    color: var(--grey);
    font: 400 16px/25.4px var(--sans);
    text-decoration: none;
  }
  .drawer-nav a:hover, .drawer-nav a:focus-visible { color: var(--ink); }
  .drawer-nav .current > a { color: var(--ink); }
  .drawer-nav .sub { display: none; }
  .drawer-nav .open > .sub { display: block; }
  .drawer-nav .sub a { padding-left: 60px; }
  .toggle {
    position: absolute;
    left: 13px;
    top: 6.7px;
    width: 30px;
    height: 28px;
    display: grid;
    place-items: center;
  }
  .toggle svg { fill: var(--grey); transition: transform .2s; }
  .toggle:hover svg, .toggle:focus-visible svg { fill: var(--ink); }
  .open > .toggle svg { transform: rotate(180deg); }

  .hero { height: 300px; }
  .content h2.sec { margin: 44px 0 16.25px; padding-right: 8px; font-size: 26.67px; }
  /* Einige Überschriften sind im Original am Handy etwas größer */
  .content h2.sec.lg { font-size: 28px; }
  .content h2.sec.md { font-size: 27.5px; }
  .content h2.sec.tight { margin-top: 27.5px; }
  .content > h2.sec:first-child, .content.p-research-publications > h2.sec:first-child { margin-top: -0.5px; }
  .content.p-about, .content.p-research, .content.p-teaching { padding-bottom: 57px; }
  /* Projects: Textfelder im Original am Handy schmaler */
  .content.p-research-projects p, .content.p-research-projects h2.sec { padding-right: 24px; }
  .hero h1 { top: 148px; font-size: 40px; }
  .hero .bar { top: 204px; }

  .carousel { width: 100%; margin-top: 58.8px; }
  .embed-pdf { display: none; }
  .pdf-card {
    display: block;
    margin: 55px 0 39px;
    border: 1px solid #e3e3e3;
    background: #000;
    padding-top: 9px;
    color: #202124;
    text-decoration: none;
  }
  .pdf-card-prev { display: block; height: 198px; overflow: hidden; background: #fff; }
  .pdf-card-prev img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
  .pdf-card-name {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    margin-top: 9px;
    padding: 0 13px;
    background: #f2f2f2;
    font: 400 16px/1 var(--head);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pdf-card-name svg { flex: 0 0 22px; fill: #d93025; }

  .site-footer .page { padding: 36px 8px 34px; }
  .site-footer .name { font-size: 26.67px; line-height: 32px; }
  .site-footer .links { font-size: 20px; line-height: 30.67px; }
  .site-footer .name + .links { margin-top: 24px; }
}

@keyframes spin-out { to { transform: rotate(720deg); } }
@keyframes spin-in { from { transform: rotate(-540deg); } to { transform: rotate(0deg); } }

@media (prefers-reduced-motion: reduce) {
  .drawer, .scrim, .toggle svg { transition: none !important; }
  .menu-btn svg, .drawer-close svg { animation: none !important; }
  .menu-open .site-header { transition: none; }
  .car-track { scroll-behavior: auto; }
}
