* {
  margin: 0;
  padding: 0;
}

:root {
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #EDEDED;
  --color-light: #efefef;
  --color-dark-grey: #afafaf;
  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  --font-family-serif: "garamond-premier-pro", serif;
  --font-family-sans: Arial, Helvetica, sans-serif;
  --font-size-base: 18px;
  --font-size-large: 24px;
  --font-size-small: 14px;
}

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  scroll-behavior: smooth;
}

body {
  line-height: 1.3;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: var(--color-text);
  text-decoration: none;
}

h1 {
    font-family: var(--font-family-serif);
    font-size: var(--font-size-large);
    font-weight: 100;
    font-style: normal;
}


h2 {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    font-weight: 100;
}

@media (max-width: 768px) {
  :root{
      --font-size-base: 16px;
      --font-size-large: 1.6rem;
  }

    h1 {
    font-size: 1.6rem; /* ~24-26px instead of desktop 36px */
  }

}

/* HOME */

/* -------------------------------
   Main navigation
---------------------------------*/
.home-nav {
 position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%); /* centers it */
  z-index: 10;
  text-align: center;
  list-style: none;
  width: max-content;  /* shrink nav to content size */
  max-width: 100%;     /* prevent overflow on small screens */

    /* Smooth transition for opacity */
  transition: -webkit-mask-image 0.3s ease;
  transition: mask-image 0.3s ease;
}

/* Top-level <li> */
.home-nav > li {
  position: relative; /* ensures dropdown stays inside hover */
}

/* Top-level links inside H1 */
.home-nav > li > h1 > a {
  display: block;
  text-decoration: none;
  font-size: var(--font-size-large);
}

/* -------------------------------
   Top-level hover / active links
---------------------------------*/

/* Generic top-level links */
.home-nav > li > h1 > a:hover,
.home-nav > li > h1 > a.active {
  color: var(--color-black);
  text-decoration: underline;
}

.home-nav > li:hover > h1 > a {
  text-decoration: underline;
}

/* -------------------------------
   Dropdown menu
---------------------------------*/

.home-nav .dropdown {
  display: none;
  min-width: 100%;    /* optional: make dropdown same width as top link */
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 5;
}

/* Show dropdown on hover */
.home-nav > li:hover > .dropdown {
  display: block;
}

