/* Base Styles */
@font-face {
    font-family: 'InterTight';
    src:    url(Inter_Tight/InterTight-VariableFont_wght.ttf),
            url(Inter_Tight/InterTight-Italic-VariableFont_wght.ttf);
}

* , *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "InterTight";
}

body {
    font-weight: 200;
    margin: 0;
    color: #000000;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    h3 {
        font-size: larger;
        font-weight: 200;
    }
    h1 {
        font-size: x-large;
        font-weight: 200;
    }
    min-height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden; /* Prevent horizontal scrolling */

}
main {
    margin-left: 18vw;
    margin-right: 18vw;
}

.is-transitioned {
    animation: fade-in 1s forwards;
    background-color: #6e0c0c, 0.25;
    opacity: 0;
    transform: translateY(30vh);
}

.smooth-transition {
    transition: 1s;
}

@keyframes fade-in {
    from {
        background-color:  #6e0c0c, 0.25;
        opacity: 0;
        transform: translateY(30vh);
    }
    to {
        background-color:#6e0c0c 0;
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    background-color: #ffffff;
    padding: 1rem 2rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
} 

/* Home link aligned to the left */
.home-link {
    font-weight: 100;
    font-stretch: condensed;
    font-size: 2.2rem;
    color: #000000;
    text-decoration: none;
    align-items: left;
} 

a {
    color: rgb(0, 0, 0);
    text-decoration: none; /* no underline */
}

a:hover{
    color:#6e0c0c;
    text-decoration:underline;
}
.home-link:hover{
    color:#6e0c0c;
    text-decoration: none; /* no underline */
}

/* Navigation links */
.nav-links {
    color: #000000;
    font-weight: 200;
    display: flex;
    gap: 1.5rem;
}


/*PROJECTS PAGE*/
.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fill, fit-content(500px, 1fr));
    gap: 20px;
    width:50vw;
    margin: 0 auto;
}

.item {
    position: relative;
    overflow: hidden;
    /* box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); */
    transition: transform 0.3s ease;
    padding-bottom: 5%;
}

.item:hover {
    transform: scale(1.005);
}

.image-wrapper {
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff; /* Keep text color clear white */
    text-align: center;
    font-size: 2.5rem;
    font-weight: 200;
    padding: 10px;
    visibility: hidden; /* Initially hidden */
    /*transform: translateY(10px); /* Start slightly out of place */
    transition: transform 0.3s ease;
}

.image-wrapper:hover .overlay {
    visibility: visible; /* Make it visible on hover */
    /*transform: translateY(0); /* Move to its normal position */
}

a {
    text-decoration: none;
    color: inherit;
}

div.sticky {
    position: fixed; /* Ensures it stays fixed to the viewport */
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensures it appears above other elements */
}

#scrollToTop {
    
    padding: 10px 17.5px;
    background: #ffffff;
    color:rgba(0, 0, 0, 0.2);
    font-weight: 200;
    font-size: larger;
    border:1px, solid, rgba(0, 0, 0, 0.2);
    border-radius: 60px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#scrollToTop:hover {
    opacity: 1;
    color:#6e0c0c;
    border:1px, solid, #6e0c0c;
}

#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
}

div.stickybackbtn {
    position: fixed; /* Ensures it stays fixed to the viewport */
    top: 12vh;
    left: 6vw;
    z-index: 5; /* Ensures it appears above other elements */
}


#goBack {
    padding: 10px 17.5px;
    background: #ffffff;
    color:rgba(0, 0, 0, 0.2);
    font-weight: 200;
    font-size: larger;
    border:1px, solid, rgba(0, 0, 0, 0.2);
    border-radius: 60px;
    cursor: pointer;
    opacity: 1;
}

#goBack:hover{
    padding: 10px 17.5px;
    background: #ffffff;
    font-weight: 200;
    font-size: larger;
    border-radius: 60px;
    cursor: pointer;
    opacity: 1;
    color:#6e0c0c;
    border:1px, solid, #6e0c0c;
}

#goBack.visible {
    opacity: 1;
    visibility: visible;
}

/* Hamburger icon hidden on larger screens */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    
}

* {box-sizing:border-box}

