/* Enable smooth scroll*/
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: sans-serif;
  margin: 0;
  background: white;
  color: #111;
}

html, body {
  overflow-x: hidden;
}

/* ------------------------------
   Navbar Basics
------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  background: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  z-index: 999;
}

.navbar .logo {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: #222;
  text-decoration: none;
}

.logo-img {
  height: 100px;
  margin-right: 1rem;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

/* ------------------------------
   Nav Links
------------------------------- */

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  padding: 0.3rem 0;
  font-family: 'Georgia', serif;
  transition: color 0.3s ease;
}

.nav-links a::before {
  content: "";
  position: absolute;
  left: -0.3rem;
  right: -0.3rem;
  bottom: 0.1rem;
  height: 0.6em;
  background: #fff89a;
  z-index: -1;
  transform: rotate(-1.5deg);
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-links a:hover::before {
  opacity: 0.9;
}

.nav-links a:hover {
  color: #000;
}

/* alternate highlighter colors for some spice */
.nav-links a:nth-of-type(2n)::before {
  background: #ffd6f3;
  transform: rotate(1deg);
}
.nav-links a:nth-of-type(3n)::before {
  background: #d4f8e8;
  transform: rotate(-2deg);
}

/* ------------------------------
   Hamburger Menu: Themed
------------------------------- */

.nav-toggle.themed-burger {
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 999;
  display: none; /* <—-- keep this for desktop */
}

.themed-burger span {
  display: block;
  height: 5px;
  width: 100%;
  background-color: #63c138; /* green to match logo */
  border-radius: 2px;
  transform: rotate(0deg);
  transition: all 0.3s ease;
}


.themed-burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background-color: #d44415;
}

.themed-burger.open span:nth-child(2) {
  opacity: 0;
}

.themed-burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  background-color: #d44415;
}

/* ------------------------------
   Mobile Styles
------------------------------- */

/* now show hamburger in mobile screens */
@media (max-width: 768px) {
  .nav-toggle.themed-burger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 998;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    font-size: 1.1rem;

    width: fit-content;
    display: inline-block;
  }
}

/* ------------------------------
   Swiper Carousel Styling
------------------------------- */
.swiper {
  width: 100%;
  height: 80vh;
  background-color: #f5f5f5;
  position: relative;
  overflow: hidden;
  padding-bottom: 0; /* remove extra space */
  background-image: radial-gradient(ellipse at center, rgba(245,245,245,0.6), transparent 70%);
}

.full-slide {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* shows full image */
  display: block;
  margin: 0 auto;
  z-index: 1;
}

/* Caption overlay */
.caption-overlay {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 0.8rem 1.2rem; /* tighter */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  color: #111;
  z-index: 2;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.caption-overlay.dark-glass {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.caption-overlay.light-glass {
  background: rgba(255, 255, 255, 0.35);
  color: #111;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.caption-text {
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}

.caption-text h2 {
  font-size: 1.5rem;
  margin: 0 0 0.2rem 0;
  font-weight: 700;
}

.caption-text p {
  font-size: 0.95rem;
  margin: 0;
  color: inherit;
}

.caption-text *,
.caption-text h2,
.caption-text p {
  text-decoration: none !important;
  border-bottom: none !important;
}
/* ------------------------------
   Swiper Arrows
------------------------------- */
.swiper-button-next,
.swiper-button-prev {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, background-color 0.3s ease;
  z-index: 3;
  cursor: pointer;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  display: none;
}

.swiper-button-next::before,
.swiper-button-prev::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.swiper-button-next::before {
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M9 6l6 6-6 6'/></svg>");
}

.swiper-button-prev::before {
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M15 6l-6 6 6 6'/></svg>");
}

.swiper-button-next {
  right: 2rem !important;
}

.swiper-button-prev {
  left: 2rem !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.1);
}

/* ------------------------------
   Swiper Pagination
------------------------------- */
.swiper-pagination {
  position: relative;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 4;
  margin-top: 3rem; /* pushed further down */
}

.swiper-pagination-bullet {
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.7);
  opacity: 0.5;
  border-radius: 50%;
  margin: 0 10px;
  transition: transform 0.2s ease, background-color 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.2);
}
/* ------------------------------
   Responsive
------------------------------- */
@media (max-width: 768px) {
  .swiper {
    min-height: 65vh;
    padding: 0;
    position: relative;
  }
  
  .swiper-slide {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100%;
    height: auto; /*force height to grow */
    position: relative;
    box-sizing: border-box;
  }  

  .swiper-wrapper {
    overflow: visible;
  }

  .swiper-slide {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    position: relative;
  }

  .full-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    overflow: hidden;
    width: 100%;
  }

  .slide-img {
    width: 100%;
    height: auto;
    max-height: 45vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    z-index: 1;
  }

  .slide-link {
    flex-direction: column;
    text-decoration: none !important;
    border-bottom: none !important;
  }

  .caption-overlay {
    position: static;
    transform: none;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .caption-text {
    font-size: 0.9rem;
  }

  .caption-text h2 {
    font-size: 1.15rem;
    margin: 0 0 0.3rem 0;
  }

  .caption-text p {
    font-size: 0.9rem;
  }

  .swiper-button-next {
    right: 1rem !important;
  }

  .swiper-button-prev {
    left: 1rem !important;
  }

  .swiper-pagination {
    margin-top: 1rem;
    position: relative;
    z-index: 5;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 2.4rem;
    height: 2.4rem;
  }

  .swiper-button-next::before,
  .swiper-button-prev::before {
    width: 1.1rem;
    height: 1.1rem;
  }
}
/* ------------------------------
   Section Styling
------------------------------- */
.section-highlight {
  background: #ffffff;
  padding: 4rem 2rem 2rem;
  color: #111;
  text-align: center;
}