/* Generic dropdown links (other pages) */
.home-nav > li .dropdown a {
  color: var(--color-black);
  line-height: 23px;
  font-size: var(--font-size-base);
  padding: 0.25rem 0.5rem;
  display: block;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/*Hover effect on dropdown links */
.home-nav > li .dropdown a:hover {
  font-style: italic;
}

@media screen and (max-width: 768px) {

.home-nav > li > h1 > a {
    font-size: 1.6rem;
  }

footer h1 {
    font-size: 1.6rem;
}

.home-nav > li:hover > h1 > a {
  text-decoration: none;
}

/* -------------------------------
   Dropdown menu
---------------------------------*/

/* Don't show dropdown on hover */
.home-nav > li:hover > .dropdown {
  display: none;
}



}
/* ------------------- PAGE NAV DESKTOP ------------------- */
.page-nav {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  text-align: center;
  list-style: none;
  margin: 0;
  padding-bottom: 1.25rem;
  z-index: 10;
}

.hidden-in-dropdown {
  display: none !important;
}

/* Top-level pages hidden by default */
.page-nav > li {
  opacity: 0;
  visibility: hidden;
  display: block;
  margin: 0 1rem;
  position: relative;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hover on desktop */
.page-nav > li a:hover {
  text-decoration: italic;
}
.page-nav > li > h1 > a:hover,
.page-nav > li:hover > h1 > a {
  text-decoration: underline;
}

/* Show only the active top-level page by default */
.page-nav > li.active {
  opacity: 1;
  visibility: visible;
}

/* Show all top-level pages on hover */
.page-nav:hover > li {
  opacity: 1;
  visibility: visible;
}

/* Dropdown container for child entries */
.page-nav .dropdown {
  position: relative;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  margin: 0;
  white-space: nowrap;
}

/* Hide all child links by default */
.page-nav .dropdown li a {
  display: none;
  padding-bottom: 0.3rem;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.2s ease;
}

/* Hovering over the active page shows all child links (desktop only) */
.page-nav > li.active:hover .dropdown li a,
.page-nav > li:hover .dropdown li a {
  display: block;
}

/* Current visible entry (based on scroll) */
.page-nav .dropdown li a.current-entry {
  display: block;
  color: black;
  font-size: 18px;
}

/* Hover effect for other child links */
.page-nav .dropdown li a:hover {
  color: black;
  font-style: italic;
}

.page-nav .dropdown li a {
  display: none;
}
.page-nav > li.active:hover .dropdown li a,
.page-nav > li:hover .dropdown li a {
  display: block;
}
.page-nav .dropdown li a.current-entry {
  display: block;
  color: black;
  font-size: 18px;
}

.page-nav > li.podcasts > .show-dropdown {
  display: none !important;
}

 .page-nav .current-entry-wrapper {
    list-style: none;
    font-size: 18px;
    padding: 0.25rem 0.5rem;
    /* padding-bottom: 0.3rem; */
  }

/* PAGE NAV MOBILE */
@media screen and (max-width: 768px) {

  /* Page nav container */
  .page-nav {
    left: 0;
    transform: unset;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
  }

  /* Hide all top-level pages except active by default */
  .page-nav > li {
    display: none;
  }
  .page-nav > li.active {
    display: block;
  }

  /* Show all top-level pages when nav is toggled */
  .page-nav.show-all-headings > li {
    display: block !important;
  }

  /* Current entry wrapper always visible */
  .page-nav .current-entry-wrapper {
    display: block;
    /* margin-bottom: 0.5rem; */
    padding: 0;
    list-style: none;
    font-size: 18.5px;
  }

  .page nav .current-entry-wrapper ul {
    padding: 0;
    margin: 0;
  }

  .page-nav .current-entry-wrapper li a {
    display: block;
  }

  /* Dropdown with non-current children hidden by default */
  .page-nav > li > .dropdown {
    display: none;
    flex-direction: column;
    margin-top: 0.2rem;
  }

  /* Show dropdown when activeLi has .show-dropdown */
  .page-nav > li.show-dropdown > .dropdown {
    display: flex;
  }

  /* Dropdown links styling */
  .page-nav .dropdown li a {
    display: block; /* JS handles hiding current-entry in dropdown */
    padding: 0.25rem 0;
    font-size: 18.5px;
    color: inherit;
    text-decoration: none;
  }

  /* Remove hover effects for mobile */
  .page-nav > li > h1 > a:hover,
  .page-nav > li a:hover,
  .page-nav .dropdown li a:hover {
    text-decoration: none;
    font-style: normal;
    color: inherit;
  }
}

/* BOOKS */

.books-page {
  margin: 7rem 1rem 10rem;
}

.books-entry {
  margin: 6rem auto;
  padding-bottom: 3rem;
  font-size: var(--font-size-base);
  max-width: 900px; /* or any width you prefer */
  width: 100%;
  scroll-margin-top: 70px;
}
/* 
.books-entry .slider {
  margin-bottom: 3.5rem;
} */

.books-entry-cols {
  column-gap: 2rem;
  padding-bottom: 20px;
  display: grid;
  grid-template-columns: 1.3fr 3fr;
}

.books-entry a{
  text-decoration: underline;
}

.books-entry a:hover{
  text-decoration: none;
}


.books-info {
  font-size: var(--font-size-small);
  margin-bottom: 20px;
}

.books-credits, .films-visual-works-credits {
  font-size: var(--font-size-small);
  margin-top: 20px;
  color: var(--color-dark-grey);
}

.books-credits-heading, .films-credits-heading {
  cursor: pointer;
  text-decoration: underline;
  display: inline-block;
}

.books-credits-dropdown, .films-visual-works-credits-dropdown {
  position: relative;
  max-height: 0;
  /* height: auto; */
  overflow: hidden;
  opacity: 0;
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr; /* two columns */
  gap: 1rem;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.books-credits-dropdown, .films-visual-works-credits-dropdow > * {
  flex: 1; 
  /* min-height: 300px; */
}

/* Open state */
.books-credits-dropdown.open, .films-visual-works-credits-dropdown.open {
  max-height: 400px; /* adjust depending on content size */
  /* height: auto; */
  opacity: 1;
  /* transition: max-height 1.5s ease; */
}

.books-entry-left-col, .films-entry-left-col {
  padding-right: 2rem;
  font-size: var(--font-size-small);
}

.books-links li{
  list-style: none;
  margin-bottom: 20px;
}

.films-visual-works-links li {
  list-style: none;
  margin-bottom: 20px;
  font-size: var(--font-size-small)
}

.link-type {
  color: var(--color-dark-grey);
}

#films-entry-links-title, #books-entry-links-title {
  padding-right: 3px;
}

/* Books entry slideshow */

.slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 900px;   /* don’t let it grow wider than viewport */
  height: 550px;
  margin: 0 auto 2.5rem auto; /* centers it horizontally */
  cursor: none;
}

.slide {
  display: none;
  width: 100%;
  height: 100%; 
  transition: opacity 0.5s ease-in-out;   
}

.slide.active {
  display: block;
}

.slider img {
  width: 100%;
  height: 100%;       /* fill container */
  object-fit: contain;  /* crop if needed */
  object-position: center;
}


/* controls */

.slider-controls {
  position: absolute;
  bottom: 0px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-small)
}

