@font-face {
    font-family: 'garamond';
    src: url('EBGaramond-VariableFont_wght.ttf');
}

@font-face {
    font-family: 'gill-sans';
    src: url('gill-sans.otf');
}

@font-face {
    font-family: 'gill-sans-medium';
    src: url('gill-sans-medium.otf');
}

.slideshow {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
    transition: background-image 1s ease-in-out;
}

body {
    position: relative;
    margin: 0;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.left {
    padding-top: 60px;
    padding-right: 60px;
    padding-bottom: 60px;
    padding-left: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 60px;
}

.logo {
    height: 75px;
    width: auto;
}

.open {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  height: 100vh;
  box-sizing: border-box; /* Ensures padding doesn't add to height */
  overflow-y: auto;
  z-index: 1000;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.closed {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 60px;
    width: 60px;
}

.open, .closed {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  height: 100vh;
  box-sizing: border-box;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  transition: opacity 1s ease-in-out;
  overflow-y: auto;          /* allow menu to scroll independently */
}

.open nav {
  overflow-y: auto;
  max-height: 100%;
}

.bbground {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
}

.wtground {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
}

.menu-open {
    height: 24px;
    width: 27px; /* Set a fixed width */
    min-width: 27px; /* Prevent shrinking */
    max-width: 27px; /* Prevent growing */
    cursor: pointer;
    padding-top: 27px;
    padding-bottom: 87px;
}

.menu-open:hover {
    opacity: 0.6;
}

.menu-closed {
    height: 24px;
    width: 27px; /* Set a fixed width */
    min-width: 27px; /* Prevent shrinking */
    max-width: 27px; /* Prevent growing */
    cursor: pointer;
    padding-top: 27px;
    padding-bottom: 87px;
}

.menu-closed:hover {
    opacity: 0.6;
}

.menu-inactive {
  pointer-events: none !important;
  visibility: hidden !important;
}


nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-grow: 1;
}

.pages {
    text-decoration: none;
    font-family: 'gill-sans';
    font-size: 20pt;
    display: flex;
    align-items: flex start;
    justify-content: end;
    height: 60px;
}

a:hover {
    opacity: 0.6;
}

.title {
    font-family: 'gill-sans-medium';
    font-size: 26pt;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    text-decoration: none;
}

.white {
    color: #fff;
}

.black {
    color: #000;
}

h6 {
    font-family: 'garamond';
    font-size: 11pt;
    font-weight: 300;
    margin: 0;
    text-align: right;
    width: 100vw;
}

p {
    font-family: 'garamond';
    font-size: 11pt;
    font-weight: 300;
    margin: 0;
    text-align: left;
}

.icon {
    height: 60px;
    width: auto;
    cursor: pointer;
}

.icon2 {
    height: 60px;
    width: auto;
}

.adjust {
    height: 45px;
}

.projects {
    display: flex;
    flex-wrap: wrap;
    max-width: 720px;
    align-items: flex-end; /* Changed from center to flex-end to align caption baselines */
    justify-content: flex-start;
    padding-right: 60px;
    gap: 95px;
}

.icon:hover {
    opacity: 0.4;
}

.adjust2 {
    height: 35px;
}

.adjust3 {
    height: 52px;
}

.adjust4 {
    height: 56px;
}

.archive {
    height: 105px;
    width: 105px;
    object-fit: cover;
    cursor: pointer;
    z-index: 1;
}

.archive-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 720px; /* Add this line to match .projects */
    align-items: center;
    justify-content: flex-start;
    padding-right: 60px;
    gap: 45px;
}

.archive:hover {
    opacity: 0.4;
}

.proj-pic {
    cursor: pointer;
    z-index: 1;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* Container for centered image */
#overlay img {
  width: 75vw;
  height: 75vh;
  object-fit: contain;
  opacity: 1;
}

.menu-open.disabled {
  pointer-events: none;
  opacity: 0.5; /* Optional: visually indicate disabled state */
  user-select: none;
}

.info {
    max-width: 720px;
    text-align: justify;
}

.personal {
    display: flex;
    max-width: 720px;
    gap: 30px;
    flex-wrap: wrap;
}

.federica, .andrew {
    flex: 1 1 calc(50% - 15px); /* 2 columns with 30px gap total */
    display: flex;
    flex-direction: column;
}

.subordinate {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 15px;
    gap: 15px;
    width: calc(50% - 15px); 
}

.headshot-small {
    width: 100%;       /* Takes full width of column */
    height: auto;
    object-fit: cover; /* Optional: ensures proper cropping */
}

