/* Fonts */
@font-face {
  font-family: 'WSLammerhuber';
  src: url('../fonts/WSLammerhuberVFRoman.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 800;
  font-display: fallback;
}

@font-face {
  font-family: 'WSLammerhuber';
  src: url('../fonts/WSLammerhuberVFItalic.woff2') format('woff2');
  font-style: italic;
  font-weight: 100 800;
  font-display: fallback;
}

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

/* Base */
html {
  font-size: 16px;
}

body {
  margin: 0;
  background: #000134;
  color: #eee;
  font-family: 'WSLammerhuber', 'Libre Franklin', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.66;
}

h1, h2, h3, h4, h5, h6 {
  clear: both;
  line-height: 1.4;
  margin: 0 0 0.75em;
  padding: 0.5rem 0 0;
}

h1:first-child, h2:first-child, h3:first-child,
h4:first-child, h5:first-child, h6:first-child {
  padding-top: 0;
}

h1 {
  font-size: 2rem;
  font-weight: 200;
  color: #fff79e;
}

h2 {
  font-size: 1.75rem;
  font-weight: 300;
  
}

h3 {
  font-size: 1.5rem;
  font-weight: 100;
  color: #eee;
  text-indent: 2rem;
}

h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #eee;
}

h5 {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #aaa;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
  color: #eee;
  letter-spacing: 0.2;
}

p {
  margin: 0 0 1.5rem;
  padding: 0;
}

.drop-cap::first-letter {
  float: left;
  font-size: 5.7em;
  margin-top: 0.06em;
  margin-right: 0.08em;
  margin-bottom: 0;
  font-weight: 100;
}

@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
  .drop-cap::first-letter {
    float: none;
    font-size: unset;
    margin-top: unset;
    margin-bottom: unset;
    -webkit-initial-letter: 3;
    initial-letter: 3;
    font-weight: 100;
    margin-right: 0.12em;
  }
}

.outdent {
  text-indent: -1.5rem;
}

em, i, dfn, cite {
  font-style: italic;
}

strong, b {
  font-weight: 700;
}

sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  top: -0.5em;
}

hr {
  border: none;
  border-top: 2px solid #d1471d;
  margin: 1.5em 0;
}

img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

/* Links */
a {
  color: #eee;
  text-decoration: none;
}

a:hover, a:active {
  color: #d1471d;
  outline: 0;
}

/* Layout */
.site {
  position: relative;
  word-wrap: break-word;
}

