/* global reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  /* base styling */
  body {
    font-family: Garamond, serif;
    background-color: black;
    font-weight: bold;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
  }
  
  /* background gif that spans entire viewport */
  .background-image {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-image: url('images/background-gif.gif');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
  }
  
  @media (max-width: 768px) {
    .background-image {
      transform: rotate(90deg);
      width: 100vh;
      height: 100vw;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) rotate(90deg);
      position: fixed;
    }
  }
  
  /* background gif that spans entire viewport */
  .background-gif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 30%;
    z-index: -1.5;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    filter: brightness(100%);
  }
  
  @media (min-width: 768px) {
    .background-gif {
      top: 30%;
    }
  }
  
  .container {
    width: 100%;
    min-height: 100vh;
  }
  
  /* main section styling */
  .selected-works-section {
    min-height: 67vh;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2%;
    background-image: url('images/intro-section-bg.jpg');
    background-size: cover;
    background-position: center;
  }
  
  .selected-works-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/selected-works-section.png');
    background-size: 105%;
    background-position: center;
    opacity: 0.5;
    z-index: 0;
  }
  .intro-section {
    width: 100%;
    height: 37vh;
    z-index: 2;
    position: relative;
    overflow: hidden;
  }
  
  /* MEDIA intro-section */ 
  @media (max-width: 768px) {
    .intro-section {
      height: 40vh;
    }
  }
  
  .selected-works-section {
    background-size: cover;
    min-width: 100%;
    background-position: center;
    background-size: 125%;
    position: relative;
  }
  
  .selected-works-section-2L-table {
    width: 40%;
    position: relative;
    padding-left: 2%;
    padding-right: 2%;
    padding-top: 2%;
  }

  
  @media (max-width: 768px) {
    .selected-works-section::before {
      background-image: none;
    }
  
    .selected-works-section-2L-table::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url('images/selected-works-section.png');
      background-size: 110%;
      background-position: center;
      opacity: 0.5;
      z-index: -1;
    }

    body {
      font-size: 0.8rem;
    }
  }
  
  /* right columns */
  .selected-works-section-2R-embed {
    width: 60%;
    padding: 2%;
    position: relative;
    min-height: 400px;
  }
  
  /* common text size for most elements */
@media (min-width: 897px) {
    .intro-section,
    .selected-works-section {
        font-size: 1.15rem;
    }
}
  
  /* buttons and table items text size */
@media (min-width: 897px) {
    .terminal-activate-btn,
    .selected-works-section-2L-table .work-link,
    .selected-works-section-2L-table .selected-works-title,
    .works-category h3 {
        font-size: 1.15rem;
    }
}