.counter {
  position: absolute;
  bottom: 0px;   /* small gap from the edge */
  right: 8px;    /* adds breathing room from the corner */
  color: var(--color-dark-grey);
  font-size: 0.8rem;
  display: none;
}

.slider-controls button {
  display: none;
  border: none;
  padding: 0.3em 0.6em;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  background: none;
}

/* Slider custom cursor */

.custom-cursor {
  color: var(--color-dark-grey);
  position: fixed;
  top: unset;
  left: 0;
  pointer-events: none; /* so clicks go through */
  font-size: 0.8rem;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  transform: translate(-50%, -50%);
  z-index: 1000;
  white-space: nowrap;
}


/* FILMS & VISUAL WORKS */
.films-page {
  color: var(--color-text-grey);
  background-color: #000;
  min-height: 100vh;          /* full viewport height */
  width: 100%;
  margin: 0;                  /* remove outer margin */
  padding: 8rem 20px 80px;    /* top, horizontal, bottom padding */
  box-sizing: border-box;
}

/* Ensure no body/html margins create white frame */
body.films-visual-works,
html.films-visual-works {
  margin: 0;
  padding: 0;
  background-color: #000;
}

/* Grid layout for entries */
.films-entry {
  color: var(--color-text-grey);
  margin: 0 auto;
  max-width: 900px;
  width: 100%;
  font-size: var(--font-size-base);
  scroll-margin-top: 120px;
  margin-bottom: 15rem;
}

.films-entry-cols {
  display: grid;
  grid-template-columns: 1.3fr 3fr;
  column-gap: 1rem;
  padding-bottom: 20px;
}

/* Links */
.films-entry a {
  text-decoration: underline;
  color: white;
}

.films-entry a:hover {
  text-decoration: none;
}

/* Info text */
.films-visual-works-info {
  font-size: var(--font-size-small);
  margin-bottom: 20px;
}

.films-visual-works-info p {
  margin-bottom: 5px;
}

/* Intro text */

.films-visual-works-intro p {
  margin-bottom: 12px;
}

/* Slider */
.films-page .slider {
  height: 350px;
  margin-top: 50px;
  max-width: 95vw;
  margin-bottom: 4.5rem;
}

body.films-visual-works .page-nav {
  color: white;
}

body.films-visual-works .page-nav a {
  color: white;
}

body.films-visual-works .page-nav .dropdown li a {
  color: white;
}

.films-visual-works footer a {
  color: var(--color-text-grey);
}

.films-visual-works .custom-cursor {
  color: var(--color-grey);
}

body.films-visual-works .back-to-top {
  color: var(--color-text-grey);
}


