:root{
  --bg:#f3f7f1;
  --paper:#ffffff;
  --ink:#152018;
  --muted:#5f6f64;
  --line:#d7e3d8;
  --brand:#1f5f3b;
  --brand-dark:#123923;
  --brand-2:#3f8f5a;
  --accent:#a6c36f;
  --soft:#e8f1e8;
  --shadow:0 18px 48px rgba(20,48,30,.10);
  --radius:18px;
  --max:1160px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:linear-gradient(180deg,#fbfdf9 0%,var(--bg) 42%,#fff 100%);color:var(--ink);line-height:1.58;font-size:16px}
a{color:var(--brand);font-weight:700;text-decoration-thickness:.08em;text-underline-offset:.18em}a:hover{color:var(--brand-dark)}img{max-width:100%;height:auto;border-radius:12px}.skip{position:absolute;left:-999px;top:1rem;background:var(--brand-dark);color:white;padding:.75rem 1rem;border-radius:12px}.skip:focus{left:1rem;z-index:99}.topbar{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.9);backdrop-filter:blur(18px);border-bottom:1px solid rgba(215,227,216,.95)}.nav{max-width:var(--max);margin:auto;padding:.72rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.brand{display:flex;gap:.7rem;align-items:center;text-decoration:none;color:var(--ink)}.mark{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,var(--brand-dark),var(--brand-2));color:#fff;display:grid;place-items:center;font-weight:900;box-shadow:0 8px 24px rgba(31,95,59,.22)}.brand span:last-child{font-weight:850;letter-spacing:-.02em}.links{display:flex;gap:.1rem;flex-wrap:wrap;justify-content:flex-end}.links a{text-decoration:none;color:var(--muted);padding:.48rem .64rem;border-radius:999px;font-size:.92rem}.links a[aria-current="page"],.links a:hover{background:var(--soft);color:var(--brand-dark)}.hero{max-width:var(--max);margin:auto;padding:2.4rem 1rem 1.4rem;display:block;border-bottom:1px solid var(--line)}.eyebrow{display:inline-flex;gap:.45rem;align-items:center;background:rgba(63,143,90,.12);border:1px solid rgba(63,143,90,.22);color:var(--brand);font-weight:850;padding:.32rem .65rem;border-radius:999px;font-size:.84rem}.hero h1{font-size:clamp(2rem,4.2vw,3.6rem);line-height:1.04;letter-spacing:-.045em;margin:.7rem 0 .55rem;max-width:18ch;color:var(--brand-dark)}.lead{font-size:clamp(1rem,1.7vw,1.18rem);color:var(--muted);max-width:76ch;margin:.4rem 0 0}.dual-role{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-top:1rem;max-width:900px}.role{background:rgba(255,255,255,.82);border:1px solid var(--line);border-radius:14px;padding:.82rem .95rem}.role strong{display:block;color:var(--brand-dark);font-size:.98rem}.role span{color:var(--muted);font-size:.9rem}.quick-actions{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:1rem}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.62rem .88rem;border-radius:999px;text-decoration:none;font-weight:850}.btn.primary{background:var(--brand);color:white;box-shadow:0 10px 28px rgba(31,95,59,.22)}.btn.secondary{background:white;color:var(--brand-dark);border:1px solid var(--line)}main{max-width:var(--max);margin:auto;padding:1.25rem 1rem 3.5rem}.content-card{background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:20px;padding:clamp(1rem,2.2vw,1.7rem);box-shadow:var(--shadow)}.content-card h1,.content-card h2,.content-card h3,.content-card h4{letter-spacing:-.025em;color:var(--brand-dark);line-height:1.2}.content-card h3{font-size:clamp(1.35rem,2.4vw,2rem);margin:0 0 .85rem}.content-card h4{font-size:clamp(1.08rem,1.8vw,1.38rem);margin:1.6rem 0 .55rem;border-top:1px solid var(--line);padding-top:1rem}.content-card b{color:var(--brand)}.content-card table{width:100%;border-collapse:collapse}.content-card td{vertical-align:top;padding:.22rem}.content-card ul{padding-left:1.2rem}.content-card li{margin:.28rem 0}.content-card img{margin:.65rem 0}.content-card hr{border:0;border-top:1px solid var(--line);margin:1.2rem 0}.youtube-panel{margin:1.5rem 0;padding:1.15rem;border-radius:18px;background:linear-gradient(135deg,var(--brand-dark),var(--brand));color:white}.youtube-panel a{color:white}.youtube-panel p{color:rgba(255,255,255,.82)}.footer{max-width:var(--max);margin:auto;padding:1.6rem 1rem 3rem;color:var(--muted);display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;font-size:.94rem}code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}@media(max-width:900px){.dual-role{grid-template-columns:1fr}.links{display:none}.hero{padding-top:1.8rem}}@media(max-width:560px){.nav{align-items:flex-start}.brand span:last-child{font-size:.92rem}.content-card{border-radius:16px}.hero h1{max-width:none}}


/* === refinement update === */
.mark{
  width:42px;
  height:42px;
  font-size:0.95rem;
}

.brand-title{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}

.brand-title strong{
  font-size:0.95rem;
}

.brand-title span{
  color:var(--muted);
  font-size:0.78rem;
  font-weight:600;
}

.hero{
  padding-top:1.6rem;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:2rem;
  align-items:center;
}

.hero h1{
  font-size:2.1rem !important;
  line-height:1.1;
}

.hero p{
  max-width:65ch;
}

.hero-photo{
  text-align:right;
}

.hero-photo img{
  max-width:320px;
  border:1px solid #111;
  border-radius:12px;
}

.fullwidth-image img{
  width:100%;
  display:block;
}

.book-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1rem;
}

.book-grid img,
.book img,
.publication-book img{
  border:1px solid #111;
  border-radius:4px;
}

.press-item{
  background:#fff;
  border:1px solid var(--line);
  padding:1rem;
  border-radius:10px;
  margin-bottom:1rem;
}

.ongoing{
  color:#b00020 !important;
  font-weight:800;
}

.timeline td:first-child{
  width:180px;
  white-space:nowrap;
}

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

  .hero-photo{
    text-align:left;
  }

  .book-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

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


/* === v4 targeted corrections === */
.brand-title strong{font-size:.82rem!important;letter-spacing:-.01em;line-height:1.1;}
.brand-title span{font-size:.72rem!important;line-height:1.15;}
.mark{width:40px!important;height:40px!important;font-size:.86rem!important;}
.hero h1{font-size:clamp(1.55rem,2.4vw,2.25rem)!important;max-width:none!important;margin:.5rem 0 .35rem!important;}
.hero{padding-top:1.15rem!important;padding-bottom:1rem!important;}
.dual-role{margin-top:.75rem!important;}
.quick-actions{display:none!important;}
#leftside,.avmenu,h2.hide,#footer{display:none!important;}

.profile-intro{display:grid;grid-template-columns:1fr 220px;gap:1.5rem;align-items:start;margin-bottom:1rem;}
.profile-text h3{font-size:1.45rem!important;margin-bottom:.65rem;}
.profile-photo{margin:0;}
.profile-photo img{width:100%;border:1px solid #111;border-radius:10px;display:block;}

.hobby{margin:.75rem 0 1.2rem;}
.hobby img{width:100%!important;max-width:none!important;display:block;border-radius:12px;}
.hobby figcaption{margin-top:.65rem;color:var(--ink);font-size:1rem;}
.fullwidth-image{width:100%;}
.fullwidth-image img{width:100%!important;max-width:none!important;}

.book-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1rem!important;align-items:stretch;margin:1rem 0;}
.book-grid a{display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #111;border-radius:6px;padding:.6rem;min-height:250px;}
.book-grid img{width:100%!important;height:230px!important;object-fit:contain!important;border:0!important;border-radius:0!important;margin:0!important;}

.publications-page .content-card table td:last-child{width:180px;}
.publications-page .content-card table td:last-child img{width:155px!important;height:225px!important;object-fit:contain!important;border:1px solid #111!important;border-radius:4px!important;background:#fff;padding:.25rem;margin:.25rem auto!important;display:block;}
.press-list{display:grid;gap:.65rem;margin-top:.75rem;}
.press-item{background:#fff;border:1px solid var(--line);border-left:4px solid var(--brand);padding:.85rem 1rem;border-radius:10px;line-height:1.45;}

.lehre-page .content-card img{width:100%!important;max-width:none!important;height:auto!important;display:block;margin:.8rem 0!important;}
.lehre-page .content-card img + img{margin-top:.8rem!important;}
.lehre-page #frontphoto{width:100%!important;}

.ongoing{color:#b00020!important;font-weight:900!important;}
.timeline td:first-child{width:210px!important;white-space:nowrap!important;}

@media(max-width:760px){
  .profile-intro{grid-template-columns:1fr;}
  .profile-photo img{max-width:260px;}
  .book-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:460px){.book-grid{grid-template-columns:1fr!important;}}


/* === v5 correction pass === */
/* Header identity: compact and identical on all pages */
.brand-title{display:flex!important;flex-direction:column!important;line-height:1.12!important;}
.brand-title strong{font-size:.78rem!important;line-height:1.08!important;font-weight:850!important;letter-spacing:-.01em!important;}
.brand-title span{font-size:.68rem!important;line-height:1.12!important;color:var(--muted)!important;font-weight:650!important;}
.mark{width:38px!important;height:38px!important;font-size:.82rem!important;border-radius:10px!important;}

/* Old content headers from the legacy pages must not dominate the page. */
.content-card #header h3{font-size:1rem!important;line-height:1.25!important;margin:.2rem 0 .75rem!important;letter-spacing:0!important;}

/* Only the top section image below the page title is full-width. */
#frontphoto{width:100%!important;max-width:none!important;height:auto!important;display:block!important;margin:.75rem 0 1.2rem!important;border-radius:12px!important;}

/* Revert the mistaken rule that enlarged every teaching image. */
.lehre-page .content-card img:not(#frontphoto){width:auto!important;max-width:100%!important;height:auto!important;display:inline-block!important;margin:.55rem .75rem .55rem 0!important;}

/* Apply the same wide top image behavior to all subpages. */
.thesis-page #frontphoto,
.publications-page #frontphoto,
.conferences-page #frontphoto,
.persoenliches-page #frontphoto{width:100%!important;max-width:none!important;display:block!important;}

/* Profile: keep hero text as-is; make contact area balanced. */
.index-page .profile-intro{display:grid!important;grid-template-columns:minmax(0,1fr) 220px!important;gap:1.35rem!important;align-items:start!important;}
.index-page .profile-text h3{font-size:1.28rem!important;line-height:1.2!important;margin:.1rem 0 .6rem!important;}
.index-page .profile-photo img{width:100%!important;height:auto!important;border:0!important;border-radius:10px!important;}

/* Hobby image: full width of the content column, text below. */
.index-page figure.hobby{display:block!important;width:100%!important;margin:.8rem 0 1.25rem!important;}
.index-page figure.hobby img{display:block!important;width:100%!important;max-width:none!important;height:auto!important;margin:0 0 .65rem 0!important;}
.index-page figure.hobby figcaption{display:block!important;width:100%!important;margin:.35rem 0 0!important;clear:both!important;}

/* Profile book overview: four columns; frame only around these profile book cards. */
.index-page .profile-books{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1rem!important;align-items:stretch!important;}
.index-page .profile-books a{display:flex!important;align-items:center!important;justify-content:center!important;min-height:240px!important;padding:.6rem!important;border:1px solid #111!important;border-radius:4px!important;background:#fff!important;}
.index-page .profile-books img{width:100%!important;height:220px!important;object-fit:contain!important;border:0!important;margin:0!important;}

/* Publications: calm previous version, no black frames, no forced right-column book boxes. */
.publications-page .content-card img:not(#frontphoto){border:0!important;border-radius:8px!important;background:transparent!important;padding:0!important;max-width:100%!important;height:auto!important;object-fit:initial!important;}
.publications-page .content-card table td:last-child{width:auto!important;}
.publications-page .content-card table td:last-child img{width:auto!important;height:auto!important;border:0!important;padding:0!important;margin:.65rem 0!important;display:inline-block!important;}
.book-grid img,.book img,.publication-book img{border:0!important;}
.publications-page .book-grid,
.publications-page .profile-books{display:block!important;}

@media(max-width:760px){
  .index-page .profile-intro{grid-template-columns:1fr!important;}
  .index-page .profile-photo img{max-width:260px!important;}
  .index-page .profile-books{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:460px){.index-page .profile-books{grid-template-columns:1fr!important;}}


/* === v6 consistency pass === */
/* The institutional hero is identical on all pages. */
.hero h1{font-size:clamp(1.9rem,3.4vw,2.55rem)!important;line-height:1.08!important;letter-spacing:-.04em!important;}
.hero .lead{font-size:clamp(1.02rem,1.55vw,1.18rem)!important;max-width:76ch!important;}

/* The legacy inner page header should stay subordinate. */
.content-card #header h3{font-size:.98rem!important;line-height:1.25!important;font-weight:750!important;color:var(--muted)!important;}

/* Only the section image below the title is wide; inline content images keep their original size. */
#frontphoto{width:100%!important;max-width:none!important;height:auto!important;display:block!important;margin:.75rem 0 1.2rem!important;}
.content-card img:not(#frontphoto){width:auto!important;max-width:100%!important;height:auto!important;display:inline-block!important;margin:.55rem .75rem .55rem 0!important;}

/* Publications: keep the calm layout, but make all book covers visually equal without frames. */
.publications-page img[src*="/stuff/buch"],
.publications-page img[src$="buch.jpg"],
.publications-page img[src$="haskellbuch.jpg"]{
  width:155px!important;
  height:225px!important;
  object-fit:contain!important;
  border:0!important;
  background:transparent!important;
  padding:0!important;
  border-radius:0!important;
  display:block!important;
  margin:.4rem auto!important;
}

/* Personal page: after removing the extra chess image, the private data block can use the full width. */
.persoenliches-page table.timeline:first-of-type td:first-child{width:auto!important;white-space:normal!important;}


/* === v7 final fine-tuning: only requested changes === */
.hero-inner{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 180px!important;
  gap:1.35rem!important;
  align-items:center!important;
}
.hero-copy{min-width:0!important;}
.hero-person{margin:0!important;justify-self:end!important;align-self:center!important;}
.hero-person img{
  width:170px!important;
  max-width:170px!important;
  height:auto!important;
  display:block!important;
  border-radius:12px!important;
  margin:0!important;
}
.index-page .profile-intro.single-column{
  display:block!important;
  margin-bottom:1rem!important;
}
.index-page figure.hobby,
.index-page .hobby.fullwidth-image{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  clear:both!important;
}
.index-page figure.hobby img,
.index-page .hobby.fullwidth-image img{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  margin:.55rem 0 .7rem 0!important;
  float:none!important;
}
.index-page figure.hobby figcaption,
.index-page .hobby.fullwidth-image figcaption{
  display:block!important;
  width:100%!important;
  clear:both!important;
  margin:0!important;
  float:none!important;
}
.publications-page img[src="assets/img/buch.jpg"],
.publications-page img[src="assets/img/haskellbuch.jpg"]{
  width:155px!important;
  min-width:155px!important;
  max-width:155px!important;
  height:225px!important;
  object-fit:contain!important;
  display:block!important;
  margin:.4rem auto!important;
}
@media(max-width:760px){
  .hero-inner{grid-template-columns:1fr!important;}
  .hero-person{justify-self:start!important;}
  .hero-person img{width:150px!important;max-width:150px!important;}
}


/* === v8 targeted refinements only === */
.hero-inner{
  grid-template-columns:minmax(0,1fr) 230px!important;
  align-items:end!important;
}
.hero-person{
  align-self:end!important;
  justify-self:end!important;
}
.hero-person img{
  width:210px!important;
  max-width:210px!important;
  height:258px!important;
  object-fit:cover!important;
  object-position:center top!important;
}
.index-page .profile-intro.profile-two-column{
  display:block!important;
  margin-bottom:1rem!important;
}
.index-page .profile-heading h3{
  margin-bottom:.25rem!important;
}
.index-page .profile-heading p{
  margin:.15rem 0 1rem!important;
  color:var(--muted)!important;
}
.index-page .profile-affiliations{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:1rem!important;
  margin:1rem 0!important;
}
.index-page .profile-affiliation{
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  padding:1rem!important;
  background:#fff!important;
}
.index-page .profile-affiliation h4{
  border-top:0!important;
  padding-top:0!important;
  margin:0 0 .55rem!important;
}
.index-page .content-card figure.hobby.fullwidth-image,
.index-page .content-card .hobby.fullwidth-image{
  width:100%!important;
  max-width:none!important;
  display:block!important;
  clear:both!important;
  margin:.8rem 0 1.25rem!important;
}
.index-page .content-card figure.hobby.fullwidth-image img:not(#frontphoto),
.index-page .content-card .hobby.fullwidth-image img:not(#frontphoto){
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  display:block!important;
  margin:0 0 .65rem 0!important;
  float:none!important;
}
.index-page .content-card figure.hobby.fullwidth-image figcaption,
.index-page .content-card .hobby.fullwidth-image figcaption{
  display:block!important;
  width:100%!important;
  clear:both!important;
  margin:.35rem 0 0!important;
}
.publications-page .content-card img[src="assets/img/buch.jpg"]:not(#frontphoto),
.publications-page .content-card img[src="assets/img/haskellbuch.jpg"]:not(#frontphoto),
.publications-page .content-card img[src*="/stuff/buch"]:not(#frontphoto){
  width:180px!important;
  min-width:180px!important;
  max-width:180px!important;
  height:260px!important;
  object-fit:contain!important;
  border:0!important;
  background:transparent!important;
  padding:0!important;
  border-radius:0!important;
  display:block!important;
  margin:.4rem auto!important;
}
@media(max-width:760px){
  .hero-inner{grid-template-columns:1fr!important;}
  .hero-person{justify-self:start!important;}
  .hero-person img{width:170px!important;max-width:170px!important;height:210px!important;}
  .index-page .profile-affiliations{grid-template-columns:1fr!important;}
}

/* === FINAL FIX: Profilseite Bücher ===
   4 Bücher nebeneinander beibehalten.
   Java- und Haskell-Cover werden genauso hoch dargestellt wie die anderen Cover.
*/
.index-page .profile-books {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: stretch !important;
}

.index-page .profile-books a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 340px !important;
  padding: .6rem !important;
  border: 1px solid #111 !important;
  border-radius: 4px !important;
  background: #fff !important;
}

.index-page .profile-books img {
  width: 100% !important;
  height: 310px !important;
  max-width: none !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
}

@media (max-width: 900px) {
  .index-page .profile-books {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .index-page .profile-books {
    grid-template-columns: 1fr !important;
  }
}

/* Lieblingsbeschäftigung auf Persönliches-Seite volle Breite */
.persoenliches-page figure.hobby.fullwidth-image {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: .8rem 0 1.25rem !important;
  clear: both !important;
}

.persoenliches-page figure.hobby.fullwidth-image img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 0 .65rem 0 !important;
  float: none !important;
}

.persoenliches-page figure.hobby.fullwidth-image figcaption {
  display: block !important;
  width: 100% !important;
  clear: both !important;
  margin: .35rem 0 0 !important;
}
