/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  color: #3d3d43;
  line-height: 1.6;
  background: #fff;
}

a {
  color: #006ab3;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* No image is ever wider than its column — the width/height attributes on
   <img> are the file's pixel size, and without this one large file pushes the
   sidebar off-screen. */
img {
  max-width: 100%;
  height: auto;
}

/* === Container === */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* === Two-column grid === */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

/* A grid item's default min-width is its content width, so wide content would
   grow the column instead of fitting it; 0 keeps the sidebar on screen. */
.content-main {
  min-width: 0;
}

/* === Meta Bar === */
#meta {
  background: #fff;
  font-size: 0.8rem;
  color: #3d3d43;
}

.meta-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#metamenu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
}

#metamenu li {
  display: flex;
  align-items: center;
}

#metamenu li::before {
  content: '|';
  color: #999;
  padding: 0 0.5rem;
}

#metamenu li:first-child::before {
  content: none;
}

#metamenu a {
  color: #3d3d43;
  font-size: 0.8rem;
}
#metamenu a:hover {
  color: #006ab3;
}

#socialmedia {
  list-style: none;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

#socialmedia a {
  color: #757575;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
#socialmedia a:hover {
  color: #006ab3;
  text-decoration: none;
}

/* === Header === */
#header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease-in-out;
  box-shadow: 0 10px 5px -5px rgba(0, 0, 0, 0.1);
}

.header-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.logo a {
  display: block;
  line-height: 0;
}
.logo a:hover {
  text-decoration: none;
}

.logo-desktop {
  height: 57px;
  width: auto;
}

.logo-mobile {
  display: none;
  height: 40px;
  width: auto;
}


/* === Breadcrumb === */
.breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: #757575;
  border-bottom: 1px solid #efefef;
  margin-bottom: 2rem;
}

.breadcrumb span::after {
  content: ' › ';
  color: #999;
}
.breadcrumb span:last-child::after {
  content: '';
}

/* === Figure in the page content ===
   Centred, 384px by default; .page-figure-wide below makes a figure span the
   text column (the homepage picture, the campus map). */
.page-figure {
  margin: 1.25rem 0 2rem;
}

.page-figure img {
  display: block;
  width: 100%;
  max-width: 384px;
  height: auto;
  margin: 0 auto;
}

/* Spans the text column. */
.page-figure-wide img {
  max-width: 100%;
}

/* The campus map; clicking opens the full-size image. */
.campus-map img {
  border: 1px solid #efefef;
}

.page-figure figcaption {
  font-size: 0.8rem;
  color: #757575;
  margin-top: 0.4rem;
  text-align: center;
}

/* === Page Content === */
.page h1 {
  color: #003863;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #efefef;
  padding-bottom: 0.5rem;
}

.page h2 {
  color: #003863;
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page h3 {
  color: #003863;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.page p {
  margin-bottom: 1rem;
}

.page ul, .page ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page li {
  margin-bottom: 0.35rem;
}

/* === Badges === */
.badge {
  display: inline;
  font-weight: 700;
  text-decoration: underline;
}

.badge-open {
  color: #2e7d32;
}

.badge-ongoing {
  color: #006ab3;
}

.badge-finished {
  color: #757575;
}

/* === News === */
.news-item {
  display: flex;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #efefef;
}

.news-item time {
  color: #757575;
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 6rem;
}

.news-body p {
  margin: 0.2rem 0 0;
}

/* === List pages === */
.list-item {
  padding: 1rem 0;
  border-bottom: 1px solid #efefef;
}

.list-item h2 {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}

.list-item time {
  color: #757575;
  font-size: 0.85rem;
}

/* === Team === */
.team-member {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #efefef;
  align-items: flex-start;
}

.team-member img {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 3px;
}

.team-member h3 {
  margin-top: 0;
  color: #003863;
}

.team-member .role {
  color: #757575;
  font-size: 0.9rem;
}

.team-member .details {
  font-size: 0.9rem;
}

/* === Publications === */
.pub-year {
  color: #003863;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #efefef;
  padding-bottom: 0.25rem;
}

.pub-list {
  list-style: none;
  padding: 0;
}

.pub-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5f5f5;
  line-height: 1.5;
}

.pub-profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pub-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: #003865;
  color: #fff;
  font-weight: 700;
}

.pub-profile:hover {
  background: #004a80;
  text-decoration: none;
}

.pub-list .venue {
  font-weight: 700;
}

/* === Sidebar === */
.sidebar-contact {
  background: #f9f9f9;
  border: 1px solid #efefef;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-contact h4 {
  color: #003863;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.vcard-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #003863;
  margin-bottom: 0.5rem;
}

.vcard-details {
  font-size: 0.9rem;
  color: #595959;
}

.vcard-details p {
  margin: 0.2rem 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  color: #fff;
  background: #003865;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.15s;
}

.quick-link:hover {
  background: #004a80;
  text-decoration: none;
}

.quick-link.active {
  background: #004a80;
}

.quick-link-external {
  background: #006ab3;
}

.quick-link-external:hover {
  background: #0078c8;
}

.quick-link .chevron {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.7;
}

.quick-link-sub {
  padding-left: 1.75rem;
  font-size: 0.85rem;
  background: #1a4d7a;
}

.quick-link-sub:hover {
  background: #2a5d8a;
}

.quick-link-sub.active {
  background: #2a5d8a;
}

/* Folding semester groups under Teaching (<details>, no JavaScript) */
.semester-group > summary {
  list-style: none;
  cursor: pointer;
}

.semester-group > summary::-webkit-details-marker {
  display: none;
}

.semester-group > summary .chevron {
  transition: transform 0.15s;
}

.semester-group[open] > summary .chevron {
  transform: rotate(90deg);
}

.semester-group > .quick-links {
  margin-top: 2px;
}

.quick-link-course {
  padding-left: 2.6rem;
  font-size: 0.82rem;
  background: #2a5d8a;
}

.quick-link-course:hover,
.quick-link-course.active {
  background: #3a6d9a;
}

/* === Footer === */
.site-footer {
  background: #003863;
  color: #fff;
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: #fff;
}

.footer-branding p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* === Responsive === */
@media (max-width: 1199px) {
  #meta {
    display: none;
  }

  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
  }
}

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

  .sidebar {
    order: -1;
  }

  .news-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .team-member {
    flex-direction: column;
  }

  .team-member img {
    width: 100px;
    height: 125px;
  }
}