@media (max-width: 768px) {
  
  *, *::before, *::after {
  box-sizing: border-box;
}

  /* Books & Films entries */

  .books-entry {
    padding: 0 1rem;
  }

  /* Book cols */
    .books-entry-cols {
    display: flex; /* stack left/right cols vertically */
    flex-direction: column;
    gap: 2rem;
    padding-right: 0;
  }

  .books-entry-right-col {
    order: 1;
  }

  .books-entry-left-col {
    order: 2;
  }

  .films-entry {
    padding: 0 2rem;
    margin-bottom: 8rem;
    scroll-margin-top: 90px;
  }

    .films-entry-cols {
    grid-template-columns: 1fr; /* stack columns */
  }

  /* Film cols */

  .films-entry-cols {
    display: flex;          /* use flex instead of block */
    flex-direction: column; /* stack vertically */
    gap: 1rem;                 /* instead of column-gap */
    padding-right: 0;
  }

  .films-entry-right-col { 
    order: 1;
  }

  .films-entry-left-col {
    order: 2;
    padding-right: 0;
  }

  .books-entry-left-col {
    padding-right: 0;
    /* margin-bottom: 1.5rem; */
  }


  
  .books-entry a,
  .films-entry a {
    font-size: 0.85rem; /* slightly smaller links */
  }

  .books-credits-dropdown,
  .films-visual-works-credits-dropdown {
     grid-template-columns: 1fr;
  }

  /* Sliders */


.slider-controls {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 0.5rem;      /* space below image */
    justify-content: center;  /* center horizontally */
    gap: 1rem;               /* more touch-friendly spacing */
  }

  .slider-controls button {
    display: none;
    padding: 0.5em 1em;      /* easier to tap on mobile */
    font-size: 1.2rem;
  }

  /* optional: hide custom cursor on mobile */
  .custom-cursor {
    display: none;
  }

 /* Slider counter */
  .counter {
    display: block;
  }


.books-page .slider {
  width: 100%;
  height: 41vh;           /* fixed container height for cropping */
  margin: 1rem 0 2rem;
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center;     /* vertical center */
  overflow: hidden;        /* crop anything outside container */
}

.books-page .slider img {
  max-width: none;        /* prevent flexbox from limiting width */
  min-width: 100%;        /* fill width of container */
  min-height: 100%;       /* fill height of container */
  object-fit: cover;      /* crop image to fill container */
  margin: 0 auto;   
  object-position: center;/* keep center of image visible */
}

.books-page .slider-controls {
  position: relative;      /* not absolute like desktop cursor */
  bottom: auto;
  right: auto;
  margin-top: 0.5rem;
  justify-content: center;
  gap: 1rem;
}

.books-page .slider-controls button {
  padding: 0.5em 1em;
  font-size: 1.2rem;
}

  /* Text and info */
  .books-info,
  .films-visual-works-info {
    font-size: var (--font-size-base);
    /* margin-bottom: 1rem; */
  }

  .films-visual-works-info p {
    margin-bottom: 0;
  }

  .films-visual-works-links{
    padding-right: 1rem;
  }

  .films-entry-cols {
    grid-template-columns: 1fr;
    column-gap: 0;
    margin-bottom: 3rem;
  }


 .films-page {
    padding: 9rem 10px 60px; /* slightly smaller padding for mobile */
  }

  .films-page .films-entry {
    margin-top: 2rem;
  }

  .films-page .slider {
    height: 50vw;
    margin: 0 auto 2rem;
  }

  .films-page .slider img {
    height: auto;          /* image height adapts */
    object-fit: contain;   /* keep aspect ratio */
  }

  .films-page .slide {
    padding-bottom: 10px;
  }

  .films-entry .counter{
    bottom: 0px;
  }


  /* General page margins */
  .books-page {
    margin: 8.5rem 1rem 6rem;
  }
  
  /* Reduce heading sizes */
  h1 {
    font-size: 1.6rem; /* ~24-26px instead of desktop 36px */
  }

  h2 {
    font-size: 1.25rem;
  }
}

/* PODCASTS */

.podcasts-page {
  margin: 10rem 0 10rem;
}

