@font-face {
  font-family: "PinyonScript-Regular";
  src: url("fonts/PinyonScript-Regular.woff2") format("woff2"),
       url("fonts/PinyonScript-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block; 
}

/* Base Reset & Typography */
html {
  font-size: 10px;
}

body {
  margin: 0;
  background-color: #000;
  color: #fff;
  font-family: "Times New Roman", Georgia, serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Global Link Styling */
a {
  color: inherit;
  text-decoration: underline;
  transition: opacity 150ms ease-in-out;
}

a:hover {
  opacity: 0.6;
}

/* Specific Link Exceptions */
.project-title,
.desktop-logo,
.mobile-logo,
.mobile-logo-link {
  text-decoration: none;
}

 /* Fixed logo at top left, always visible */
  .mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    padding: 20px 24px;
    box-sizing: border-box;
    z-index: 200;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
  }

  .mobile-logo-link {
    pointer-events: auto;
  }

    /* On mobile, the logo does not stay dimmed after a tap */
  .mobile-logo-link:hover,
  .mobile-logo-link:focus,
  .mobile-logo-link:active {
    opacity: 1;
  }

    /* On mobile, project titles do not stay dimmed after a tap */
  .project-title:hover,
  .project-title:focus,
  .project-title:active {
    opacity: 1;
  }

  .mobile-logo {
    display: block;
    height: 80px;
    width: auto;
  }

.mobile-home {
  display: none;
}

/* Main Layout - Two independent scrollable columns */
.site {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.projects {
  width: 66.6666%;
  height: 100vh;
  overflow-y: auto;
  /* Hide the scrollbar while keeping scroll behavior */
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 40px;
  box-sizing: border-box;
}

/* Hide the scrollbar in WebKit/Blink browsers */
.projects::-webkit-scrollbar {
  display: none;
}

.info {
  width: 33.3333%;
  height: 100vh;
  overflow-y: auto;
  padding: 40px 60px 40px 40px;
  box-sizing: border-box;
  font-size: 1.6rem;
}

/* Desktop Logo Group */
.desktop-top-group {
  margin-bottom: 40px;
}

.desktop-logo {
  height: 150px;
  width: auto;
  display: block;
}

/* Z-index Layers */
.project-title,
.project-meta,
.desktop-top-group,
.info-content {
  position: relative;
  z-index: 10;
}

/* Projects Style (Left Column) */
.project {
  margin-bottom: 3.5rem;
}

.project-title {
  display: block;
  font-family: "PinyonScript-Regular", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 4.8rem;
  letter-spacing: 0;
  text-transform: capitalize; 
  margin-bottom: 0.5rem;
  cursor: pointer;
  filter: url('#ink-bleed');
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
}

.project-title:hover {
  opacity: 0.8;
}

.project-meta {
  display: block;
  font-family: sans-serif;
  font-size: 1.4rem;
  color: #fff;
  line-height: 1.4;
  text-transform: lowercase;
}

.project-meta a {
  text-decoration: underline;
  font-style: italic;
}

/* Info Style (Right Column) */
.info h2 {
  font-family: sans-serif;
  font-size: 2.8rem;
  color: #fff;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
  text-transform: uppercase;
}

.contact-header {
  margin-bottom: 3rem;
  font-family: sans-serif;
  font-size: 1.4rem;
  color: #fff;
  line-height: 1.4;
  text-transform: lowercase;
}

.contact-header a {
  text-decoration: underline;
  font-style: italic;
}

.bio p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: justify;
  line-height: 1.5;
  font-family: sans-serif;
  font-size: 1.4rem;
  color: #fff;
  text-transform: lowercase;
}

.bio a {
  text-decoration: underline;
  font-style: italic;
}

.awards {
  line-height: 1.5;
  font-family: sans-serif;
  font-size: 1.4rem;
  color: #fff;
  text-transform: lowercase;
  text-align: right;
}

.awards h2 {
  text-align: right;
}

.awards a {
  text-decoration: underline;
  font-style: italic;
}

/* Hover Image System */
.hover-image {
  visibility: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: fit-content;
}

/* Forced sizes for specific projects */
.project.project-small .hover-image img,
.project.project-small .hover-image video {
  max-width: 45vw !important;
  max-height: 50vh !important;
}

/* Image display is controlled only by the .is-active class */
.project.is-active .hover-image {
  visibility: visible;
}

/* Allow interaction with the media when the project is active or pinned */
.project.is-active .hover-image,
.project.is-pinned .hover-image {
  pointer-events: auto;
}

.project:nth-child(5n + 1) .hover-image img, .project:nth-child(5n + 1) .hover-image video { max-width: 85vw; max-height: 85vh; }
.project:nth-child(5n + 2) .hover-image img, .project:nth-child(5n + 2) .hover-image video { max-width: 70vw; max-height: 75vh; }
.project:nth-child(5n + 3) .hover-image img, .project:nth-child(5n + 3) .hover-image video { max-width: 95vw; max-height: 90vh; }
.project:nth-child(5n + 4) .hover-image img, .project:nth-child(5n + 4) .hover-image video { max-width: 65vw; max-height: 70vh; }
.project:nth-child(5n + 5) .hover-image img, .project:nth-child(5n + 5) .hover-image video { max-width: 80vw; max-height: 95vh; }

/* Mobile sections: hidden on desktop (layout unchanged) */
.m-section {
  display: contents;
}

.m-toggle,
.m-contact-section {
  display: none;
}

/* ========================================================
   Responsive Mobile (≤ 768px): desktop unchanged
   ======================================================== */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  
  /* Fixed logo at top left: mobile only */
  .mobile-header {
    display: flex;
  }

  /* No "selected works" or "contact" buttons */
  .m-toggle {
    display: none;
  }

  /* INFO button: fixed at top right, uses the font of the word ALSO */
  #btn-info {
    display: block;
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 200;
    isolation: isolate;
    width: auto;
    margin: 0;
    padding: 4px 0 4px 16px;
    background: none;
    border: none;
    color: #fff;
    font-family: sans-serif;
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    text-align: right;
    cursor: pointer;
    filter: none;
    text-shadow: none;
    transition: opacity 0.2s;
  }

  #btn-info:active {
    opacity: 0.5;
  }

  /* Full-screen container: projects scroll beneath the Info button */
  .site {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 150px 24px 40px 24px;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .site::before,
  .site::after {
    display: none;
  }

  .m-section,
  .m-contact-section {
    display: flex;
    flex-direction: column;
  }

  /* Project list, shown by default */
  #sec-works > .projects {
    display: block;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 0;
    box-sizing: border-box;
  }

  /* Info and contact hidden by default */
  #sec-info .info {
    display: none;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 0 0 1rem 0;
    box-sizing: border-box;
  }

  #sec-contact {
    display: none;
  }

  /* Info mode open: projects hidden, logo + info + contact shown */
  .site.info-open #sec-works > .projects {
    display: none;
  }

  .site.info-open #sec-info .info {
    display: flex;
    flex-direction: column;
    padding-bottom: 6rem;
  }

  /* Logo visible only in the Info view */
  .desktop-top-group {
    display: none;
    margin-bottom: 3rem;
  }

  .desktop-logo {
    height: 80px;
    width: auto;
  }

  .awards,
  .awards h2 {
    text-align: right;
  }

  .info .bio p {
    text-align: justify;
  }

  /* Info view: contact, then bio, then awards */
  .info-content {
    display: contents;
  }

  .info .contact-header {
    display: block;
    order: 1;
    margin-bottom: 3rem;
  }

  .info .bio {
    order: 2;
  }

  .info .awards {
    order: 3;
  }
 .info .awards h2 {
    margin-top: 2.2rem;
  }
  

  .m-contact {
    display: block;
    margin: 0;
    font-size: 1.4rem;
  }

  /* Projects */
  .project {
    margin-bottom: 4.5rem;
  }

  .project-title {
    font-size: 4.5rem;
    line-height: 0.80;
  }

  .project-meta {
    display: none;
    font-size: 1.4rem;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .project.is-active .project-meta {
    display: block;
  }

  /* Image/video below the text of the open project */
  .project .hover-image {
    display: none;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    justify-content: center;
  }

  .project.is-active .hover-image {
    display: flex;
    position: static;
    transform: none;
    z-index: 1;
    pointer-events: auto;
  }

  .project.is-active .hover-image img,
  .project.is-active .hover-image video {
    position: static;
    width: auto;
    height: auto;
    max-width: 100% !important;
    max-height: 50dvh !important;
    object-fit: contain;
    opacity: 1;
  }

  .project.is-active {
    margin-bottom: 4.5rem;
  }
}
/* Desktop uniquement (souris) : au clic, toutes les images passent au-dessus des textes
   sauf le titre du projet cliqué, qui reste au premier plan */
@media (hover: hover) {
  .project.is-pinned .project-title {
    position: relative;
    z-index: 12;
  }

  .project.is-pinned .hover-image {
    z-index: 11;
    pointer-events: none;
  }

  /* La vidéo sélectionnée reste cliquable (lecture, contrôles) */
  .project.is-pinned .hover-image video {
    pointer-events: auto;
  }

  /* Projet à plusieurs images sélectionné : l'image est cliquable (pause / reprise) */
  .project.is-pinned:has(.js-multi-image) .hover-image img {
    pointer-events: auto;
  }

  /* Informations (meta) du projet sélectionné : au-dessus de l'image, comme le titre */
  .project.is-pinned .project-meta {
    position: relative;
    z-index: 12;
  }
}