/* Default Desktop Layout */
@media (min-width: 1268px) {
.chessboard .row {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.row.text-first {
  grid-template-areas: "text image";
}
.row.text-first .text { order: 1; }
.row.text-first img { order: 2; }
.row.text-first video {order: 2; }
.row.image-first {
  grid-template-areas: "image text";
}
.row.image-first .text { order: 2; }
.row.image-first img { order: 1; }

}

/* Mobile-Friendly Stacked Layout */
@media (max-width: 1267px) {
.chessboard .row img {
  margin-bottom: 1rem;
}
.chessboard .row {
  grid-template-columns: 1fr;
}

main{
    margin-left: 0vw;
    margin-right: 0vw;
}

.portfolio {
    width:75vw;
}


}


/* Responsive styles for smaller screens */
@media (max-width: 768px) {
    /* Hide the navigation links by default and show the hamburger icon */
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        right: 20px;
        background: rgba(255, 255, 255, .85);
        border: 1px solid #6e0c0c;
        padding: 1rem;
        z-index: 3;
    }

    /* Display the hamburger icon */
    .menu-toggle {
        display: inline;
    }

    /* Show navigation links when active */
    .nav-links.open {
        display: flex;
    } 

    main{
        margin-left: 0vw;
        margin-right: 0vw;
    }

    .portfolio {
        width:90vw;
    }

}



/* Floating button styles */
.music-control {
    position: fixed; /* Ensures it stays in the same place when scrolling */
    top: 7.5rem;
    right: 20px;
    align-content: center;
    .music-control-bttn{
    background: rgba(255, 255, 255, 0.05);
    color: rgba(0, 0, 0, 0.2);
    border: 1px, solid, rgba(0, 0, 0, 0.2);;
    font-size: xx-large;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* font-size: 24px; */
    }
    z-index: 1000; /* Ensures it stays above other elements */

    .m-button-txt{
        font-size: x-small;
        position: relative;
        color: rgba(0, 0, 0, 0.5);
        top:-0.3rem;
        left:-0.275rem;
    }
}


@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.content {
    position: relative;
    z-index: 1; /* Keep text above the background */
    /*max-width: 800px;*/
    font-size: x-large;
    color:#ffffff;
    font-weight: 300;
    margin: 0 auto;
    align-items: center;
    padding: 50px 20px;
    /*background: rgba(255, 255, 255, 0.8); /* Slightly transparent background for better readability */
    /*border-radius: 10px;*/
}


/* Footer */
footer {
    font-weight: 200;
    font-size: small;
    background-color: #ffffff;
    padding: 1rem;
    border-top: 1px solid #ffffff;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    
}

#target-section {
    height: 0.5vh;
}

.featured-media iframe,
.featured-media embed,
.featured-media video,
.featured-media img {
    align-items: left;
    width: 100vw;
    height: 100%;
    display: block;
    border: none; /* Removes any default iframe border */
    object-fit: cover; /* Ensures proper scaling */
}

  .text-block {
    margin-top: 3rem;
    grid-column: 1 / -1;
  }

  .text-block h2{
    font-weight:100;
    margin-top: 3rem;
  }
  .text-block p {
    font-size: 1em;
    margin-bottom: 1rem;
    font-weight: 200;
    /* text-align: justify; */
  }

  .chessboard {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
  }
  
  .chessboard img {
    max-width: 100%;
    clip-path: inset(0 0 0 0 round 2px);
  }

  .chessboard video{
    width: 100%;
    clip-path: inset(0 0 0 0 round 2px);
  }

  .WB-design-container{
    position: relative;
    overflow: hidden; 
    width: 100%;
    height: 80vh;
  }

  .design-process-pictures img{
    height:60vh;
  }

  .iframe-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
  }
  
  /* Then style the iframe to fit in the container div with full height and width */
  .responsive-iframe{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
  }
  
  .supporting-media {
    margin: auto;
    width: 80%;
  }

  /* .supporting-media img {
    width: 50vw;
    display: block;
    border: 1px solid #ddd;
  }

  .supporting-media video {
    height: 100vh;
  } */

  /* Chessboard Styles */
  .chessboard .row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    }

    /* Default Desktop Layout */
@media (min-width: 1268px) {
    .chessboard .row {
      grid-template-columns: 1fr 1fr;
      align-items: center;
    }
    .row.text-first {
      grid-template-areas: "text image";
    }
    .row.text-first .text { order: 1; }
    .row.text-first img { order: 2; }
    .row.text-first video {order: 2; }
    .row.image-first {
      grid-template-areas: "image text";
    }
    .row.image-first .text { order: 2; }
    .row.image-first img { order: 1; }
    
    }
    
    /* Mobile-Friendly Stacked Layout */
    @media (max-width: 1267px) {
    .chessboard .row img {
      margin-bottom: 1rem;
    }
    .chessboard .row {
      grid-template-columns: 1fr;
    }
    
    }
    
    