.about-container,
.grants-container {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.75;
  padding: 0;
  text-align: center;
}

.about-container h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  background: none;
  color: #222;
  -webkit-text-fill-color: initial;
}

/* ------------------------------
   Sponsors Section
------------------------------- */
.sponsors-background {
  background-color: #ffffff;
  padding: 3rem 2rem 4rem;
}

.grants-container p {
  margin-bottom: 2rem;
  text-align: center;
}

.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem 3rem; 
  margin-top: 2rem;
}

.sponsor-logo {
  height: 70px;
  max-width: 180px;     
  object-fit: contain;
  transition: transform 0.3s ease;
}

.sponsor-logo:hover {
  transform: scale(1.15); /* zoom on hover */
}

/* ------------------------------
   Background
------------------------------- */
.notebook-background {
  background-color: #fdfaf5;
  background-image: linear-gradient(to bottom, rgba(150, 150, 150, 0.05) 1px, transparent 1px);
  background-size: 100% 28px;
}

/* ------------------------------
    Projects
------------------------------- */
.projects-intro {
  padding: 3rem 2rem 1rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  font-family: 'Georgia', serif;
  transition: opacity 0.4s ease;
}

.projects-intro[style*="display: none"] {
  opacity: 0;
}

.projects-intro h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.projects-intro p {
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  color: #333;
}

.projects-section-title {
  text-align: center;
  margin: 2rem 0 1.5rem 0;
}

/* Project titles with hand-drawn highlighter effect */
.project-section h2 {
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: bold;
  font-family: 'Georgia', serif;
  color: #222;
  position: relative;
  display: inline-block;
  z-index: 1;
}

/* Default: soft green highlight */
.project-section h2::before {
  content: "";
  position: absolute;
  left: -0.3rem;
  right: -0.3rem;
  top: 0.6em;
  height: 0.6em;
  background: #8bd279;
  z-index: -1;
  transform: rotate(-1.5deg);
  border-radius: 3px;
  opacity: 0.9;
}

/* Pale pink highlight */
.project-section:nth-of-type(3n+2) h2::before {
  background: #ffd6f3;
  transform: rotate(1deg);
}

/* Mint green highlight */
.project-section:nth-of-type(3n+3) h2::before {
  background: #d4f8e8;
  transform: rotate(-2deg);
}

/* Turn the wrapper into a 2-col grid; let the body handle scrolling */
.projects-container {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
  padding: 2rem;
  background-color: #fdfaf5;
  background-image: linear-gradient(to bottom, rgba(150, 150, 150, 0.05) 1px, transparent 1px);
  background-size: 100% 28px;
  font-family: 'Georgia', serif;
  /* height: 100vh; */
  /* min-height: 100vh; */
  /* overflow-y: auto; */
  overflow: visible; /* ensure no clipping of sticky child */
}

