/* === Local Quattrocento Sans Fonts === */
@font-face {
  font-family: 'Quattrocento Sans';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/quattrocento-sans-v22-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Quattrocento Sans';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/quattrocento-sans-v22-latin-700.woff2') format('woff2');
}

/* === Base Body === */
body {
  margin: 0;
  font-family: 'Quattrocento Sans', sans-serif;
  /* Fluid font scaling */
  font-size: clamp(1em, 1.8vw + 0.5em, 1.2em);
  line-height: 1.6;
  color: #222;

/*  text-align: justify;          /* Alternative für Blocksatz */
/*  hyphens: auto;                /* automatische Silbentrennung */
/* -webkit-hyphens: auto;        /* Safari / iOS */
/* -ms-hyphens: auto;            /* legacy Edge */
/*  overflow-wrap: break-word;    /* clean fallback for long words */


  background: linear-gradient(to bottom, #fcfbf9, #f2eee9);
  min-height: 100vh;
}

/* === Main Container === */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4em 5em;
  background-color: #fff;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  border-radius: 6px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header with Portrait === */
.header-with-photo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0;
}

header h1, .portrait {
  display: inline-block;
  vertical-align: top;
}

header h1 {
  font-weight: 700;
  /* Fluid scaling for title */
  font-size: clamp(1.2em, 2.5vw + 0.5em, 1.6em);
  color: #800000;
  margin: 0;
  line-height: 1.2;
}

.portrait {
  max-width: 20%;
  height: auto;
  border-radius: 0;
  margin-left: 1em;
  margin-top: 0.05em;
  margin-bottom: -1.5em;
}

/* === Section Headings === */
h2 {
  font-weight: 700;
  /* Fluid scaling for subtitles */
  font-size: clamp(1em, 1.8vw + 0.4em, 1.3em);
  color: #800000;
  margin-top: 1.5em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3em;
  margin-bottom: 0.6em;
}

/* === Contact Table === */
.contact-table {
  border-collapse: collapse;
  margin-top: 0.5em;
}

.contact-table td {
  vertical-align: top;
  padding: 0.3em 2em 0.3em 0;
}

.contact-table td:first-child {
  color: #800000;
  font-weight: 600;
  white-space: nowrap;
}

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

a:hover {
  text-decoration: underline;
}

/* === Toggle Link for Publications === */
.toggle-link {
  font-size: 0.95em;
  color: #800000;
  cursor: pointer;
}

.toggle-link:hover {
  text-decoration: underline;
}

/* === Publications List === */
#publications {
  margin-top: 0em;
}

.hidden {
  display: none;
}

/* === Lecture Notes List === */
#notes {
  margin-top: 0em;
}

.hidden {
  display: none;
}

/* === Footer === */
footer {
  text-align: center;
  color: #666;
  font-size: clamp(0.5em, 1.2vw + 0.3em, 0.6em);
  margin-top: 8em;
  margin-bottom: -4em;
}

/* === Lists === */
ul {
  list-style: none;
  padding-left: 1em;
}

ul li {
  position: relative;
  padding-left: 1em;
  padding-bottom: 0.4em;
}

ul li::before {
  content: "\25B8";
  position: absolute;
  left: 0;
  font-size: 0.9em;
  color: #800000;
}

/* === Responsive Adjustments === */
@media (max-width: 600px) {

  .page-container {
    padding: 1.5em;
  }

  .header-with-photo {
    flex-direction: row;
    align-items: flex-start; /* Align top of photo with top of title */
    justify-content: flex-start;
  }

  .portrait {
    max-width: 25%;
    margin-left: 0.8em;
    margin-top: 0.05em;
    margin-bottom: 0;
  }

  .contact-table td {
    display: block;
    padding: 0.3em 0;
  }

  .contact-table td:first-child {
    display: inline-block;
    margin-right: 0.5em;
  }

  footer {
    margin-top: 4e

