/* ==========================================================================
   Post texts
   ========================================================================== */

@media (min-width: 1000px) {
  .post-content iframe,
  .post-content .code-container,
  .post-content .code-container,
  .post-content .plyr,
  .post-content .optimized-image-tag {
    width: calc(90vw - 2 * var(--sp-lg));
    max-width: 70rem;
    margin-left: 50%;
    transform: translateX(-50%);
    margin-bottom: 1.5rem;
  }

  .post-content iframe {
    max-width: 140rem; /* Zoom property affects this */
  }
}

   /* ==========================================================================
   WELCOME PAGE (Homepage)
   ========================================================================== */

.container.welcome {
  max-width: 1920px;
}

.welcome .random-photos .random-photo {
  display: none;
}

.welcome .intro {
  position: relative;
  max-width: 30rem;
}

.welcome .hide-this-box {
  display: none;
}

@media (min-width: 1000px) {
  .welcome {
    position: relative;
    gap: 4rem;
  }

  .welcome .random-photos {
    display: grid;
    grid-template-areas:
      "intro photo2 photo4"
      "photo1 photo3 photo4";
    grid-template-columns: 1fr 0.8fr 1fr;
    grid-template-rows: 1fr 0.8fr;
    gap: var(--sp-sm);
    width: 100%;
    height: calc(100vh - 11rem);
    min-height: 30rem;
    border-radius: var(--radius);
    padding-bottom: 2rem;
    margin-bottom: -10rem;
  }

  .welcome .random-photos .random-photo {
    display: block;
    cursor: pointer;
  }

  .welcome .random-photos [class^="cell"] {
    min-height: 0;
    min-width: 0;
  }

  .welcome .random-photos .cell1 { grid-area: photo1; }
  .welcome .random-photos .cell2 { grid-area: photo2; }
  .welcome .random-photos .cell3 { grid-area: photo3; }
  .welcome .random-photos .cell4 { grid-area: photo4; }
  .welcome .random-photos .cell5 { display: none; }
  .welcome .random-photos .cell6 { display: none; }
  .welcome .random-photos .cell7 { display: none; }
  .welcome .random-photos .text { grid-area: intro; }

  .welcome .random-photo {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 1;
    border-radius: var(--radius);
    overflow: hidden;
    transition: opacity 1s ease-out;
  }

  .welcome .random-photo > div {
    height: 100%;
  }

  .welcome .random-photo .fade-in {
    transition: opacity 1s var(--ease);
  }

  .welcome .random-photo picture,
  .welcome .random-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
  }

  .welcome .random-photo .legend {
    color: white;
  }

  .welcome .intro {
    display: flex;
    align-items: center;
    margin-top: initial;
    padding: 1rem;
    padding-left: 0;
    background-color: var(--bg);
  }

  .welcome .intro h1 {
    margin-top: 0;
  }

  .welcome .intro p:last-child {
    margin-bottom: 0;
  }

  .welcome .intro-body {
    transform: translateX(1rem);
    width: calc(100% - 1rem);
  }

  .welcome .hide-this-box {
    position: absolute;
    top: 2.8rem;
    right: 3rem;
    display: block;
    border: 0;
  }
}

@media (min-height: 750px) {
  .welcome .random-photos {
      grid-template-areas:
        "intro photo2 photo4"
        "photo1 photo3 photo4"
        "photo1 photo3 photo5";
    }
    
    .welcome .random-photos .cell5 { display: block; grid-area: photo5; }
}


@media (min-height: 1050px) {
  .welcome .random-photos {
      grid-template-areas:
        "intro photo2 photo4"
        "photo1 photo2 photo4"
        "photo1 photo3 photo4"
        "photo6 photo3 photo5"
        "photo6 photo3 photo5"
        "photo6 photo3 photo5";
    }
    
    .welcome .random-photos .cell6 { display: block; grid-area: photo6; }
}
@media (min-height: 1150px) {
  .welcome .random-photos {
      grid-template-areas:
        "intro photo2 photo4"
        "photo1 photo2 photo4"
        "photo6 photo3 photo5";
    }
    
    .welcome .random-photos .cell6 { display: block; grid-area: photo6; }
}



/* ==========================================================================
   BIO PAGE
   ========================================================================== */

.bio-header h1 {
  margin-top: 0;
  color: white;
}

.bio-intro {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.intro-text p {
  font-size: var(--fs-md);
  line-height: 1.6;
}

.bio-section {
  margin-bottom: var(--sp-2xl);
}

/* ==========================================================================
   PROJECT DETAIL PAGE
   ========================================================================== */

.project-detail {
  margin-bottom: 4rem;
}

@media (min-width: 600px) {
  .project-detail {
    margin-bottom: 5rem;
  }
}

.project-header {
  margin-bottom: var(--sp-2xl);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-lg);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  margin-top: var(--sp-sm);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: var(--fs-sm);
}

.project-meta-item strong {
  color: var(--accent);
}

.project-hero-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--sp-xl);
  height: auto;
}

.project-intro {
  margin-bottom: var(--sp-2xl);
  font-size: var(--fs-md);
}

.project-screens {
  margin: var(--sp-2xl) 0;
}

.project-nav {
  display: flex;
  justify-content: space-between;
}

.see-more-container {
  margin-top: var(--sp-xl);
}

.see-more-container summary {
  cursor: pointer;
  font-weight: bold;
  margin-bottom: var(--sp-md);
  color: var(--text);
}

.see-more-container summary:hover {
  text-decoration: underline;
}

.backstory-section {
  margin: 0 auto;
  margin-top: var(--sp-3xl);
}