/* Floating filter container * Sidebar sticks */
.filter-floating-wrapper {
  position: sticky;
  top: 1rem;
  z-index: 999;
  margin: 0;                 /* grid gives us spacing now */
  display: flex;
  flex-direction: column;
  align-items: stretch;      /* full width withinn the 260px column */
  max-width: none;           /* let the grid column define width */
  align-self: start;        
}

/* Filter button */
.filter-toggle-btn {
  background: #ffe599;
  border: 1px solid #e6c200;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-family: 'Georgia', serif;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
}

/* Tag filter menu */
.filter-tag-menu {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #ccc;
  padding: 1rem;
  margin-top: 0.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  width: 100%;
  box-sizing: border-box;
}

/* Tag checkboxes layout */
.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag-options label {
  font-size: 0.85rem;
  font-family: 'Georgia', serif;
}

.tag-options input[type="checkbox"] {
  margin-right: 0.3rem;
}

/* Clear filters button */
.clear-filter-btn {
  margin-top: 0.5rem;
  background: #fcd75b;
  border: 1px solid #e6c200;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-family: 'Georgia', serif;
}

/* main content container */
.projects-main {
  width: 100%;
  padding-left: 0;
}

/* Tag badges */
.project-tags {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-badge {
  background-color: #e0e0e0;
  color: #333;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 999px;
  font-family: 'Georgia', serif;
  white-space: nowrap;
}

/* Responsive adjustments - stack sidebar above content and disable sticky */
@media screen and (max-width: 768px) {
  .filter-floating-wrapper {
    position: static;
    width: 100%;
    padding: 1rem 0.5rem;
    margin-bottom: 1rem;
    background: #f9f9f9;
    box-shadow: none;
  }

  .filter-toggle-btn {
    width: 100%;
    padding: 0.6rem;
  }

  .filter-tag-menu {
    width: 100%;
    padding: 1rem 0.5rem;
  }

  .projects-main {
    padding-left: 0;
  }

  .tag-options {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tag-options label {
    margin-right: 1rem;
    font-size: 0.85rem;
  }

  .clear-filter-btn {
    align-self: flex-start;
  }
}

/* Project card base */
.project-section {
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 6px;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  transform-origin: center;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0);
  background-size: 8px 8px;
}

/* Sticky note background color rotation */
.project-section:nth-of-type(3n+1) {
  background-color: #fffbd1; /* Yellow sticky */
}
.project-section:nth-of-type(3n+2) {
  background-color: #dff9fb; /* Blue sticky */
}
.project-section:nth-of-type(3n+3) {
  background-color: #ffe5ec; /* Pink sticky */
}

.project-section:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.1);
}

/* Paragraph styling */
.project-section p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #222;
  font-family: 'Georgia', serif;
}

/* Floating image with emoji pin */
.project-with-image {
  overflow: visible;
}

.project-float-wrapper {
  float: left;
  width: 200px;
  margin: 0.4rem 1.5rem 1rem 0;
  position: relative;
  shape-outside: margin-box;
  display: inline-block;
  z-index: 1;
}

.project-float-icon {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
}

/* Emoji "pin" decorations per sticky */
.project-float-wrapper::after {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%) rotate(8deg);
  font-size: 1.9rem;
  z-index: 5;
  pointer-events: none;
}

.project-section:nth-of-type(3n+1) .project-float-wrapper::after {
  content: "🔖"; /* bookmark */
}
.project-section:nth-of-type(3n+2) .project-float-wrapper::after {
  content: "📎"; /* paperclip */
}
.project-section:nth-of-type(3n+3) .project-float-wrapper::after {
  content: "📍"; /* pushpin */
}

@media (max-width: 768px) {
  .projects-container {
    display: block;  /* back to single column */
    padding: 1rem;
    overflow: visible;
  }

  .projects-main {
    width: 100%;
    padding-left: 0;
  }

  .project-section {
    padding: 1rem;
  }

  .project-float-wrapper {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }

  .project-section h2 {
    font-size: 1.3rem;
  }

  .project-section p,
  .projects-intro p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .projects-intro h1 {
    font-size: 1.6rem;
  }
}

/* ------------------------------------
   Project Detail Page
   Matches list-page vibe: serif, highlights, sticky cards
------------------------------------- */
.project-detail-container {
  max-width: 980px;
  margin: 3rem auto;
  padding: 2.25rem;
  font-family: 'Georgia', serif;
  color: #222;
  background: #fffefb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  background-image:
    radial-gradient(rgba(0,0,0,0.04) 1px, transparent 0);
  background-size: 8px 8px;
}

