/* Oliver Boguth - Academic Website */

:root {
  --maroon: #8C1D40;
  --gold:   #FFC627;
  --white:  #ffffff;
  --text:   #000000;
  --font:   Verdana, Arial, Helvetica, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: var(--font);
}

html {
  min-height: 100%;
  margin-bottom: 1px; /* keeps scrollbar always visible to avoid layout jump */
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background-color: var(--maroon);
  text-align: center;
}

img { border: 0; }

h1 { font-size: 42px; font-weight: normal; margin: 0 0 12px; }
h2 { font-size: 28px; font-weight: normal; margin: 0 0 10px; }
h3 { font-size: 18px; font-weight: bold; margin: 0 0 4px; }

a           { color: var(--maroon); text-decoration: none; transition: color 0.15s; }
a:visited   { color: var(--maroon); }
a:hover     { color: var(--maroon); }
a:active    { color: var(--maroon); }

/* -----------------------------------------------
   Layout
----------------------------------------------- */

#wrap {
  margin: 0;
  width: 100%;
  background-color: var(--maroon);
  padding: 0 70px 12px 70px;
  text-align: left;
}

/* Header */
#header {
  background: var(--maroon);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

#header .logo-link {
  display: flex;
  align-items: center;
  height: 48px;
  flex-shrink: 0;
}

#header .logo-link img {
  height: 100%;
}

#header .slogan {
  font-size: 200%;
  font-weight: normal;
  white-space: nowrap;
  color: var(--white);
}

/* Top navigation (first 4 links) */
#topnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}

#topnav ul a {
  font-size: 120%;
  font-weight: normal;
  color: var(--white);
  padding: 6px 10px;
  display: block;
  transition: color 0.15s;
  white-space: nowrap;
}

#topnav ul a:visited { color: var(--white); }
#topnav ul a:hover   { color: var(--gold);  }
#topnav ul a:active  { color: var(--gold);  }
#topnav ul a.active  { color: var(--gold); }

/* Content area */
#content-area {
  display: flex;
  align-items: stretch;
  background-color: var(--maroon);
}

/* Main */
#main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--gold);
  padding: 24px 36px 0 28px;
  min-height: 750px;
  font-size: 18px;
}

#main a         { color: var(--maroon); }
#main a:visited { color: var(--maroon); }
#main a:hover   { color: var(--text);   }
#main a:active  { color: var(--text);   }

#main h1, #main h2 { color: var(--maroon); }
#main h3           { color: var(--text); }

#main h1 { border-bottom: 1px solid var(--maroon); padding-bottom: 8px; margin-bottom: 40px; }

.page-section + .page-section { border-top: 1px solid var(--maroon); padding-top: 40px; }

/* Sidebar — hidden on desktop, slide-in panel on mobile */
#sidebar {
  display: none;
}

/* Footer navigation */
#footernav {
  background: var(--maroon);
  padding: 20px 28px 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--white);
  font-size: 130%;
  line-height: 1.3;
}

.footer-contact a {
  color: var(--white);
  transition: color 0.15s;
}

.footer-contact a:visited { color: var(--white); }
.footer-contact a:hover   { color: var(--gold);  }
.footer-contact a:active  { color: var(--gold);  }

#footernav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

#footernav ul a {
  font-size: 130%;
  font-weight: normal;
  color: var(--white);
  transition: color 0.15s;
}

#footernav ul a:visited { color: var(--white); }
#footernav ul a:hover   { color: var(--gold);  }
#footernav ul a:active  { color: var(--gold);  }

/* Footer */
.footer1 { background-color: var(--maroon); height: 20px; }
.footer2 { display: none; }

/* -----------------------------------------------
   Profile section (index.html)
----------------------------------------------- */

.profile {
  display: flex;
  align-items: flex-start;
  padding: 20px 0;
  gap: 0;
}

.profile-photo {
  flex-shrink: 0;
  padding: 0 20px;
}

.profile-photo img {
  width: 260px;
  display: block;
}

.profile-info {
  flex: 1;
}

