/* Bonn institute homepage
 * Edit the colors and content width in :root.
 * Responsive rules follow the desktop styles.
 */

:root {
  --blue: #07529a;
  --deep: #064783;
  --gold: #ffbf00;
  --ink: #30383f;
  --light: #f2f5f7;
  --line: #d7e0e7;
  --width: 1220px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial,Helvetica,sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: white;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

.wrap {
  width: min(var(--width),calc(100% - 80px));
  margin: auto;
}

.skip {
  position: absolute;
  left: 20px;
  top: -100px;
  padding: 12px;
  background: white;
  z-index: 10;
}

.skip:focus {
  top: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  background: var(--deep);
  color: white;
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 58px;
}

.topbar a {
  color: white;
}


.languages {
  display: flex;
  gap: 17px;
  font-size: 14px;
}


.identity {
  padding: 35px 0 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.wordmark {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}


.identity-text {
  border-left: 1px solid var(--line);
  padding-left: 23px;
  font-size: 18px;
  line-height: 1.4;
  color: #52606b;
}

.desktop-nav {
  display: flex;
  justify-content: flex-end;
  gap: 30px;
  padding: 15px 0 28px;
}

.desktop-nav a {
  text-transform: uppercase;
  color: #30383f;
  font-size: 13px;
  letter-spacing: .025em;
}

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: center;
  isolation: isolate;
  background: #2a4655;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  z-index: -2;
}

.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(0,26,49,.66),rgba(0,26,49,.05));
  z-index: -1;
}

.hero-content {
  padding: 65px 0;
  color: white;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 13px;
  margin: 0 0 15px;
}