.podcast-entry {
  margin: 0 auto 10rem auto;
  font-size: var(--font-size-base);
  max-width: 900px; /* or any width you prefer */
  width: 100%;
}

/* podcast single col styling */

.podcast-entry-content {
  padding: 0 11rem;
}

.podcast-cover {
  margin: 0 auto 4.5rem auto;
  width: 300px;
}


/* podcast cols styling */

.podcast-entry-cols {
  column-gap: 3rem;
  padding-bottom: 20px;
  display: grid;
  grid-template-columns: 1.3fr 3fr;
}

.podcast-entry-left-col {
 padding-right: 1rem;
  font-size: var(--font-size-small);
}

/* .podcast-cover {
  width: 200px;
} */

.podcast-cover img{
  width: 100%;
  object-fit: cover;
}

.podcast-entry a{
  text-decoration: underline;
}

.podcast-entry a:hover{
  text-decoration: none;
}


.podcast-description {
  font-size: var(--font-size-base);
  margin-bottom: 40px;
}

.podcasts-research-info {
  color: var(--color-dark-grey);
  font-size: 1rem;
}

.podcast-year {
  color: var(--color-dark-grey);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.podcasts-research-info a.shake {
  animation: shake 0.4s ease-in-out;
  display: inline-block; /* ensure transform works */
}

/* PODCAST MOBILE */

@media (max-width: 768px) {

  .podcasts-page {
    margin: 10.5rem 1rem;
  }

  .podcast-entry-cols {
    display: flex; /* stack left/right cols vertically */
    flex-direction: column;
    gap: 2rem;
    padding-right: 0;
  }

  .podcast-entry-right-col {
    order: 1;
  }

  .podcast-entry-left-col {
    order: 2;
    padding-right: 0;
  }

  .podcast-entry-content {
    padding: 0 2rem;
  }

  .podcast-cover {
    width: 100%;
    max-width: 200px;
    margin-bottom: 3rem;
  }
}

/* FOOTER */

  .footer-page {
    transition: opacity 0.3s ease; /* smooth fade */
    position: fixed;
    /* margin-bottom: 20px; */
    /* top: 93.25vh; */
  }

 
footer {
  text-align: center;
  width: 100%;
  z-index: 10;
  font-size: var(--font-size-large);
}

/* Homepage footer sits at bottom */
.footer-home {
  position: relative;
  margin-top: auto;     /* pushes footer down */
  margin-bottom: 20px; 
  order: 1;
}


  footer h1 a:hover {
    text-decoration: underline;
  }

  .about-marker {
    margin: 0 auto;
    font-size: var(--font-size-base);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* center exactly */
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  
  /* ABOUT */

  #about {
  margin-top: 4rem;
  padding: 0 2rem;
  width: 42vw;
  max-width: 100%;
  font-size: var(--font-size-base);
  scroll-margin-top: 120px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  text-align: left;
}


a.about-title:hover {
  font-style: italic;
}

.about-cols {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-contact {
  display: flex;
  flex-direction: column;
}

.about-contact ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
}

.about-contact li a {
  text-decoration: underline;
}

.about-contact a:hover {
  text-decoration: none;
}

.about-contact .email{
  text-decoration: underline;
}

.about-contact .contact-reveal{
  margin-bottom: 1rem;
  width: 320px;
}

  .contact-reveal .hidden-email {
    visibility: hidden;
  }

  /* On hover, show full email text inside the link */
  .contact-reveal:hover .hidden-email {
    visibility: visible;
    margin-left: 1rem;
  }

.about-contact .email:hover{
  text-decoration: none;
}

.about-main .bio p {
  margin-bottom: 1.25rem;
}

.bio a{
  text-decoration: underline;
}

.bio a:hover{
  text-decoration: none;;
}

.about-main .bio p:last-child {
  margin-bottom: 0; /* no extra space after last paragraph */
}

.cv-wrapper {
  grid-column: 2 / 3; /* same column as about-main */
  width: 100%;
  margin-bottom: 8rem;
}

.cv-wrapper .section-heading {
  margin: 1rem 0 0.5rem;
  color: var(--color-dark-grey);
  font-size: var(--font-size-base)
}

.section-list {
  list-style: none;
  padding: 0 0 1.25rem;
  margin: 0;
}

.section-list li {
  margin-bottom: 0.2rem;
}

.section-list .type {
  color: var(--color-dark-grey);
  /* padding-left: 0.3rem; */
}

.cv-heading {
  display: none;
}

/* ABOUT MOBILE  */

@media (max-width: 1200px) {
  #about { width: 70vw; }
}

@media (max-width: 950px) {
  #about { width: 80vw; }
}

@media (max-width: 768px) {
  #about {
    width: 100%;
    left: 0;
    transform: none;
    display: flex;
    justify-content: center; /* optional if you want content centered */
  }

  .about-cols {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

  .about-main { order: 1; }
  .about-contact { order: 2; }
  .cv-wrapper { order: 3; }

  .about-contact{
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
  }

  .about-contact ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 0;
  }

   .contact-reveal .hidden-email {
    margin-left: 1.5rem;
  }

  .email {
    text-decoration: underline;
  }

  .about-contact .email:hover{
  text-decoration: underline;
}

  .cv-heading {
    font-size: var(--font-size-base);
    margin: 1rem 0 1rem;
    cursor: pointer;
    color: var(--color-dark-grey);
    /* text-decoration: underline; */
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .cv-heading-text {
    text-decoration: underline;
  }

  .cv-sections {
    display: none;
    margin-top: 1rem;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
  }

  .cv-sections.open {
    display: block;
    margin-top: 1rem;
    max-height: 1000px;    
    opacity: 1; 
  }
}


/* WRITTEN CONTRIBUTIONS */

.contributions-page {
  display: flex;
  justify-content: center;
  margin: 12rem 0 10rem;
  padding: 0 4rem;

}

.contributions-wrapper {
  width: 950px;
}

.contrib-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contribution-item {
  border-bottom: 1px solid #000000;
  padding: 1.2rem 0 0.8rem 0;
}

.contribution-item:last-child {
  border-bottom: none;
}

.contrib-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contrib-title {
  font-size: var(--font-size-base);
}

.contrib-title:hover {
  font-style: italic;
}

.contrib-year {
  color: var(--color-dark-grey);
  font-size: var(--font-size-base);
}

.dropdown-content {
  max-height: 100%;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.5, 0.2, 0.175, 0.5);
}

