/***********************/
/* COLORS */
/***********************/

:root {
  --background: #f4f4f4;
  --lightgrey: rgba(0, 0, 0, 0.1);
  --darkgrey: #4d4d4d;
  --accent1: #a71854; 
  --accent2: #003975; 
  --boxcolor: rgba(255, 255, 255, 0.1);
  --boxaccent: rgba(242, 242, 242, 0.1);
  --buttoncolor: rgba(211, 211, 211, 0.1);
  --buttonaccent: rgba(0, 0, 0, 0.15);
}

/***********************/
/* GENERAL */
/***********************/

html {
  height: 100%;
}

body {
  font-family: 'Quicksand', sans-serif;
  h1, h2{
    font-family: 'Merriweather', serif;
  }
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;

  background: var(--background);
  color: #1a1a1a;
  line-height: 1.6;
}



body.bg-svg {
  position: relative;
  z-index: 0;
}

body.bg-svg::before {
  content: "";
  position: fixed;
  left: 0;
  width: 100vw;
  top: -200vh;
  height: 400vh;

  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.094) 2px, transparent 1px);
  background-size: 30px 30px;
  background-repeat: repeat;

  z-index: -2;
  pointer-events: none;
  transform: translateY(calc(var(--scroll-y, 0px)));
}

body.bg-svg::after {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150vw;
  height: 150vh;

  background-image: url("/assets/jmd.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  opacity: 0.08;

  z-index: -1;
  pointer-events: none;
}


header {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--lightgrey);
  padding: 2rem;
  padding-top: 5rem;
  margin-top: -3rem;
}

.accent-text {
  color: var(--accent2);
  font-weight: 600;
}

.navbar {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hamburger {
  display: none;
}

main {
  flex: 1;
  min-height: 50vh;
  padding: 2rem 3rem 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 500px) {
  main {
    padding: 1.75rem;
    text-align: center
  }
}

footer {
  position: relative;
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--darkgrey);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--lightgrey);
  z-index: 1;
}



/***********************/
/* INTRO IMAGE */
/***********************/

.intro-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.intro-image-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
  width: 100%;
  flex-wrap: nowrap;
  /*overflow: hidden;*/
}

.intro-image {
  background: var(--boxcolor);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--lightgrey);
  border-radius: 1000px;
  padding: 6px;
  width: 120px;
  height: 120px;
  flex-shrink: 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.intro-image:hover {
  transform: translateY(-6px);
}


.intro-image.overlap {
  margin-left: -30px;
  z-index: 1;
}


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

  .intro-text {
    text-align: center;
    align-self: center;
  }

  .intro-text h1,
  .intro-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .intro-image-group {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    max-width: 90vw;
  }

  .intro-image {
    width: 24vw;
    height: 24vw;
    aspect-ratio: 1;
    padding: 1.5vw;
  }

  .intro-image.overlap {
    margin-left: -6vw;
  }

}


.image-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0;
  position: relative;
  padding: 6px;
}


.image-cluster .intro-image {
  position: relative;
  z-index: 0;
}

.image-cluster .intro-image.first {
  z-index: 2;
}

.image-cluster .intro-image.overlap {
  margin-left: -30px;
  z-index: 1;
}

@media (max-width: 600px) {
  .image-cluster .intro-image {
    width: 27vw;
    height: 27vw;
    aspect-ratio: 1;
  }

  .image-cluster .intro-image.overlap {
    margin-left: -6vw;
  }
}


/***********************/
/* MASTER BOX */
/***********************/

.box {
  background: var(--boxcolor);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--lightgrey);
  border-radius: 8px;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.box:hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

/***********************/
/* INTRO BOX */
/***********************/


.intro-box {
  padding: 1.2rem 1.5rem 0.2rem 1.5rem;
  margin: 2rem 0;
  break-inside: avoid;
}

@media (max-width: 600px) {
  .intro-box {
    padding: 1rem;
    margin: 1.5rem 0;
  }
}


/***********************/
/* GALLERY */
/***********************/

.photo-gallery {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 1rem;
  flex-wrap: wrap;
  position: relative;
}

.gallery-img {
  width: 250px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.gallery-img:hover {
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .gallery-img {
    
    margin-bottom: 0.5rem;
  }

  .photo-gallery {
    justify-content: space-around;
  }
}

/***********************/
/* BOXES */
/***********************/

.project-grid-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  text-align: left;
  h1, h2, h3 {
    text-align: left;
  }
}

.project-grid {
  column-count: 3;
  column-gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-box {
  /*all: unset;*/
  display: inline-block;
  width: 90%;
  margin: 1rem 1rem .5rem 0rem;
  padding: 1rem 1rem 0rem 1rem;
  cursor: default;
  color: inherit;
  text-decoration: none;
  text-align: left;
  contain: layout paint;

  h2 {
    font-size: 1.1rem;
  }
}


.project-box,
.project-box * {
  text-decoration: none !important;
}

.project-box img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  /*border: 1px solid var(--lightgrey);*/
}

.project-box .inline-logo {
  transform: none !important;
  transition: none !important;
}

.inline-logo {
  height: 2em;
  width: 2em;
  width: auto;
  border-radius: 2em;
  vertical-align: -1.1em;
  margin-right: 0.5em;
  object-fit: cover;
}





/***********************/
/* LINKS */
/***********************/

