/* ==============================================================
   Responsive / Mobile Styles
   ============================================================== */

:root {
  --col-min: 336px;
  --gap: 8px;
}

/* -------------------- Grid -------------------- */
.grid-project-wrapper {
  grid-template-columns: repeat(auto-fill, minmax(var(--col-min), 1fr));
  gap: var(--gap);
}

/* Special items span 2x2 as before */
.grid-item.special {
  grid-column: span 2;
  grid-row: span 2;
}

/* -------------------- Hero Video Swap -------------------- */
/* Base: horizontal video */
.hero-video-horizontal {
  display: block;
}

.hero-video-vertical {
  display: none;
}


/* -------------------- Mobile Specific -------------------- */
@media (max-width: 767px) {

  :root {
    --col-min: 150px; /* grid adapts for small screens */
  }

  /* Hero video vertical swap */
  .hero-video-horizontal {
    display: none;
  }

  .hero-video-vertical {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16; /* vertical video */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.1s linear, opacity 0.2s linear;
  }

  .hero-video video {
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  /* Grid: 2 items per row */
  .grid-project-wrapper {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: calc(var(--col-min) * 1 / 1); /* new line for 3:2 ratio */
    gap: 6px;
  }

  /* Menu moves to bottom */
  .header {
    flex-direction: column;
    /*height: 100svh;*/
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    position: fixed;
    z-index: 999;
    top: 0.5rem;
  }

  .header-left {
    width: 100%;
  }

  .header-middle {
    text-align: justify;
    text-align-last: justify;
    width: 100%;
    line-height: 1;
    font-size: clamp(20px, 10vw, 36px);
  }

  .header-right {
    position: fixed;
    width: 100%;
    bottom: 0;
    justify-content: space-between;
    left: 0;
    padding: 0.5rem;
    margin-bottom: 0;
    font-size: clamp(18px, 8vw, 30px);
    z-index: 999;
  }

  /* Typography scales naturally using clamp() */
  .header-left-col1,
  .header-left-col2-title,
  .header-left-col2-subtitle {
    font-size: clamp(14px, 5vw, 28px);
  }

  .menu-item a:hover {
    color: #ff0000;
    text-decoration: unset;
    background: unset;
  }

  .hero-content {
    font-size: clamp(10px, 3vw, 14px);
    padding: 0 0.5rem 0.5rem 0.5rem;
  }

  .headline {
    flex-direction: column;
    justify-content: left;
    align-items: start;
    gap: 2rem;
    margin-top: 66svh;
  }

  .headline-title {
    font-size: clamp(16px, 4vw, 22px);
    max-width: 100%;

  }

  .headline-subtitle {
    font-size: clamp(10px, 3vw, 14px);
  }

  .hero-content-bottom {
    display: none;
  }

  .wrapper-grid {
    margin: 0;
    padding: 0.5rem;
  }

  .bio-content-wrapper {
    margin-left: 0;
    margin-right: 0;
    z-index: 999;
  }

  .bio-background {
    z-index: 94;
  }

  .bio-headline {
    font-size: clamp(24px, 6vw, 32px);
    max-width: 100%;
    text-align: justify;
    z-index: 9999;
  }

  .bio-description {
    font-size: clamp(16px, 4vw, 20px);
    max-width: 100%;
    margin-top: 2vh;
    z-index: 9999;
  }

  .bio-background img {
    width: 100%;
    height: auto;
  }

  .overlay-content-wrapper {
    max-width: 100%;
    width: 100%;
  }

  .close-btn {
    position: fixed;
    top: unset;
    bottom: 2rem;
    right: unset;
    font-size: 1.4rem;
  }

  .main-media {
    margin-top: 0;
    height: auto;
  }

  .main-media video,
  .main-media img {
    width: 100%;
    height: auto;
  }

  #overlayIframe {
    height: 24svh !important;
  }

  .overlay-arrow.right {
    right: -32px;
  }

  .overlay-arrow.left {
    left: -32px;
  }

  .overlay-arrow svg {
    width: 14px;
    height: auto;
  }

  .overlay-client-title {
    font-size: clamp(32px, 8vw, 64px);
    padding-bottom: 1rem;
  }

  .project-content-headline {
    font-size: clamp(24px, 5vw, 36px);
    max-width: 80%;
  }

  .project-content-description-wrapper {
    flex-direction: column;
    margin-top: 2rem;
  }

  .project-description-left {
    font-size: clamp(18px, 4vw, 24px);
    max-width: 100%;
  }

  .project-description-right {
    max-width: 100%;
    width: 100%;
    margin-top: 2rem;
  }

  .project-details {
    font-size: clamp(12px, 3vw, 16px);
  }

  .project-related {
    margin-top: 2rem;
    margin-bottom: 6rem;
  }

  .overlay-thumbs img {
    width: 180px;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 4px;
  }

  .footer {
    font-size: clamp(18px, 4vw, 28px);
    flex-direction: unset;
    gap: unset;
    height: 100svh;
    margin-top: 24svh;
    padding: 0.5rem;
    width: 100%;
    padding-bottom: 6rem;

  }

  .footer-socials {
    text-align: left;
  }

  .wrapper-bio {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
}

/* ==============================================================
   Responsive / Tablet Styles
   ============================================================== */

/* -------------------- Mobile Specific -------------------- */
@media screen and (min-width: 768px) and (max-width: 1024px) {

  /* Hero video vertical swap */
  .hero-video-horizontal {
    display: none;
  }

  .menu-item a:hover {
    color: #ff0000;
    text-decoration: none;
    background: none;
  }

  .hero-video-vertical {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16; /* vertical video */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.1s linear, opacity 0.2s linear;
  }

  .hero-video video {
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .header-middle {
    font-size: clamp(20px, 10vw, 36px);
  }

  .header-right {
    font-size: clamp(18px, 8vw, 30px);
  }

  /* Typography scales naturally using clamp() */
  .header-left-col1,
  .header-left-col2-subtitle {
    font-size: clamp(14px, 5vw, 28px);
  }

  .header-left-col2-title {
    font-size: clamp(20px, 10vw, 36px);
  }

  /* Grid: 2 items per row */
  .grid-project-wrapper {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: calc(var(--col-min) * 1 / 1); /* new line for 3:2 ratio */
    gap: 8px;
  }

  .headline-title {
    font-weight: 600;
    max-width: 360px;
  }

  .bio-content-wrapper {
    margin-left: 0;
    margin-right: 0;
    z-index: 999;
  }

  .bio-background {
    z-index: 94;
  }

  .bio-headline {
    font-size: clamp(28px, 6vw, 34px);
    max-width: 100%;
    text-align: justify;
    font-weight: 600;
    z-index: 9999;
  }

  .bio-description {
    font-size: clamp(20px, 4vw, 24px);
    max-width: 70%;
    margin-top: 2vh;
    z-index: 9999;
  }

  .bio-background img {
    width: 100%;
    height: auto;
  }

  .overlay-content-wrapper {
    max-width: 100%;
    width: 100%;
  }

  .close-btn {
    position: fixed;
    top: unset;
    bottom: 2rem;
    right: unset;
    font-size: 2rem;
  }

  .main-media {
    margin-top: 0;
    height: auto;
  }

  .main-media video,
  .main-media img {
    width: 100%;
    height: auto;
  }

  #overlayIframe {
    height: 24svh !important;
  }

  .overlay-arrow.right {
    right: -32px;
  }

  .overlay-arrow.left {
    left: -32px;
  }

  .overlay-arrow svg {
    width: 14px;
    height: auto;
  }

  .overlay-client-title {
    font-size: clamp(32px, 8vw, 64px);
    padding-bottom: 1rem;
  }

  .project-content-headline {
    font-size: clamp(24px, 5vw, 36px);
    max-width: 50%;
  }

  .project-content-description-wrapper {
    flex-direction: column;
    margin-top: 2rem;
  }

  .project-description-left {
    font-size: clamp(18px, 4vw, 24px);
    max-width: 100%;
  }

  .project-description-right {
    max-width: 100%;
    width: 100%;
    margin-top: 2rem;
  }

  .project-details {
    font-size: clamp(12px, 3vw, 16px);
  }

  .project-related {
    margin-top: 2rem;
    margin-bottom: 6rem;
  }

  .overlay-thumbs img {
    width: 280px;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 0;
  }

  .wrapper-bio {
    margin-bottom: 4rem;
  }
}