.dropdown-inner-mobile {
  display:none;
}

.contribution-item.open .dropdown-content {
  max-height: 500px; /* adjust to fit */
}

.text-title {
  margin: 0.5rem 0 0;
  font-style: italic;
}

.text-request {
  color: var(--color-dark-grey);
}

.contrib-type {
  color: var(--color-dark-grey);
  margin-bottom: 10px;
}


.dropdown-columns {
  display: grid;
  grid-template-columns: 1fr 2fr; /* left narrower, right wider */
  gap: 2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: var(--font-size-base);
}

.links-column a {
  display: block;
  margin-bottom: 0.3rem;
  text-decoration: underline;
}

.links-column a:hover {
  text-decoration: none;
}

.desc-column {
  line-height: 1.4;
}

/* Written contributions mobile */

@media (max-width: 768px) {
  .contributions-page {
    margin-top: 8.5rem;
    padding: 0 2rem;
  }

  .contributions-wrapper {
    width: 100%;
  }

  .dropdown-columns {
    grid-template-columns: 1fr; /* single column on mobile */
    gap: 1rem;
  }

  .desc-column {
    font-size: var(--font-size-base);
  }

  .dropdown-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  overflow: hidden;
  transition: opacity 1.2s ease, max-height 0.5s ease;
  } 

  .dropdown-inner-mobile {
  display: block;
}

.dropdown-inner-desktop {
  display:none;
}

  .contribution-item {
    cursor: pointer;
  }

  .contribution-item.open .dropdown-content {
  opacity: 1;
}

  .contrib-title:hover {
    font-style: normal;
  }
}

/* BACK TO TOP */

.back-to-top {
  z-index: 20;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: var(--font-size-small);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}


/* mobile view */

@media (max-width: 768px) {
  .back-to-top{
    bottom: 1rem;
    right: 1rem;
  }
}