a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  transition: none;
}

a:hover {
  color: inherit;
  text-decoration: none;
}

a.styled-link {
  color: var(--accent2);
  font-weight: 600;
  transition: color 0.4s ease;
}

a.styled-link:hover {
  color: var(--accent1);
}


a[href^="https://"]:after {
  content: "";
  background-color: var(--accent2); /* Any color you want */
  mask: url("/assets/link.svg") no-repeat center;
  mask-size: contain;
  padding-left: 20px;
  margin-left: 4px;
}

a[href^="https://"]:hover {
  color: var(--accent1);
}

a[href^="https://"]:hover:after {
  background-color: var(--accent1);
}


/***********************/
/* Buttons */
/***********************/



.skip-link {
  display: none;
}

.button {
  padding: 1rem 1.5rem;
  margin: .2rem;
  border: none;
  border-radius: 100px;
  
  background: var(--buttoncolor);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(15px);
  
  border: 1px solid var(--lightgrey);
  color: var(--darkgrey);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.4s ease, transform 0.4s ease, filter 0.4s ease;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.button.active {
  background-color: var(--buttonaccent);
  
}

@media (max-width: 600px) {
  #filter-buttons,
  .button-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    text-align: center;
    margin-bottom: 1rem;
  }
}

.mobile-only {
  display: none;
}

@media (max-width: 600px) {
  .mobile-only {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
  }
}


/***********************/
/*  */
/***********************/

@media (max-width: 1000px) {
  .project-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .project-grid {
    column-count: 1;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none !important;
  }

  .navbar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .navbar a {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    display: inline-block !important;
  }
}


/***********************/
/* MENU */
/***********************/


@media (max-width: 768px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    margin: auto;
    cursor: pointer;
    margin-bottom: 1rem;
  }

  .hamburger div {
    width: 25px;
    height: 3px;
    background-color: #333;
  }

  .navbar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    flex-direction: column;
    text-align: center;
  }
  
  .navbar.active {
    max-height: 300px;
    padding-top: 1rem;
  }
}

.navbar a {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.navbar.active a {
  opacity: 1;
  transform: translateY(0);
}

.navbar.hiding a {
  opacity: 0;
  transform: translateY(-5px);
}

/* Forward delay for fade-in */
.navbar.active a:nth-child(1) { transition-delay: 0.1s; }
.navbar.active a:nth-child(2) { transition-delay: 0.15s; }
.navbar.active a:nth-child(3) { transition-delay: 0.2s; }
.navbar.active a:nth-child(4) { transition-delay: 0.25s; }
.navbar.active a:nth-child(5) { transition-delay: 0.3s; }

/* Reverse delay for fade-out */
.navbar.hiding a:nth-child(1) { transition-delay: 0.3s; }
.navbar.hiding a:nth-child(2) { transition-delay: 0.25s; }
.navbar.hiding a:nth-child(3) { transition-delay: 0.2s; }
.navbar.hiding a:nth-child(4) { transition-delay: 0.15s; }
.navbar.hiding a:nth-child(5) { transition-delay: 0.1s; }


/***********************/
/* HEADERS */
/***********************/

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  h1, h2, h3 {
    text-align: center;
  }
}


/***********************/
/* AFFILIATIONS */
/***********************/




.affiliation-box {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.5rem;
  break-inside: avoid;
  cursor: pointer;
  text-align: left;
  contain: layout paint;
}



.affiliation-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.affiliation-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.affiliation-box.open .affiliation-body {
  max-height: 300px;
  margin-top: 1rem;
}

.affiliation-logo {
  height: 40px;
  width: 40px;
  border-radius: 6px;
  object-fit: cover;
  vertical-align: middle;
}

.affiliation-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: -0.6rem;
  text-align: left;
}

.affiliation-meta {
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.affiliation-date {
  font-size: 0.95rem;
  color: var(--darkgrey);
  margin: 0;
  line-height: 1.4;
}

.affiliations-wrapper {
  column-gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.affiliation-content {
  padding: .5rem 1.5rem 1rem 1.5rem;
}

.affiliation-body p {
  font-size: 0.95rem;  /* Adjust as needed */
  color: #444;         /* Or use var(--darkgrey) for consistency */
  line-height: 1.5;
  margin: 0;
}


.category-section {
  margin-bottom: 3rem;
}

.category-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--darkgrey);
  margin-bottom: 1rem;
  padding-top: 1.5rem;
}

.affiliations-columns {
  column-count: 2;
  column-gap: 2rem;
}

@media (max-width: 850px) {
  .affiliations-columns {
    column-count: 1;
  }
}

.hidden {
  display: none !important;
}




/***********************/
/* COLOR PULSE */
/***********************/

.pulse {
  background-color: var(--boxcolor, rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(15px);
  transition:
    background-color 0.4s ease,
    transform 0.4s ease,
    filter 0.4s ease;
}

.pulse:hover {
  background-color: var(--hover-pulse-color, rgba(255, 255, 255, 0.1));
}

.pulse.pulsing {
  animation: pulse-var 2.5s ease-in-out;
  --pulse-color: rgba(255, 255, 255, 0.1);
}

@keyframes pulse-var {
  0%   { background-color: var(--boxcolor); }
  50%  { background-color: var(--pulse-color); }
  100% { background-color: var(--boxcolor); }
}