:root {
    /* Brand colours */
    --unit-blue: rgb(102, 153, 204);
    --unit-green: rgb(109, 247, 109);
    --unit-blue-accent: rgb(102, 215, 239);
    --unit-blue-accent-hover: rgb(0, 178, 218);
    --footer-bg: #333;
    --text-dark: #000;
    --text-light: #fff;

    /* Spacing scale */
    --space-s: 8px;
    --space-m: 20px;
    --space-l: 40px;
}

body {
    font-family: sans-serif, Arial;
    margin: 0;
    padding: 0;
    background-image: url("./images/research/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* ---------- Header ---------- */
.header {
    color: var(--text-light);
    padding: 40px 0 20px 0;
    text-align: center;
}

@media (max-width: 600px) {
  .header {
    margin: -50px 10px 0 10px;
  }
}

.header h1 {
    margin: 0;
    padding-bottom: 10px;
    font-size: 3em;
    color: black;
}

.header p {
    font-size: 1.2em;
    color: black;
    margin-top: var(--space-s);
}

/* ---------- Publications Section ---------- */

/* Recent Publications */
.recent-publications {
  background: var(--unit-blue);
  padding: 20px 0;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 1200px;       /* same as all publications */
  justify-self: center;
  margin: 0 10px 40px 10px;
}


.recent-publications h2 {
    text-align: center;
    padding: var(--space-m);
    margin-top: 0;
    font-size: 24px;
    color: var(--text-light);
    border-radius: 200px;
    display: inline-block;
    background-color: darkblue;
}

/* Seperator */
.seperator {
    border-radius: 1px;
    text-align: center;
}

.seperator h1 {
    text-align: center;
    padding: var(--space-m);
    margin-top: 0;
    font-size: 24px;
    color: darkblue;
    border-radius: 200px;
    display: inline-block;
    background-color: #f1f1f1;
}

/* Older Publications */
.older-publications {
    padding: 30px 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 1200px;
    justify-self: center;
    margin: 20px 10px 40px 10px;
}


/* Filters */
.filters {
  text-align: center;
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: var(--unit-blue, #6699cc);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.dropbtn:hover {
  background: var(--unit-blue-accent-hover, #007baa);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 100%;          
    max-height: 150px;        
    overflow-y: auto;         
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1;
}

.dropdown-content div {
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
}

.dropdown-content div:hover {
  background-color: #f1f1f1;
}

.dropdown-content div.selected {
  background-color: var(--unit-blue, #6699cc);
  color: white;
  font-weight: bold;
  border-radius: 4px;
}

.dropdown-content label {
  display: block;
  text-align: left;
  padding: 6px 10px;
  cursor: pointer;
}

.dropdown-content label:hover {
  background-color: #f1f1f1;
}

.dropdown-content input {
  margin-right: 8px;
}

.dropdown.show .dropdown-content {
  display: block;
}

#clear-filters {
  background: var(--unit-blue, #6699cc);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

#clear-filters:hover {
  background: var(--unit-blue-accent-hover, #007baa);
}

/* Divider line */
.filter-divider {
    border: 0;
    height: 2px;
    background: #f1f1f1;
    margin: 0 20px;

}

/* Publication grid */
.publications-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
  padding: 0 10px;
}

.publication {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex: 0 1 clamp(160px, 28vw, 320px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease-in-out;
}

.publication img {
  width: 100%;
  height: auto;
  max-height: 150px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.publication .content {
  padding: clamp(10px, 1.5vw, 20px);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.publication h3 {
  margin: 0 0 10px;
  font-size: clamp(16px, 2vw, 20px);
}

.publication .meta {
  font-size: clamp(12px, 1.5vw, 14px);
  color: #777;
  margin-bottom: 10px;
}

.publication p {
  font-size: clamp(13px, 1.6vw, 15px);
  line-height: 1.5;
  color: #444;
}

.publication a {
  margin-top: auto;
  color: var(--unit-blue, #6699cc);
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(13px, 1.5vw, 15px);
}

.publication a:hover {
  text-decoration: underline;
}

/* ---------- Slideshow modal ---------- */

.slideshow-canvas {
  max-width: 100%;
  max-height: 85vh;         /* previously 70vh — bigger pages */
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}


.slideshow-modal {
  position: fixed;
  inset: 0;                          /* full viewport */
  background: rgba(0, 0, 0, 0.7);    /* shadowed background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.slideshow-modal.hidden {
  display: none;
}

.slideshow-inner {
  position: relative;
  max-width: min(95vw, 1100px);   /* more width */
  max-height: 95vh;               /* bigger modal */
  padding: 20px 70px;             /* room for arrows */
  background: #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Image centered */
.slideshow-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

/* Caption under image */
.slideshow-caption {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
  text-align: center;
}

/* Close button (top-right inside box) */
.slideshow-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* Nav arrows at left/right edges of the box */
.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-nav.prev { left: 10px; }
.slideshow-nav.next { right: 10px; }

.slideshow-nav:hover {
  background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 600px) {
  .slideshow-inner {
    padding: 20px 40px;
  }
  .slideshow-nav {
    font-size: 22px;
    width: 32px;
    height: 32px;
  }
}