/* Header */
.project-detail-header {
  text-align: center;
  margin-bottom: 2rem;
}
.project-detail-header h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0 .15rem .25rem .15rem;
}
.project-detail-header h1::before {
  content: "";
  position: absolute;
  left: -0.3rem;
  right: -0.3rem;
  top: 0.6em;
  height: 0.6em;
  background: #d4f8e8; /* mint highlight to echo list page */
  z-index: -1;
  transform: rotate(-1deg);
  border-radius: 3px;
  opacity: .9;
}
.project-tags {
  margin: .9rem auto 0;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.tag-badge {
  background: #e0e0e0;
  color: #333;
  padding: .28rem .65rem;
  font-size: .78rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* CTA button */
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: .65rem 1rem;
  border-radius: 10px;
  border: 1px solid #e6c200;
  background: #ffe599;
  font-weight: bold;
  text-decoration: none;
  color: #222;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 4px 4px 12px rgba(0,0,0,0.12); }

/* Hero */
.project-hero {
  margin: 1.25rem 0 1.75rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 2px 6px 16px rgba(0,0,0,0.08);
  background: #fff;
}
.project-hero img { display: block; width: 100%; height: auto; }

/* “Sticky note” section cards */
.project-section {
  padding: 1.4rem 1.4rem 1.2rem;
  margin: 1.4rem 0;
  border-radius: 8px;
  box-shadow: 1px 2px 8px rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.92);
  background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 0);
  background-size: 8px 8px;
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden; /* ensures no figure shadow/caption bleeds out */
}
.project-section:hover {
  transform: translateY(-2px);
  box-shadow: 6px 10px 18px rgba(0,0,0,0.10);
}
/* rotate subtle background colors to match list page */
.project-section:nth-of-type(3n+1) { background-color: #fffbd1; } /* pale yellow */
.project-section:nth-of-type(3n+2) { background-color: #dff9fb; } /* pale blue */
.project-section:nth-of-type(3n+3) { background-color: #ffe5ec; } /* pale pink */

/* rotating highlighter (same as list page) */
.project-section h3 {
  margin: 0 0 .5rem 0;
  font-size: 1.35rem;
  color: #333;
  position: relative;
  display: inline-block;
  padding: 0 .1rem .15rem;
}
/* Default: soft green (same as list page) */
.project-section h3::before {
  content: "";
  position: absolute;
  left: -0.25rem;
  right: -0.25rem;
  top: .65em;
  height: .6em;
  background: #8bd279;          /* green highlight */
  z-index: -1;
  transform: rotate(1deg);
  border-radius: 3px;
  opacity: .9;
}
/* Pale pink */
.project-section:nth-of-type(3n+2) h3::before {
  background: #ffd6f3;
  transform: rotate(1deg);
}
/* Mint green */
.project-section:nth-of-type(3n+3) h3::before {
  background: #d4f8e8;
  transform: rotate(-1deg);
}

/* Body text */
.project-section .project-body p {
  font-size: 1.06rem;
  line-height: 1.75;
  color: #222;
  margin: .7rem 0 0 0;
}
.project-section .project-body ul {
  margin: .6rem 0 0 1.2rem;
}
.project-section .project-body li {
  margin: .35rem 0;
  line-height: 1.65;
}

/* Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-top: .8rem;
  /* center figures within the grid */
  /*  use stretch to avoid rightmost overflow while still centering media within figures */
  justify-items: stretch;
  /* symmetric padding so gallery is centered and not glued to edges */
  padding: 0 1rem;
  box-sizing: border-box;
  /* keep captions visible */
  overflow: visible;
}

/* Responsive */
@media (max-width: 900px) {
  .project-figure { grid-column: span 12; } /* full-width items */
  .project-meta .meta-row { grid-template-columns: 130px minmax(0,1fr); }
}
@media (max-width: 768px) {
  .project-detail-container { margin: 2rem auto; padding: 1.25rem; }
  .project-detail-header h1 { font-size: 1.65rem; }
  .project-section { padding: 1rem; }
  .project-gallery { gap: .75rem; }
}

/* Make figures feel edge-to-edge and remove the white box look */
.project-figure {
  position: relative;
  background: transparent;          /* kill the white box */
  border: none;                     /* remove hard border */
  box-shadow: 0 12px 28px rgba(0,0,0,0.12); /* softer, wider shadow */
  overflow: hidden;                 /* border-radius applies to content */
  border-radius: 12px;              /* slightly larger radius */

  /* ensure figures don’t exceed their grid track and cause right-edge creep */
  grid-column: span 6;              /* 2-up default on desktop (big) */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  margin: 0;
  min-width: 0;
}

/* Round the media itself so it matches the figure radius */
.project-figure img,
.project-figure iframe,
.project-figure video {
  border-radius: 12px;

  /*hard cap media width*/
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

/* Keep the 16:9 look but avoid tall “letterbox” feel on short media */
.project-figure iframe,
.project-figure video {
  aspect-ratio: 16 / 9;
  min-height: 320px;
  height: auto;
  border: 0;
  position: relative;
  z-index: 1; /* ensure controls are clickable above overlays */
}

/* Default caption overlay (for images/iframes) */
.project-figure figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: .6rem .9rem;
  font-size: .95rem;
  line-height: 1.35;

  /* overlay background: gradient + blur for readability */
  color: #fff;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.28) 32%,
    rgba(0,0,0,0.55) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); /* Safari */

  text-align: left;                 /* reads nicer than centered for sentences */
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);

  /* let clicks through to media controls */
  pointer-events: none;

  /* avoid long URLs pushing width on mobile */
  word-break: break-word;
  overflow-wrap: anywhere;

  /* ensure the overlay inherits the rounded corners at the bottom */
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.project-figure figcaption a,
.project-figure .video-fallback a {
  pointer-events: auto; /* keep links clickable */
}

/* Caption links: readable on dark overlay */
.project-figure figcaption a {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.55);
}
.project-figure figcaption a:hover {
  text-decoration-color: rgba(255,255,255,0.85);
}