.profile-name {
  margin-bottom: 6px;
}

.profile-degrees {
  margin-bottom: 20px;
}

.profile-title {
  margin-bottom: 16px;
}

.profile-address {
  margin-bottom: 16px;
  line-height: 1.6;
}

.contact-table {
  border-collapse: collapse;
}

.contact-table td {
  font-size: inherit;
  color: var(--text);
  padding: 2px 0;
  vertical-align: top;
}

.contact-label {
  padding-right: 20px;
  white-space: nowrap;
}

/* -----------------------------------------------
   Research & Teaching pages
----------------------------------------------- */

.page-section {
  margin-bottom: 24px;
}

.nowrap { white-space: nowrap; }

.paper-list {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.paper-list > li {
  margin-bottom: 14px;
  line-height: 1.5;
}

.course-list {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.course-list > li {
  margin-bottom: 8px;
}

/* -----------------------------------------------
   Links page grid
----------------------------------------------- */

.links-grid {
  column-count: 3;
  column-gap: 48px;
}

.links-grid .page-section {
  break-inside: avoid;
  margin-bottom: 24px;
}

.links-grid .page-section + .page-section {
  border-top: none;
  padding-top: 0;
}

#main.links-page h1 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 12px;
}

/* -----------------------------------------------
   Sparky
----------------------------------------------- */

.sparky-wrap {
  margin-top: auto;
  padding: 0;
  line-height: 0; /* removes the small gap below the inline image */
}

/* -----------------------------------------------
   Mobile nav
----------------------------------------------- */

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--white);
  border-radius: 4px;
  color: var(--white);
  font-size: 20px;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
  z-index: 300;
  flex-shrink: 0;
}

/* Semi-transparent overlay behind the open sidebar */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
}

.nav-overlay.nav-open {
  display: block;
}

@media (max-width: 900px) {
  #wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-toggle {
    display: block;
  }

  /* Hide top nav links on mobile */
  #topnav {
    display: none;
  }

  /* Hide logo on narrow screens */
  #header .logo-link {
    display: none;
  }

  /* Hide footer nav on mobile */
  #footernav {
    display: none;
  }

  /* Sidebar becomes a fixed slide-in panel */
  #sidebar {
    display: block;
    position: fixed;
    top: 0;
    right: -240px;
    height: 100%;
    width: 220px;
    z-index: 200;
    overflow-y: auto;
    background: var(--maroon);
    transition: right 0.25s ease;
  }

  #sidebar ul {
    list-style: none;
    margin: 0;
    padding: 80px 0 20px;
  }

  #sidebar ul li {
    padding: 8px 5px 8px 28px;
  }

  #sidebar ul li.nav-gap {
    padding: 0;
    height: 30px;
  }

  #sidebar ul a {
    font-size: 110%;
    font-weight: bold;
    display: block;
    padding: 3px 0;
    color: var(--white);
    transition: color 0.15s;
  }

  #sidebar ul a:visited { color: var(--white); }
  #sidebar ul a:hover   { color: var(--gold);  }
  #sidebar ul a:active  { color: var(--gold);  }
  #sidebar ul a.active  { color: var(--gold);  }

  #sidebar.nav-open {
    right: 0;
  }

  /* Stack content vertically — main fills full width */
  #content-area {
    flex-direction: column;
  }

  /* Stack profile photo above contact info */
  .profile {
    flex-direction: column;
  }

  .profile-photo {
    padding: 0 0 16px 0;
  }
}

/* -----------------------------------------------
   Utilities
----------------------------------------------- */

.float-left  { float: left; }
.float-right { float: right; }
.align-left  { text-align: left; }
.align-right { text-align: right; }
.clear       { clear: both; }
.red         { color: #cc0000; }
.tiny        { font-size: 11px; }
.small       { font-size: 13px; }
.large       { font-size: 18px; }
.huge        { font-size: 22px; }
.comments {
  margin: 20px 10px 25px;
  padding: 5px 3px;
  border-top: 1px solid #eff0f1;
  border-bottom: 1px solid #eff0f1;
}