@media (max-width: 896px) {
    .terminal-activate-btn,
    .selected-works-section-2L-table .work-link,
    .selected-works-section-2L-table .selected-works-title,
    .works-category h3 {
        font-size: 0.8rem;
    }
}
  
  .intro-section iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
  }
  
  .terminal-activate-btn {
    width: 40%;
    padding: 10px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: white;
    font-family: Garamond, serif;
    font-weight: bold;
    position: relative;
    z-index: 2;
  }
  
  .intro-section-1R-terminal {
    position: relative;
  }
  
  .intro-section-1R-terminal iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    z-index: 2;
  }
  
  .selected-works-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 3px solid #ffffff2e;
    padding-bottom: 2%; /* adds more space between the border-top and the text */
    color: #ffffff; /* Set text color to black */
    text-shadow: -0.6px -0.6px 0 #191919, 0.4px -0.6px 0 #fff, -0.4px 0.5px 0 #fff, 0.4px 0.5px 0 #191919; /* Slightly thinner white outline around text */
    letter-spacing: 0.1em; /* Increase letter spacing */
  }
  
  .works-category {
    margin-bottom: 6%;
  }
  
  .works-category h3 {
    margin-bottom: 10px;
  }
  
  .works-links {
    padding-left: 20px;
  }
  
  .work-link {
    display: block;
    margin-bottom: 3%;
    
    color: white;
    text-decoration: none;
    cursor: pointer;
  }
  
  .work-link:hover {
    text-decoration: underline;
  }
  
  .selected-works-banner {
    margin-top: 30px;
    border-top: 3px solid #ffffff58;
    padding-top: 2%; /* adds more space between the border-top and the text */
  }
  
  .descriptor-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(0, 0, 0, 0.15);
  }

  .descriptor-table td {
    padding: 2%;
    height: 20%;
  }

  .descriptor-title {
    width: 100%;
    text-align: center;
    padding: 10%;
    margin-bottom: 2%;
  }

  .descriptor-date,
  .descriptor-fulllink {
    width: 50%;
    text-align: center;
    padding: 10%;
  }

  .descriptor-location {
    width: 100%;
    text-align: center;
  }
  .fulllink-btn {
    color: rgb(255, 0, 0);
    text-decoration: underline;
    opacity: 0.6;
    transition: opacity 0.3s;
  }
  .fulllink-btn:hover {
    opacity: 1;
  }
  
  /* embed area */
  .selected-works-section-2R-embed {
    position: relative;
  }

  /* cute lil frame */ 
  .selected-works-section-2R-embed::before {
    content: '';
    position: absolute;
    top: -16%;
    left: -13%;
    width: 100%;
    height: 100%;
    background-size: 70%;
    background-image: url('images/selected-works-2R-embed.jpg');
    background-repeat: no-repeat;
    background-position: top left;
    z-index: 1;
    filter: brightness(0.75);
    pointer-events: none; /* Prevents clicking on this element */
    opacity: 60%;
  }

  @media (min-width: 700px) and (max-width: 1440px) {
    .selected-works-section-2R-embed::before {
      top: calc(-13% + (800px - 100vw) * 0.1);
    }
  }
  
  .selected-works-section-2R-embed iframe {
    width: 100%;
    height: 100%;
    padding-top: 3%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    z-index: 2;
  }

  .selected-works-section-2R-embed img {
    width: 98%;
    height: 98%;
    opacity: 80%;
    position: absolute;
    top: 0;
    left: 2%;
    border: none;
    z-index: 2;
  }
  
  /* animation classes for terminal and embed turn-on effects */
  .turn-on-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
  }
  
  
  /* New styles for gif overlay */
  .gif-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    flex: 1;
  }

  
  /* Initially hide the fulllink button */
  .fulllink-btn {
    display: none;
  }
  
/* NEW: Rotate and scale the container on mobile (portrait) to force a landscape view */
@media only screen and (max-width: 768px) and (orientation: portrait) {
    .container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vh;   /* swap width and height */
        height: 100vw;
        transform: rotate(90deg) translateY(-100%);
        transform-origin: top left;
        overflow: hidden;
        font-size: 0.6rem;
    }
}


/* MOBILE-ALERT MOBILE ALERT STYLES */

/* Black-and-white pop-up styling */
.mobile-alert-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 99; /* Above everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* Semi-transparent overlay */
  }
  
  .mobile-alert-content {
    background-color: #fff;
    color: #000;
    width: 80%;
    max-width: 400px;
    margin: 15% auto;
    border: 2px solid #000;
    border-radius: 4px;
    font-family: sans-serif;
    position: relative;
  }
  
  .mobile-alert-header {
    background-color: #ccc;
    padding: 10px;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-alert-title {
    font-weight: bold;
  }
  
  .mobile-alert-close {
    cursor: pointer;
    font-weight: bold;
  }
  
  .mobile-alert-body {
    display: flex;
    padding: 20px;
    align-items: center;
  }
  
  .mobile-alert-icon {
    font-size: 2rem;
    margin-right: 10px;
  }
  
  .mobile-alert-footer {
    text-align: center;
    padding: 10px;
    border-top: 2px solid #000;
  }
  
  #mobileAlertOkBtn {
    padding: 6px 12px;
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    cursor: pointer;
  }
  