/* For figures with <video>, put caption BELOW the controls but keep "overlay" styling */
.project-figure video + figcaption {
  position: static;                 /* no overlay positioning */
  margin-top: .5rem;                /* breathing room under controls */
  padding: .6rem .9rem;
  font-size: .92rem;
  line-height: 1.5;
  text-align: left;

  color: #fff;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.55) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);

  border-radius: 10px;              /* overlay "pill" look below video */
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  pointer-events: auto;             /* fully interactive since it's below */
}

/* Fallback links styling (for non-inline-playable formats) */
.project-figure .video-fallback {
  margin-top: .5rem;
  font-size: .95rem;
  text-align: center;
}
.project-figure .video-fallback a {
  text-decoration: underline;
}

/* Reduce vertical “air” when a section is gallery-only */
.project-section > .project-gallery:only-child {
  margin-top: .4rem;                /* tighter to the section heading */
}
.project-section > .project-gallery:only-child + .project-body {
  margin-top: .9rem;
}

/* slightly soften section cards so media pops more */
.project-section {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  background-image: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 0);
}

/* Wide figures (or singletons) span entire width */
.project-figure--wide,
.project-gallery--single .project-figure {
  grid-column: span 12;
}

/* Mobile: stack them full width */
@media (max-width: 900px) {
  .project-figure { grid-column: span 12; }

  /* keep container unclipped to preserve captions */
  /* .project-detail-container { overflow: hidden; } */
}

@media (max-width: 768px) {
  .project-detail-container { margin: 2rem auto; padding: 1.25rem; }
  .project-detail-header h1 { font-size: 1.65rem; }
  .project-section { padding: 1rem; }
  .project-gallery { gap: .75rem; }
  /* keep min-height sane but not cropping visually */
  .project-figure iframe,
  .project-figure video { min-height: 240px; }
}

/* -------------------------------
   COLLAGE MODE
   NOTE: Neutralized to keep 2-up "big tiles".
   (Template can still emit the class; this block now mirrors the grid.)
---------------------------------- */

.project-gallery--collage {
  /* behave like the base grid */
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 1rem;               /* symmetric padding */
  box-sizing: border-box;
}

.project-gallery--collage .project-figure {
  grid-column: span 6;           /* force 2 per row on desktop */
  width: 100%;
  margin: 0;
  break-inside: auto;            /* no column packing */
}

/* keep single-item galleries full width */
.project-gallery--collage.project-gallery--single .project-figure {
  grid-column: span 12;
}

