

/* ===== RESET & BASE ===== */

html {
  scroll-padding-top: calc(2em + 12px);                /* Mobile: matches body padding-top */
}

@media (min-width: 600px) {
  html { scroll-padding-top: calc(0.5vw + 1em + 1vw); }  /* Tablet: matches body padding-top */
}
@media (min-width: 993px) {
  html { scroll-padding-top: calc(0.5vw + 2em); }         /* Desktop: matches body padding-top */
}

@font-face {
    font-family: "NectoMono-Regular";
    src: url("fonts/NectoMono-Regular.woff2");
} 

@font-face {
  font-family: 'ClashGrotesk-Variable';
  src: url('fonts/ClashGrotesk-Variable.woff2') format('woff2');
}

@font-face {
  font-family: "AzeretMono-Variable";
  src: url("fonts/AzeretMono-Variable.woff2");
}


@font-face {
  font-family: 'SpaceGrotesk-Variable';
  src: url('fonts/SpaceGrotesk-Variable.woff2') format('woff2'),
}


@font-face {
  font-family: "Sora-Variable";
  src: url("fonts/Sora-Variable.woff2");
}

       * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #8f8f8f;
  /* font-family: "NectoMono-Regular"; */
  /* font-family: 'ClashGrotesk-Variable'; */
  /* font-family: "AzeretMono-Variable"; */
  font-family: 'SpaceGrotesk-Variable';
  /* font-family: "Sora-Variable"; */
}

body {
  background-color: #000;
  overflow-x: hidden;
  padding-top:0 
}

@media (min-width: 600px) {
  body { padding-top: calc(0.5vw + 1em + 1vw); }
}
@media (min-width: 993px) {
  body { padding-top: calc(0.5vw + 2em); }
}

:root {
  --page-padding: 0.75vw;
  --content-gap: 2rem;
  /* 100dvh − nav (= body padding-top) − banner − project-info
     rem = root font-size, unaffected by local font-size:0 on scroll containers */
  --content-height: calc(100svh - 2rem - 6px - 16vw - clamp(12px, 1.2vw, 15px));
}

@media (min-width: 600px) {
  :root { --content-height: calc(100dvh - 1rem - 14.5vw - clamp(12px, 1.2vw, 15px)); }
}
@media (min-width: 993px) {
  :root { --content-height: calc(100dvh - 2rem - 11.5vw - clamp(12px, 1.2vw, 15px)); }
}



.full-spacer {
  height: 100dvh;
}

.half-spacer {
  height: 50dvh;
}

.quarter-spacer {
  height: 25dvh;
}

a, button, .nav-link, .side-menu-link, .desc-toggle, .dropdown-menu a {
  text-decoration: none;
  transition: color 0.2s;
  text-shadow: 0px 0px 2px #000;
  padding: 0;
}


@media (hover: hover) {
  a:hover, button:hover, .nav-link:hover, .side-menu-link:hover, .desc-toggle:hover, .dropdown-menu a:hover {
    color: #fff;
    text-shadow: 0px 0px 2px #000;
  }
}


/* ===== TYPOGRAPHY ===== */

h1 {
  width: 100%;
  text-align: center;
  font-size: clamp(2rem, 6vw, 5em);
  text-shadow: none;
}

h2 {
  text-align: left;
  font-size: clamp(0.875rem, 2vw, 1rem);
  margin: 1rem;
}


.credits {
  text-align: right;
  padding-inline: var(--page-padding);
  font-size: clamp(12px, 1.2vw, 15px);
}

@media(max-width: 599px){
  .credits{
    text-align: center;
  }
}

.project-desc {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.desc-toggle {
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(12px, 1.2vw, 15px);
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  right: 0;
}
.desc-toggle:hover{
  color: #fff;
}

.desc-content {
  display: none;
  position: absolute;
  top: calc(100% + 0.5vw);
  right: 0;
  left: auto;
  width: 300px;
  z-index: 10;
}

.desc-content.open {
  display: block;
  text-align: right;
}

.desc-content p {
  font-size: clamp(12px, 1.2vw, 15px);
  line-height: 1.6;
  text-align: right;
  text-shadow: 0px 0px 2px #000;
}


/* ===== NAV ===== */

.nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.5vw var(--page-padding);
  position: fixed;
  text-align: right;
  align-items: center;
  top: 0;
  right: 0;
  width: 100%;
  z-index: 10000;
}

.nav > *:first-child {
  left: 0
}