.hero h1 {
  font-size: clamp(32px,4.2vw,56px);
  line-height: 1.15;
  font-weight: 400;
  margin: 0;
  max-width: 850px;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.hero .rule {
  display: block;
  width: 65px;
  height: 4px;
  background: var(--gold);
  margin-top: 29px;
}

.photo-label {
  position: absolute;
  bottom: 14px;
  right: 25px;
  font-size: 12px;
  color: white;
}

.intro {
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 80px;
}

h2 {
  font-weight: 500;
  font-size: 32px;
  line-height: 1.25;
  color: var(--blue);
  margin: 0 0 22px;
}

.intro p {
  font-size: 18px;
  margin: 0 0 23px;
}

.button {
  display: inline-flex;
  gap: 35px;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border: 1px solid var(--blue);
  font-size: 15px;
}

.button:hover {
  background: var(--blue);
  color: white;
  text-decoration: none;
}

.contact {
  border-left: 4px solid var(--gold);
  padding-left: 28px;
}

.contact h2 {
  font-size: 24px;
}

.contact address {
  font-style: normal;
  margin-bottom: 15px;
}

.contact p {
  font-size: 16px;
  margin: 8px 0;
}

.sections {
  padding: 54px 0 65px;
  background: var(--light);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 25px;
}

.section-heading h2 {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
}

.card {
  position: relative;
  background: white;
  border-top: 3px solid var(--blue);
  padding: 27px 29px 43px;
  min-height: 180px;
  color: var(--ink);
  transition: background .15s;
}

.card h3 {
  font-size: 23px;
  font-weight: 400;
  color: var(--blue);
  margin: 0 0 9px;
}

.card p {
  margin: 0;
  font-size: 15px;
  max-width: 250px;
}

.card span {
  position: absolute;
  right: 25px;
  bottom: 14px;
  color: var(--blue);
  font-size: 26px;
}

.card:hover {
  background: #e5edf4;
  text-decoration: none;
}

.network {
  padding: 45px 0;
}

.network h2 {
  font-size: 25px;
}

.network-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.network-links a {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

footer {
  background: var(--deep);
  color: white;
  padding: 30px 0;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

footer p {
  margin: 0;
  font-size: 14px;
}

footer a {
  color: white;
  font-size: 14px;
}


/* Responsive, accessibility or print overrides */
@media(max-width:950px) {
  .desktop-nav {
    gap: 18px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .intro {
    gap: 35px;
  }

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

  .hero {
    min-height: 380px;
  }

}


/* Responsive, accessibility or print overrides */
@media(max-width:650px) {
  .wrap {
    width: calc(100% - 36px);
  }

  .topbar .wrap {
    min-height: 48px;
  }


  .identity {
    padding: 24px 0;
    gap: 15px;
  }


  .identity-text {
    font-size: 13px;
    padding-left: 15px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    border-top: 1px solid var(--line);
    padding: 10px 0 15px;
  }

  .mobile-nav summary {
    cursor: pointer;
    color: var(--blue);
    padding: 7px 0;
  }

  .mobile-nav nav {
    display: flex;
    flex-direction: column;
  }

  .mobile-nav a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 350px;
  }

  .hero-content {
    padding: 50px 0;
  }

  .hero h1 {
    font-size: 33px;
    overflow-wrap: break-word;
  }

  .hero img {
    object-position: 60% center;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 38px 0;
  }

  h2 {
    font-size: 28px;
  }

  .intro p {
    font-size: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card {
    min-height: 155px;
  }

  .sections {
    padding: 35px 0;
  }

  .network-links {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  footer .wrap {
    align-items: flex-start;
    flex-direction: column;
  }

}


/* Responsive, accessibility or print overrides */
@media(prefers-reduced-motion:reduce) {
  * {
    transition: none!important;
  }

}


/* Responsive, accessibility or print overrides */
@media print {
  .topbar,nav,.mobile-nav,.network,footer {
    display: none;
  }

  .hero {
    min-height: 200px;
    print-color-adjust: exact;
  }

  .wrap {
    width: 100%;
  }

  .intro {
    gap: 25px;
  }

  .card {
    break-inside: avoid;
  }

  .sections {
    background: white;
  }

}


.bonn-logo {
  display: block;
  width: 196px;
  max-width: 100%;
  height: auto;
}


/* Responsive, accessibility or print overrides */
@media(max-width:650px) {

  .bonn-logo {
    width: 176px;
    height: auto;
  }

  .identity {
    flex-wrap: wrap;
  }

  .identity-text {
    max-width: 100%;
  }

}

/* Local language switch: highlight the current page. */
.languages a + a {
  border-left: 1px solid #7294b5;
  padding-left: 17px;
}

.languages a[aria-current="page"] {
  font-weight: 700;
  text-decoration: none;
}

/* ================================================================
   Section pages: shared title, reading column and local navigation
   ================================================================ */
.page-banner {
  background: var(--light);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0 38px;
}

.breadcrumb {
  color: #52606b;
  font-size: 14px;
  margin-bottom: 15px;
}

.page-banner h1 {
  color: var(--blue);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.2;
  font-weight: 400;
  margin: 0;
}

/* A single content column uses the space formerly reserved for the sidebar. */
.subpage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-top: 45px;
  padding-bottom: 65px;
}

.section-content {
  min-width: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.section-content p {
  margin: 0 0 24px;
}

.section-content h2 {
  margin: 32px 0 20px;
  font-size: 26px;
}

.section-content > h2:first-child {
  margin-top: 0;
}

.section-content ul,
.section-content ol {
  padding-left: 24px;
  margin: 20px 0 30px;
}

.section-content li {
  margin-bottom: 12px;
}

.section-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 30px 0;
}

.section-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

.centered-image img {
  margin: 28px auto;
}

.section-sidebar {
  background: var(--light);
  border-top: 4px solid var(--gold);
  padding: 24px;
}

.section-sidebar h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.section-sidebar nav {
  display: flex;
  flex-direction: column;
}

.section-sidebar a {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
}

.section-sidebar a[aria-current="page"],
.desktop-nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  color: var(--deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* Research illustrations and the library overview replace layout tables. */
.illustrated-section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  margin: 32px 0;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.section-image img {
  max-height: 240px;
  width: auto;
  margin: auto;
}

.table-scroll {
  overflow-x: auto;
  margin: 26px 0;
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.reference-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

/* Staff members are grouped by their published roles.
   Two independent flex columns so each side packs freely without row alignment. */
.staff-groups {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.staff-groups-left,
.staff-groups-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1 1 0;
  min-width: 0;
}

.staff-group {
  border-top: 3px solid var(--blue);
  background: var(--light);
  padding: 22px;
}

.staff-group h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.staff-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.staff-group li:last-child {
  margin-bottom: 0;
}

.staff-group--scientific {
  padding-bottom: 11px;
}

.staff-group--scientific li {
  margin-bottom: 6px;
}

/* Semester archives and news stay readable as their lists grow. */
.teaching-content > ul {
  columns: 2;
  column-gap: 35px;
}

.teaching-content > ul > li {
  break-inside: avoid;
}

.news-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.news-categories a {
  font-size: 14px;
  padding: 5px 14px;
  border: 1px solid var(--line);
  color: var(--deep);
  text-decoration: none;
  background: var(--light);
}

.news-categories a:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.news-content > ul {
  list-style: none;
  padding: 0;
}

.news-content > ul > li {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin: 0;
}

@media (max-width: 950px) {
  .subpage-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 35px;
  }

  .section-sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
}

@media (max-width: 650px) {
  .subpage-layout {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .section-content {
    font-size: 16px;
  }

  .illustrated-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .staff-groups {
    flex-direction: column;
  }

  .section-image img {
    margin-left: 0;
  }

  .teaching-content > ul {
    columns: 1;
  }
}

@media print {
  .section-sidebar {
    display: none;
  }

  .subpage-layout {
    display: block;
  }
}

/* ================================================================
   Publications: year navigation and readable report entries
   ================================================================ */
.publication-link {
  margin: 26px 0 34px;
}

.publication-link .button {
  text-decoration: none;
  line-height: 1.5;
}

.publication-intro {
  font-size: 18px;
}

.year-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 8px;
  margin: 20px 0 45px;
}

.year-index a {
  display: block;
  padding: 9px 12px;
  background: var(--light);
  border: 1px solid var(--line);
  text-align: center;
  text-decoration: none;
}

.year-index a:hover,
.year-index a:focus-visible {
  background: var(--blue);
  color: white;
}

.publication-year {
  margin: 0 0 45px;
}

.publication-year-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 3px solid var(--blue);
  padding-bottom: 12px;
}

.publication-year-heading h2 {
  margin: 0;
  scroll-margin-top: 24px;
}

.publication-year-heading a {
  font-size: 14px;
}

.publications-content .publication-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.publication-list > li {
  padding: 22px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.75;
}

.publication-list b {
  color: var(--deep);
  font-weight: 600;
}

.publication-list > li:target {
  background: var(--light);
}

@media (max-width: 650px) {
  .publication-intro {
    font-size: 16px;
  }

  .publication-list > li {
    padding: 18px 0;
  }
}

/* Converted archive extension */

/* ================================================================
   Converted courses, semester archives and business cards
   ================================================================ */
.archive-content > h2:first-child {
  margin-top: 0;
}

.archive-content address {
  font-style: normal;
  line-height: 1.85;
  margin: 24px 0;
}

.archive-centered {
  text-align: center;
}

.archive-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 20px;
  background: var(--light);
  font-size: 14px;
}

.archive-content img {
  max-width: 100%;
  height: auto;
}

.archive-return {
  margin-bottom: 24px;
}

.archive-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 16px;
}

.archive-table th,
.archive-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.archive-table th {
  background: var(--light);
  color: var(--deep);
}

.course-category {
  border-bottom: 3px solid var(--blue);
  padding-bottom: 12px;
}

.course-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.course-description > a:first-child {
  font-weight: 600;
}

.course-teachers {
  font-size: 15px;
  color: #52606b;
}

.business-card {
  border-top: 4px solid var(--blue);
  padding: 28px;
  background: var(--light);
}

.business-card > p:last-child {
  margin-bottom: 0;
}

@media (max-width: 650px) {
  .course-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .archive-table {
    font-size: 14px;
  }

  .archive-table th,
  .archive-table td {
    padding: 10px;
  }

  .business-card {
    padding: 20px;
  }
}

/* Keep table words intact without preventing long descriptions from wrapping.
   Break-word is a fallback for long URLs; unlike anywhere, it does not shrink
   a column's intrinsic minimum width to a single character. */
.section-content table {
  table-layout: auto;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Two-column information tables need room for labels such as Class Hours.
   Longer labels can still wrap at spaces. Other table shapes are unaffected. */
.archive-table tr:has(> :nth-child(2):last-child) > :first-child {
  min-width: 12ch;
}

/* A reference number is one token, including its brackets, at every width. */
.reference-table tr > :first-child {
  width: 1%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 420px) {
  .archive-table tr:has(> :nth-child(2):last-child) > :first-child {
    min-width: 0;
  }
}

/* Alert / notice box helper */
.alert {
  background: #fff5f5;
  border-left: 4px solid #e53e3e;
  padding: 16px;
  margin-bottom: 24px;
}