/* responsive: still stack on narrow screens */
@media (max-width: 900px) {
  .project-gallery--collage .project-figure { grid-column: span 12; }
}

/* --- logos --- */
   .project-gallery:has(.project-figure--logo) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    justify-items: center;
  
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .project-gallery:has(.project-figure--logo) .project-figure {
    grid-column: auto;
  }
  .project-gallery:has(.project-figure--logo) .project-figure--wide {
    grid-column: 1 / -1;
  }
  
  /* Logo tile: compact, centered */
  .project-figure--logo {
    box-shadow: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .25rem;
    min-height: 0;
  }
  
  .project-figure--logo img.project-image--logo {
    width: clamp(90px, 40%, 180px);  /*sensible clamps */
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    background: transparent;
    padding: 0;
    border-radius: 8px;
  }
  
  .project-figure--logo figcaption {
    position: static;
    padding: .25rem 0 0;
    background: none;
    color: #555;
    text-shadow: none;
    font-size: .85rem;
    text-align: center;
  }
  
  @media (max-width: 600px) {
    .project-gallery:has(.project-figure--logo) {
      max-width: 100%;
    }
  }


/* ================================
   STEREO FORM
================================ */
.project-detail-container .stereo-form,
.project-detail-container .stereo-form *:not(img):not(svg *):not(video):not(canvas) {
  color: #111 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #111;
}

.project-detail-container .stereo-form { padding: 0; background: transparent; border: 0; box-shadow: none; }

.project-detail-container .stereo-form .sf-fieldset { margin: 1.4rem 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.project-detail-container .stereo-form hr { display: none !important; }

.project-detail-container .stereo-form .sf-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 1.25rem 1.25rem !important; }
.project-detail-container .stereo-form .sf-field { grid-column: span 12; min-width: 0; }
@media (min-width: 760px) {
  .project-detail-container .stereo-form .sf-field { grid-column: span 6; }
  .project-detail-container .stereo-form .sf-field--split { grid-column: span 6; }
}
.project-detail-container .stereo-form .sf-field--split .sf-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.project-detail-container .stereo-form .sf-split-item { min-width: 0; }