@media (max-width: 599px) {

  /* Nav: 3 columns — About, E-Mail, Other Links */
  .nav {
    grid-template-columns: repeat(3, 1fr);
    padding: 6px 2vw;
  }

  .nav > *:first-child,
  .nav > *:nth-child(2) {
    display: none;
  }

  .nav .nav-link {
    text-align: left;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav > *:last-child,
  .nav > *:last-child .nav-link {
    right:0;
    text-align: right;
    overflow: visible;
  }

    .nav > *:nth-child(4) {
    text-align: center;
  }

  /* Dropdown opens right on mobile (aligns with right-aligned button) */
  .dropdown-menu {
    right: 0;
    left: auto;

  }

  /* Mobile banner: extra top margin to clear the taller banner */
  #project-main .robin-banner {
    margin-top: 8vw;
  }
}


.nav-link {
  font-size: clamp(12px, 1.2vw, 15px);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.2s;
  text-align: right;
}

.nav > *:first-child {
  text-align: left;
}

.nav-link--right {
  text-align: right;
}

@media (hover: hover) {
  .nav-link:hover { color: #fff; }
}

/* ===== DROPDOWN ===== */

.dropdown {
  position: relative;
}

/* Make the dropdown button fill its parent fully */
.dropdown .nav-btn {
  width: 100%;
  height: 100%;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  z-index: 1000;

}

.dropdown-menu.open {
  display: block;

}

.dropdown-menu a {
  display: block;
  text-align: right;
  text-decoration: none;
  font-size: clamp(12px, 1.2vw, 15px);
  padding: 0.1vw 0;
  transition: color 0.2s;
  text-shadow: 0px 0px 2px #000;
}

@media (hover: hover) {
  .dropdown-menu a:hover {
    color: #fff;
  
  }
}


/* ===== BANNER ===== */

.robin-banner {
  position: relative;
  width: 100%;
  height: 36vw;              /* Mobile: two-line text */
  background: #000;
  overflow: visible;
  line-height: 0;
  font-size: 0;
}

@media (min-width: 600px) {
  .robin-banner { 
    height: 12vw; /* Tablet: single line, unchanged */
  }   
  
}
@media (min-width: 993px) {
  .robin-banner { height: 10vw; }   /* Desktop: single line, unchanged */
}

.robin-banner canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}


/* ===== POPUP / OVERLAY ===== */

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 101;
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  padding: 0;
  z-index: 102;
  width: 92vw;
  height: 80vh;
  overflow: hidden;
}


@media (min-width: 600px) {
  .popup { width: 80vw; height: 70vh; }
}
@media (min-width: 993px) {
  .popup { width: 70vw; height: 65vh; }
}

.overlay.active,
.popup.active {
  display: block;
}

.close-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  font-family: inherit;
  transition: color 0.2s;
  text-shadow: 0px 0px 2px #000;
}