.wrap {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Hero image — sticky behind everything, full viewport height */
.header-image {
  position: sticky;
  top: 0;
  z-index: 0;
  width: 100%;
  height: 70vh;
  overflow: hidden;
  background-image: var(--bg-image, url(/images/bckgr/EN-collage001.jpg));
  background-size: cover;
  background-position: center;
}

/* Site header — in normal flow, pulled up over the image by 70vh,
   scrolls away with the rest of the page */
.site-header {
  position: relative;
  z-index: 2;
  margin-top: -70vh;
  height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Back arrow */
.site-back {
  display: inline-block;
  margin-bottom: 0.6em;
}

.site-back img {
  display: block;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.site-back:hover img {
  opacity: 1;
}

/* Site branding — floats over the image at the bottom */
.site-branding {
  padding: 1em 0 1.25em;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.site-title {
  font-size: 3rem;
  font-weight: 100;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
  padding: 0;
  clear: none;
  color: #fff;
}

.site-title a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-title a:hover,
.site-title a:focus {
  opacity: 0.7;
  color: #fff;
}

.site-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-bottom: 0;
}

/* Navigation bar — sits at the very bottom of the header */
.navigation-top {
  background: #000134;
  border-top: 1px solid #333;
  font-size: 1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.navigation-top::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #d1471d;
  z-index: 1;
}

.navigation-top .wrap,
.site-branding .wrap {
  padding-top: 0;
  padding-bottom: 0;
}

.navigation-top .wrap,
.site-branding .wrap,
.site-content .wrap,
.site-footer .wrap {
  max-width: 1000px;
}

.main-navigation {
  clear: both;
  display: block;
  margin-left: -1.25em;
}

.main-navigation ul {
  background: transparent;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.main-navigation li {
  display: inline-block;
}

.main-navigation a {
  display: block;
  padding: 1em 1.25em;
  text-decoration: none;
  color: #eee;
  font-weight: 600;
  transition: color 0.2s;
}

.main-navigation a:hover {
  color: #aaa;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: #aaa;
}

/* Sub-menu drawer — full-width horizontal panel below nav bar */
.main-navigation .sub-menu {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111f5d;
  border-bottom: 2px solid #d1471d;
  z-index: 100;
  list-style: none;
  padding: 0.4em max(2rem, calc((100% - 1000px) / 2 + 2rem));
  margin: 0;
  flex-direction: row;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.main-navigation li.sub-menu--open > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sub-menu li {
  border-bottom: none;
}

.sub-menu a {
  font-weight: 400;
  font-size: 0.9rem;
  white-space: nowrap;
  letter-spacing: 0;
  padding: 0.2em 0;
  text-transform: none;
  display: block;
}

/* Content */
.site-content {
  background-color: #355378;
  position: relative;
  z-index: 1;
  padding: 2.5em 0;
  transition: margin-top 0.2s ease;
}

/* Entry header — page title style matches WP theme exactly */
.entry-header {
  padding: 0;
}

.entry-header img,
.entry-header figure {
  max-width: 100%;
  height: auto;
  margin: 0;
  display: block;
  padding-bottom: 2rem;
}

.entry-title {
  color: #eee;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.25em;
  padding-top: 0;
}


/* Hanging indent for CV and publication list entries */
.cv-list h2 ~ p,
.cv-list h3 ~ p,
.entry-content.cv-list p {
  text-indent: -1.5em;
  padding-left: 1.5em;
}

/* Page TOC (publications, vorträge) */
ul.toc {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

ul.toc li {
  text-indent: -1.5em;
  padding-left: 1.5em;
}

ul.toc ul {
  list-style: none;
  margin: 0;
  padding-left: 1.5em;
  padding-top: 0;
}

ul.toc ul li {
  text-indent: -1.5em;
  padding-left: 1.5em;
}


/* Two-column layout: title left, content right */
@media (min-width: 768px) {
  .entry-header {
    float: left;
    width: 36%;
  }

  .entry-content {
    float: right;
    width: 58%;
  }

  main::after {
    content: '';
    display: block;
    clear: both;
  }
}

/* Sticky TOC layout (publications, vorträge) */
@media (min-width: 768px) {
  main.toc-layout > article {
    display: flex;
    align-items: flex-start;
    gap: 6%;
  }

  main.toc-layout .entry-header {
    float: none;
    width: 36%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding-top: 2.5em;
  }

  main.toc-layout .entry-content {
    float: none;
    flex: 1;
  }

  main.toc-layout .entry-content > h1:first-of-type,
  main.toc-layout .entry-content > h2:first-of-type {
    padding-top: 0;
  }

  main.toc-layout::after {
    display: none;
  }
}

/* Full-width figure below both columns */
figure.full-width {
  clear: both;
  background: #fff;
  margin: 0 calc(-50vw + 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

figure.full-width img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  display: block;
}

figure.full-width figcaption {
  max-width: 1000px;
  width: 100%;
}

/* Entry content links get underline treatment */
.entry-content a {
  box-shadow: inset 0 -1px 0 rgba(240, 240, 240, 1);
  transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
  color: #eee;
}

.entry-content a:focus,
.entry-content a:hover {
  color: #fff;
  box-shadow: inset 0 0 0 rgba(0,0,0,0), 0 3px 0 rgba(255,255,255,1);
}

.entry-content img.alignleft {
  float: left;
  margin: 0.25rem 1.5rem 1rem 0;
}

.entry-content img.alignright {
  float: right;
  margin: 0.25rem 0 1rem 1.5rem;
}

.entry-content img.aligncenter {
  display: block;
  margin: 0 auto 1rem;
}

/* Figure */
.entry-content figure {
  margin: 1em 0;
}

.entry-content figcaption,
.entry-header figcaption,
.photo-caption {
  font-size: 0.65rem;
  color: #858585;
  margin-top: 0.5em;
  text-align: right;
}

/* Footer */
.site-footer {
  border-top: 1px solid #333;
  font-size: 0.75rem;
  padding: 2rem 0 1.5rem;
  background-color: #1e4069;
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5em;
}

.footer-links a {
  color: #aaa;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 1);
  transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
}

.footer-links a:focus,
.footer-links a:hover {
  color: #fff;
  box-shadow: inset 0 0 0 rgba(0,0,0,0), 0 3px 0 rgba(255,255,255,1);
}

.site-info {
  margin-bottom: 1em;
  color: #aaa;
}

/* Responsive */
@media (max-width: 800px) {
  .wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header-image {
    height: 100svh;
  }

  .site-header {
    height: 100svh;
    margin-top: -100svh;
  }

  .main-navigation li {
    display: block;
    border-bottom: 1px solid #333;
  }

  .main-navigation li:last-child {
    border-bottom: 0;
  }

  .main-navigation {
    margin-left: 0;
  }

  .main-navigation a {
    padding: 0.5em 0;
  }

  .main-navigation .sub-menu {
    position: static;
    flex-direction: column;
    gap: 0;
    border: none;
    border-left: 2px solid #333;
    border-bottom: none;
    padding: 0 0 0 0.75em;
    transform: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease;
  }

  .main-navigation li.sub-menu--open > .sub-menu {
    max-height: 20em;
    padding-bottom: 0.5em;
    opacity: 1;
  }

  .main-navigation .sub-menu li {
    border-bottom: none;
  }
}