.project-detail-container .stereo-form .sf-legend { font-weight: 700 !important; font-size: 1.22rem !important; margin: 1.2rem 0 .55rem !important; letter-spacing: .2px; }
.project-detail-container .stereo-form .sf-label { font-weight: 600; font-size: 1rem !important; margin-bottom: .45rem !important; }
.project-detail-container .stereo-form .sf-sublabel { font-weight: 500; font-size: .92rem; color: #222 !important; }
.project-detail-container .stereo-form .sf-help { font-size: .95rem; color: #222 !important; margin: .1rem 0 .8rem; }

.project-detail-container .stereo-form .sf-input,
.project-detail-container .stereo-form .sf-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: .8rem .35rem !important;
  line-height: 1.45 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(0,0,0,.28) !important;
  border-radius: 0 !important;
  font-size: 1rem;
  transition: border-color .15s ease, outline-color .15s ease;
}
.project-detail-container .stereo-form .sf-input::placeholder { color: #444 !important; }
.project-detail-container .stereo-form .sf-input:focus,
.project-detail-container .stereo-form .sf-select:focus {
  border-bottom-color: #0b5ea8 !important;
  box-shadow: none !important;
}

.project-detail-container .stereo-form .sf-radio-group { display: flex; flex-wrap: wrap; gap: .8rem 1rem !important; margin-top: .25rem !important; }
.project-detail-container .stereo-form .sf-radio { position: relative; display: inline-flex; align-items: center; }
.project-detail-container .stereo-form .sf-radio input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.project-detail-container .stereo-form .sf-radio span {
  display: inline-block;
  padding: .65rem 1.2rem !important;
  line-height: 1.1 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #111 !important;
  border: 1px solid rgba(0,0,0,.25) !important;
  font-weight: 500;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.project-detail-container .stereo-form .sf-radio:hover span { background: #f2f2f2 !important; border-color: rgba(0,0,0,.35) !important; }
.project-detail-container .stereo-form .sf-radio input[type="radio"]:checked + span { background: #0b5ea8 !important; color: #fff !important; border-color: #0b5ea8 !important; }
.project-detail-container .stereo-form .sf-radio input[type="radio"]:focus-visible + span { outline: 2px dotted rgba(11,94,168,.55); outline-offset: 2px; }

.project-detail-container .stereo-form .sf-figure {
  padding: 1rem 0 !important;
  background: transparent !important;
  border: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.project-detail-container .stereo-form .sf-figure img {
  max-width: 260px;
  height: auto;
  display: block;
}

.project-detail-container .stereo-form .sf-actions { display: flex; justify-content: center !important; margin-top: 1.4rem !important; }
.project-detail-container .stereo-form .sf-btn-primary {
  background: #ffe599 !important;
  color: #111 !important;
  border: 2px solid #e6c200 !important;
  border-radius: 14px !important;
  padding: 1rem 2rem !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  cursor: pointer;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.12);
  transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
}
.project-detail-container .stereo-form .sf-btn-primary:hover { transform: translateY(-1px); box-shadow: 4px 4px 14px rgba(0,0,0,0.15); opacity: .97; }
.project-detail-container .stereo-form .sf-btn-primary:active { transform: translateY(0); box-shadow: 2px 2px 6px rgba(0,0,0,0.1); }

/* ------------------------------
    FAQ
------------------------------- */
.faq-section {
  padding: 4rem 2rem;
  background: #f9f9f9;
  color: #111;
  max-width: 800px;
  margin: auto;
}

.faq-section h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Question button */
.faq-question {
  width: 100%;
  padding: 1rem 1.25rem 1rem 1rem;
  font-size: 1.05rem;
  text-align: left;
  background: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: background 200ms ease;
}

.faq-question::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 250ms ease;
  opacity: .8;
  margin: 0 .25rem 0 .35rem;
}

.faq-question[aria-expanded="true"]::before {
  transform: rotate(45deg); /* points up */
}

.faq-question:hover {
  background: #f7f7f7;
}

.faq-question:focus-visible {
  outline: 2px solid #0a66c2;
  outline-offset: 3px;
  border-radius: 8px;
}

/* Answer panel (animated) */
.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 1.25rem 0 2rem;       /* left indent for visual rhythm */
  color: #333;
  transition:
    max-height 300ms ease,
    opacity 200ms ease,
    transform 300ms ease,
    margin-top 300ms ease;
  transform: translateY(-4px);
  margin-top: 0;
  will-change: max-height;
}

.faq-answer.open {
  /* max-height is set inline via JS to the exact scrollHeight for smoothness */
  opacity: 1;
  transform: translateY(0);
  margin-top: .35rem;
  /* padding-bottom reveals once open (nice slide effect without jump) */
  padding-bottom: .85rem;
}

.faq-answer ul {
  margin: .5em 0 1em 1.5em;
  padding-left: 1em;
}

.faq-answer a {
  color: #0a66c2;
  text-decoration: underline;
}

.faq-divider {
  margin: 3rem auto 1rem;
  width: 60%;
  border: none;
  border-top: 1px solid #ddd;
}

.faq-last-updated {
  text-align: center;
  font-size: .9rem;
  color: #413737;
  margin-top: 2rem;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .faq-question,
  .faq-answer {
    transition: none !important;
  }
}

/* ------------------------------
  Blog 
------------------------------- */

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
  --radius: 14px;
}

#blog.section-white {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  background-color: var(--bg);
  color: var(--text);
}

/* Heading */
.blog-heading {
  margin: 0 0 1rem 0;
  text-align: center;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
}

/* Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  padding-top: 1.25rem;
}

/* Card */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  overflow: hidden;
}
.blog-card:hover,
.blog-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.blog-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;         /* show the entire image */
  background-color: #f8fafc;   /* light neutral bg behind transparent/shorter images */
  display: block;
  border-bottom: 1px solid var(--border);
}