@media (hover: hover) {
  .close-btn:hover { color: #fff; }
}

/* Mobile: stack image on top, text below, scrollable */
.popup .grid_1fr1fr {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.popup-img {
  flex: 0 0 40%;
  min-height: 0;
  overflow: hidden;
}

.popup-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

@media (min-width: 600px) {
  .popup-img img {
    object-position: center center;
  }
}

.popup-txt {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Desktop: side by side */
@media (min-width: 600px) {
  .popup .grid_1fr1fr {
    flex-direction: row;
    height: 100%;
  }

  .popup-img {
    flex: 0 0 50%;
  }

  .popup-txt {
    display: flex;
    align-items: center;
  }

  .close-btn {
    background: #000;
  }
}

.popup-txt p {
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.popup-txt p:last-child {
  margin-bottom: 0;
}

.popup-address {
  margin-top: 0.5rem;
}


/* ===== PROJECT SECTIONS ===== */

.project {
  margin-bottom: 0;
}

.section-spacer {
  height: 6vh;
}

@media (min-width: 600px) {
  .section-spacer { height: 10vh; }
}

.project-info {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.5vw var(--page-padding);
  align-items: start;
  position: relative;
}


.project-info-item {
  font-size: clamp(12px, 1.2vw, 15px);
  line-height: 1;
  text-align: right;
}

@media (max-width: 599px){
 /* Project info: 3 columns — Year, Category, Client */
  .project-info {
    grid-template-columns: repeat(3, 1fr);
    padding: 0.5vw 2vw;
  }

  .project-info > *:first-child {
    display: none;
  }

  .project-info > *:nth-child(2) {
    text-align: left;
  }

   .project-info > *:nth-child(3) {
    text-align: center;
  }

    .project-info > *:nth-child(4) {
    text-align: right;
  }


  /* Description on its own full-width row */
  .project-info .project-desc {
    margin-top: 1rem;
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

 .project-info .project-desc {
  text-align: left;
}

  /* Client = 2nd from last (last is description) */
  .project-info > *:last-child {
    right: 0;
    text-align: right;
  }

  /* Description panel opens left on mobile */
  .desc-content {
    right: 0;
  
  }

}

/* ===== GRIDS ===== */

.grid_1fr2fr {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 600px) {
  .grid_1fr2fr { grid-template-columns: 1fr 2fr; }
}

.grid_1fr1fr {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 600px) {
  .grid_1fr1fr { grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.5vw, 60px); }
}

.grid_1fr1fr > video,
.grid_1fr1fr > img {
  width: 100%;
  height: auto;
  max-height: var(--content-height);
  object-fit: contain;
  display: block;
  margin: 0;
}

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


/* ===== VIDEO ===== */

video {
  height: var(--content-height);
  width: auto;
  max-width: 100%;
  display: block;
  margin-inline: auto;
  margin-bottom: var(--content-gap);
}

/* Mobile: fit width, no unintended side-cropping */
@media (max-width: 599px) {
  video {
    width: 100%;
    height: auto;
    max-height: var(--content-height);
  }

  /* Crop class: fills screen height, crops sides intentionally for a taller look */
  video.video-crop {
    width: 100%;
    height: 60svh;
    max-height: 60svh;
    object-fit: cover;
  }

  /* Landscape content (wider than tall) gets extra breathing room on mobile */
  iframe[src*="vimeo"],
  iframe[src*="youtube"],
  .yt-facade,
  .scroll-container {
    --content-gap: 2.5rem;
  }
}

.video {
  height: var(--content-height);
  width: auto;
  max-width: 100%;
  display: block;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border: none;
  margin-bottom: var(--content-gap);
}

iframe[src*="vimeo"],
iframe[src*="youtube"] {
  height: var(--content-height);
  width: auto;
  max-width: 100%;
  display: block;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border: none;
  margin-bottom: var(--content-gap);
}

@media (max-width: 599px) {
  iframe[src*="vimeo"],
  iframe[src*="youtube"] {
    width: 100%;
    height: auto;
    margin-top: var(--content-gap);
    margin-bottom: var(--content-gap);
  }
}

/* ===== YOUTUBE FACADE ===== */

.yt-facade {
  position: relative;
  height: var(--content-height);
  width: auto;
  max-width: 100%;
  display: block;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--content-gap);
  cursor: pointer;
  overflow: hidden;
  background: #000;
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

@media (hover: hover) {
  .yt-facade:hover img {
    opacity: 0.6;
  }

  .yt-facade:hover .yt-play-btn {
    color: #fff;
  }
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #8f8f8f;
  transition: color 0.2s;
  pointer-events: none;
}

.yt-play-btn svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 0 6px #000);
}

@media (max-width: 599px) {
  .yt-facade {
    width: 100%;
    height: auto;
    margin-top: var(--content-gap);
    margin-bottom: var(--content-gap);
  }
}

.video-preview {
  position: relative;
  overflow: hidden;
  width: fit-content;
  margin: 0 auto var(--content-gap);
  max-width: 100%;
}

.video-preview img {
  width: auto;
  max-height: var(--content-height);
  display: block;
  max-width: 100%;
}

.video-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-preview:hover video {
  opacity: 1;
  cursor: none;
}



/* ===== SCROLL CONTAINER ===== */

.drag {

}

.scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  font-size: 0;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior-x: contain;
  margin-bottom: var(--content-gap);
}

.scroll-container:active {
  cursor: grabbing;
}

.scroll-container img,
.scroll-container video {
  padding: 0;
  max-height: var(--content-height);
  width: auto;
  height: auto;
  display: inline-block;
  vertical-align: top;
  -webkit-user-drag: none;
  pointer-events: none;
}

@media (max-width: 599px) {
  .scroll-container img,
  .scroll-container video {
    height: 60svh;
    max-height: 60svh;
    width: auto;
    max-width: none;
  }
}

@media (min-width: 600px) {
  .scroll-container img,
  .scroll-container video { height: var(--content-height); }
}


/* ===== SIDE MENU ===== */

.side-menu {
  display: none;
  left: var(--page-padding);

}

.side-menu-link.active {
  color: #fff;
  text-shadow: 0px 0px 2px #000;
}

@media (min-width: 993px) {
  .side-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: var(--page-padding);
    top: calc(0.5vw + 2em + 10vw + 0.5vw);
    z-index: 9;
    gap: 0.5rem;
    /* Collapsed: clip horizontally to show only the line indicators (~10px).
       Large negative top/bottom so JS translateY is never clipped. */
    clip-path: inset(-2000px calc(100% - 10px) -2000px 0);
    transition: clip-path 0.35s ease 0.3s, transform 0.3s ease;
  }

  .side-menu:hover,
  .side-menu.hovered,
  .side-menu.at-home {
    clip-path: inset(-2000px -20px -2000px 0);
    transition: clip-path 0.35s ease, transform 0.3s ease;
  }

  .side-menu-link {
    font-size: clamp(12px, 1.2vw, 15px);
    letter-spacing: 0.05em;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Line indicator — always the leftmost element, visible when collapsed */
  .side-menu-link::before {
    content: '';
    display: block;
    width: 8px;
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 2px #000;
  }
}