.headshot {
    width: 100%;       /* Takes full width of column */
    height: auto;
    object-fit: cover; /* Optional: ensures proper cropping */
}

.bio {
    font-family: 'gill-sans';
    font-size: 20pt;
    margin-top: 30px;
    margin-bottom: 5px;
}

.bio2 {
    font-family: 'gill-sans';
    font-size: 15pt;
    margin-top: 15px;
}

.cv {
    text-align: justify;
}

strong {
    font-family: 'garamond';
    font-size: 11pt;
    font-weight: 300;
    margin: 0;
    text-align: left;
}

.collab {
    max-width: 345px;
    text-align: justify;
}

.no-pointer-events {
  pointer-events: none;
  user-select: none;
}

.faded {
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.indi-p {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    height: 110px; /* enough height for icon + caption space */
    justify-content: flex-end; /* Push content to bottom */
}

.indi-p a {
    display: flex;
    align-items: center; /* Center the icon vertically within its space */
    justify-content: center;
    height: 60px; /* Fixed height for icon area */
    margin-bottom: 10px; /* Space between icon and caption */
}

.caption {
    position: absolute;
    bottom: -34px; /* Add vertical spacing between icon and text */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-family: 'garamond';
    font-size: 11pt;
    font-weight: 300;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    width: 150px; /* Wider to prevent wrapping */
    white-space: nowrap; /* Prevent text wrapping */
}

.indi-p:hover .caption {
    opacity: 1;
}

.content {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.pics {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-grow: 1; /* allow it to expand */
    min-width: 0; /* prevent overflow issues */
    gap: 30px;
}

.text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 360px;
    padding-left: 60px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.pics img {
    width: 100%;
    height: auto;
    display: block;
}

.credits {
    font-size: 9pt;
    line-height: 11pt;
    text-align: left;
}

.stats {
    line-height: 20pt;
}

@media screen and (max-width: 768px) {
  .content {
    flex-direction: column-reverse;
  }

  .text {
    width: 100%;
    padding-left: 0;
    padding-top: 0px;
    padding-bottom: 30px;
  }

  .pics {
    width: 100%;
  }

    .slideshow {
    height: 100vh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* Allow scroll elsewhere */
  body:not(.slideshow) {
    height: auto;
    overflow: auto;
  }

  .open,
  .closed {
    height: 100vh;
    overflow: hidden;
  }

  .open nav {
    overflow-y: auto;
    max-height: 100%;
  }

  #datetime-container {
    display: none !important;
  }

   .projects {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end; /* Keep caption alignment */
        justify-content: space-between;
        padding-right: 0;
        gap: 30px 0;
    }

   .indi-p {
        width: calc(50% - 15px);
        height: auto;
        align-items: center;
        margin-bottom: 30px;
        justify-content: flex-end; /* Maintain bottom alignment on mobile */
    }

    .indi-p a {
        height: 60px; /* Maintain consistent icon area height */
        margin-bottom: 10px;
    }

  /* Ensure icons stay the same size */
  .icon {
    height: 60px;
    width: auto;
  }

  .adjust {
    height: 45px;
  }

/* Replace the existing .archive-container mobile styles with this: */

/* Replace the existing .archive-container mobile styles with this: */

.archive-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping to create rows */
    align-items: center;
    justify-content: space-between; /* Distribute items evenly */
    padding-right: 0;
    gap: 30px; /* Equal 30px gap both vertically and horizontally */
}

.archive {
    width: calc(50% - 15px); /* Two per row with gap consideration */
    height: 120px; /* Keep consistent height */
    object-fit: cover;
    cursor: pointer;
    z-index: 1;
}

  .personal {
    display: flex;
    flex-direction: column; /* Force vertical stacking */
    max-width: 100%; /* Use full width on mobile */
    gap: 30px; /* Consistent spacing between sections */
    flex-wrap: nowrap; /* Prevent wrapping */
  }

  .federica, .andrew {
    flex: none; /* Remove flex sizing */
    width: 100%; /* Force full width */
    display: flex;
    flex-direction: column;
  }

  .subordinate {
    width: 100%; /* Force full width */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0; /* Remove padding-top so gap handles spacing */
    gap: 15px;
  }

  /* Ensure headshots and text scale nicely */
  .headshot, .headshot-small {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .info {
    max-width: 100%; /* Use full width on mobile */
  }

  .collab {
    max-width: 100%; /* Use full width on mobile */
  }

  p {
    -webkit-text-size-adjust: none; /* Prevents text scaling */
  }
  
  /* Disable automatic phone number detection and styling */
  a[href^="tel:"] {
    color: inherit;
    text-decoration: none;
    pointer-events: none;
  }
}