.blog-content {
  padding: 1.1rem 1.1rem 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.blog-meta {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.blog-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

.blog-body {
  margin: 0.15rem 0 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #1f2937; /* gray-800 */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* "Read more" */
.blog-actions {
  margin-top: 0.35rem;
}
.blog-readmore {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: #f8fafc;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.blog-readmore:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}
.blog-readmore:active {
  transform: translateY(0);
}

/* Modal (HTML <dialog>) */
.blog-modal {
  padding: 0;
  border: none;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
  max-width: min(720px, 92vw);
  width: 100%;
}
.blog-modal::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.blog-modal-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0.75rem;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.blog-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.blog-modal-title {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.3;
}

.blog-modal-close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
}
.blog-modal-close:hover { background: #f3f4f6; }

.blog-modal-image {
  display: block;
  width: 100%;
  height: auto;                
  max-height: min(70vh, 720px);
  object-fit: contain;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  aspect-ratio: auto; 
}

.blog-modal-meta {
  margin: 0;
  padding: 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-modal-body {
  padding: 0 1.1rem 1.1rem;
  color: #111;
  line-height: 1.6;
}
.blog-modal-body p { margin: 0.6rem 0; }

.blog-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem 1.1rem;
  border-top: 1px solid var(--border);
}

.blog-modal-footer .blog-modal-close-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: #111;
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}
.blog-modal-footer .blog-modal-close-btn:hover {
  filter: brightness(1.05);
}
@media (max-width: 480px) {
  .blog-content { padding: 0.9rem 0.9rem 1.05rem; }
  .blog-grid { gap: 1.25rem; }
}

/* ensure hidden 'Read more' doesn't affect layout */
.blog-actions[hidden] { display: none !important; }



/* ------------------------------
    Personnel
------------------------------- */

.page-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.group-title {
  text-align: left;
  font-size: 1.2rem;
  font-weight: 500;
  margin: 2rem 0 1rem;
  color: #444;
}

.personnel {
  padding: 2rem 2rem 1rem;
  font-family: sans-serif;
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.person {
  text-align: center;
  width: 150px;
  font-size: 0.9rem;
}

.person img {
  width: 150px;
  height: 150px;
  object-fit: cover;
}

.person-info {
  margin-top: 0.5rem;
}

.visitors-title {
  font-size: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-top: none;
  padding-top: 0.5rem;
  text-align: center;
  font-weight: 600;
}

.visitors-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1rem 2rem;
  font-family: sans-serif;
}

.visitor-card {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.9rem;
}

.visitor-card .visitor-name {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.visitor-card .visitor-year {
  color: #555;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.visitor-card .visitor-role {
  font-size: 0.85rem;
  color: #333;
  line-height: 1.3;
}

/* undergraduates section styling */
.undergrads-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
  padding: 1rem 2rem 2rem;
}

.undergrad-card {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 0.2 rem;
  text-align: center;
  font-size: 0.8rem;
  color: #333;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: transform 0.15s ease-in-out;
}

.undergrad-card:hover {
  transform: scale(1.02);
}

.undergrad-name {
  font-weight: 500;
}


/* ------------------------------
   Publications
------------------------------- */
#publications h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #222;
}

/* Centered control row */
.pub-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

/* Group selector and button */
#publications label {
  font-size: 1rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

#group-by {
  font-size: 1rem;
  padding: 0.4rem 2rem 0.4rem 0.8rem; /* extra right padding for arrow spacing */
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #222;
  font-family: inherit;
  vertical-align: middle;
  cursor: pointer;
}

#toggle-all {
  font-size: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background-color: #63c138;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#toggle-all:hover {
  background-color: #4ea32c;
}

/* Collapsible group headers */
.collapsible-header {
  cursor: pointer;
  background-color: #eee;
  padding: 1rem 1.2rem;
  margin-top: 2rem;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #222;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Publication List */
.pub-list {
  list-style: none;
  padding: 1rem 1.5rem;
  margin: 0;
}

.pub-list.hidden {
  display: none;
}

/* Each publication entry */
.pub-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid #ddd;
}

.pub-thumb {
  width: 150px;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.pub-details {
  flex: 1;
  min-width: 250px;
}

.pub-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: #111;
}

.pub-meta {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.pub-links {
  margin-top: 0.3rem;
}

.pub-btn {
  margin-right: 0.6rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #007acc;
  text-decoration: none;
  border: 1px solid #ccc;
  transition: background-color 0.2s, color 0.2s;
}

.pub-btn:hover {
  background-color: #007acc;
  color: #fff;
  border-color: #007acc;
}

@media (max-width: 600px) {
  .pub-entry {
    flex-direction: column;
    align-items: flex-start;
  }

  .pub-thumb {
    width: 100%;
    max-width: 300px;
    margin-bottom: 0.8rem;
  }
}

.bibtex-block {
  margin-top: 0.5rem;
  font-family: monospace;
  font-size: 0.85rem;
  background-color: #f9f9f9;
  color: #333;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-x: auto;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.bibtex-block.hidden {
  display: none;
}
