/* :root */
:root{
    --header-main-color: rgba(5, 14, 27, 0.9);

    --background-main-color: rgba(5, 14, 27, 1);
    --background-main-color-dark: rgba(1, 9, 20, 0.9);
    --background-main-gradient: linear-gradient(0deg, #2a475f, #002036);
    --background-secondary-color: rgba(8, 31, 53, 0.9);
    --background-secondary-color-light: rgba(8, 31, 53, 0.9);
    --foreground-main-color: rgba(11, 39, 63, 0.9);
    --foreground-main-color-light: rgba(34, 56, 77, 0.9);

    --footer-main-color: rgb(6, 14, 26);
    --footer-main-color-light: rgb(3, 7, 12);

    --main-text-color: rgb(133, 190, 243);
    --secondary-text-color: rgb(168, 178, 206);

    /* Wiggle Animation */
    --wiggle-degrees: 15deg;
    --scale-start: 1.05;
    --scale-end: 1;
    --wiggles: 5;
 }

/* @keyframes fadeInAnimation */
@keyframes fadeInAnimation {
        from {
          opacity: 0;
        }
        to {
          opacity: 1;
        }
    }

/* @keyframes fadeInGrow */
@keyframes fadeInGrow {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

/* @keyframes logoAnimation */
@keyframes logoAnimation {
        from{
            opacity: 0;
            transform: scale(0.95) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

/* @keyframes logoAnimationWide */
@keyframes logoAnimationWide {
        from{
            opacity: 0;
            transform: scale(0.5) translateY(-1000px);
        }
        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

/* @keyframes slideDown */
@keyframes slideDown {
        0% {
            opacity: 0;
            transform: translateY(-10px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

@keyframes slideDownLarge {
        0% {
            opacity: 0;
            transform: translateY(-20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

@keyframes wiggleAnim {
    0% {
        transform: rotate(0deg) scale(var(--scale-start));
    }

    /* Wiggle steps */
    10% {
        transform: rotate(var(--wiggle-degrees)) scale(calc(var(--scale-start) - 0.01));
    }

    20% {
        transform: rotate(calc(var(--wiggle-degrees) * -1)) scale(calc(var(--scale-start) - 0.02));
    }

    30% {
        transform: rotate(calc(var(--wiggle-degrees) * 0.8)) scale(calc(var(--scale-start) - 0.03));
    }

    40% {
        transform: rotate(calc(var(--wiggle-degrees) * -0.6)) scale(calc(var(--scale-start) - 0.04));
    }

    50% {
        transform: rotate(calc(var(--wiggle-degrees) * 0.4)) scale(calc(var(--scale-start) - 0.05));
    }

    60% {
        transform: rotate(calc(var(--wiggle-degrees) * -0.2)) scale(calc(var(--scale-start) - 0.06));
    }

    70% {
        transform: rotate(calc(var(--wiggle-degrees) * 0.1)) scale(calc(var(--scale-start) - 0.07));
    }

    80% {
        transform: rotate(0deg) scale(calc(var(--scale-start) - 0.08));
    }

    100% {
        transform: rotate(0deg) scale(var(--scale-end));
    }
}

.wiggle {
    width: 100px;
    height: 100px;
    display: inline-block;
}

.wiggle.animate{
    animation: wiggleAnim calc(var(--wiggles) * 0.3s) ease-out forwards;
}

/* body */
body {
        font-family: 'Exo 2', sans-serif;
        background-color: #f4f4f4;
        color: #333;
        background-color: #3d719c;
        margin: 0;
        padding: 0;
        height: 100vh;  /* Ensure body takes full viewport height */
        overflow-y: auto;  /* Enable scrolling for the whole page */
    }

/* body */
body {
        font-family: 'Exo 2', sans-serif;
        margin: 0;
        padding: 0;
    }


/* .big-icon */
.big-icon{
        height: 40px;
        width: auto;
        height: 1;
        
    }

/* .big-logo */
.big-logo {
        width: 90vw; 
        max-width: 900px;
        margin-top: -100px;
        height: auto;
    }

/* .btn[disabled],
.btn:disabled */
.btn[disabled],
    .btn:disabled {
        opacity: 1; /* Reset opacity */
        background-color: initial; /* Keep the original background */
        color: initial; /* Keep the original text color */
        cursor: pointer; /* Allow pointer cursor */
    }

/* .btn-close */
.btn-close {
        filter: invert(1);
    }

/* .btn-primary */
.btn-primary {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0;
    }

/* button */
button{
        /*background-color: var(--background-main-color);*/
    }

/* button:hover */
button:hover{
        cursor: pointer;
    }

    
/* footer */
footer {
        text-align: center;
        padding: 10px;
        background-color: var(--footer-main-color-light);
        color: white;
    }
    

/* h4 */
h4 {
        font-size: 1.5rem; /* Default reasonable size */
        margin-top: 0.5rem;
        color: white;
    }

h2 {
    padding: 10px;
    color: white;
    text-align: center;
}

hr {
  margin: 0;       
  padding: 0;
  border: none;
  height: 5px;
  background-color: var(--foreground-main-color-light);
  
  width: 100%;          
}

.body-header
{
    margin-top: 12.5em;
    margin-bottom: 12.5em;
}

.body-header h2
{
    padding-bottom: 50px;
    font-size: 3rem;
    color: var(--main-text-color);
}

/* .content */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    color: white;
    
    padding-top: 75px;
    font-weight: 500;
    font-size: 2rem;
    white-space: nowrap;
    z-index: 5;
    
}

#connect-section {
    background: var(--footer-main-color);
    color: var(--footer-text-color, #eee);
    padding: 2rem 1rem;
    text-align: center;
}

#connect-section .container {
    max-width: 900px;
    margin: 0 auto;
}

#connect-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--main-text-color);
}

#connect-section .social-icons {
    
    color: rgb(255, 255, 255);
    display: flex;
    justify-content: center;
    gap: 3rem;
}

#connect-section .social-icons a {
    display: inline-block;
    vertical-align: middle;
    text-decoration: none;
    display: inline-flex;
    transition: transform 0.2s ease, filter 0.2s ease;
}

#connect-section .social-icons a:hover,
#connect-section .social-icons a:focus {
    transform: scale(1.2);
    filter: drop-shadow(0 0 4px var(--primary-color, #06f));
    outline: none;
}

.desktop-header{
    align-items:center;
    display:flex;
    position: fixed;
    z-index: 10;
    width: 100%;
    padding: 10px;
    color: white;
    background-color: var(--header-main-color);
    box-shadow: 0 2px 10px rgba(2.5, 2.5, 2.5, 2.5);
    z-index: 20;
}

/* .dropdown */
.dropdown {
        position: relative; /* Make the dropdown's container the positioning context for its menu */
    }

/* .dropdown */
.dropdown {
        padding-left:50px;
        padding-right:50px;
        align-items: center;
    }

/* .dropdown-button */
.dropdown-button {
        background-color: transparent;
        color: rgb(253, 247, 255);
        border: none;
        border-radius: 5px;
        cursor: pointer;

        transition: background-color 0.3s ease;
        
    }

/* .dropdown-button:not(#game-selector) */
.dropdown-button:not(#game-selector){
        font-size: 125%;
        padding: 7px;
    }

/* .dropdown-button.show */
.dropdown-button.show{
        background-color: var(--foreground-main-color);
    }

/* .dropdown-item */
.dropdown-item {
        display: flex; 
        color: white;
        text-decoration: none;
        padding: 10px;
        border-radius: 5px;
        transition: background-color 0.3s ease;
    }

/* .dropdown-item:hover */
.dropdown-item:hover {
        background-color: var(--foreground-main-color-light);
        color: white;
    }

/* .dropdown-item span */
.dropdown-item span {
        /*padding-top: 0.25vh;*/
        filter: drop-shadow(5px 5px 5px #222);
        font-size: 100%;
    }

/* .dropdown-menu */
.dropdown-menu {
        display: block !important;  /* Allow Bootstrap to control visibility */
        position: absolute !important; /* Ensure dropdown is positioned relative to button */
        top: 100% !important; /* Make sure it appears *below* the button */
        left: 0;
        background-color: var(--foreground-main-color);
        border-radius: 10px;
        width: 100%;
        padding: 10px;
        opacity: 0;
        transform: translateY(5px); /* Small downward shift for animation */
        text-align: center;
        align-items: center;
        justify-content: center;
        transition: opacity 0.3s ease, transform 0.3s ease;
        visibility: hidden;
    }

/* .dropdown-menu.show */ 
.dropdown-menu.show {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

/* .dropdown-menu.show */
.dropdown-menu.show {
        opacity: 1;
        transform: translateY(0);
        animation: slideDown 0.3s ease forwards;
    }

/* .dropdown-toggle::after */
.dropdown-toggle::after {
        border-top: 0.4em solid var(--caret-color, #ff0000);
        display: none !important;
    }

/* .fade-overlay */
.fade-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgb(0, 0, 0);
        z-index: 1000; /* High z-index to cover all content */
        opacity: 1;
        transition: opacity 1.5s ease-out;
        pointer-events: none; /* Ensure it doesn't block user interaction */
    }

/* .fade-overlay.hidden */
.fade-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

/* .grow-3s */
.grow-3s {
        opacity: 0;
        animation: fadeInGrow 3s ease forwards;
    }

/* .grow-5s */
.grow-5s {
        opacity: 0;
        animation: fadeInGrow 5s ease forwards;
    }

/* .grow-7s */
.grow-7s {
        opacity: 0;
        animation: fadeInGrow 7s ease forwards;
    }

/* .icon-label */
.icon-label{
        font-size: 1.5vw;
    }

/* .invis */
.invis{
        position: absolute;
        top: 0;
        left: 0;
        
        height: 300%;
        width: 100%;
        z-index:5;
        background: transparent;

        text-align: center;
        align-items:center;
        justify-content: center;
    }

/* .item-grid-container */
.item-grid-container {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 2fr; 
        grid-gap: 0; 
        align-items: center; 
    }

/* .item1 */
.item1 {
        grid-column: 1; 
    }

/* .item2 */
.item2 {
        grid-column: 2; 
    }

/* .logoAnimation */
.logoAnimation{
        opacity: 0;
        animation: logoAnimation 5s ease forwards;
    }

/* .logoAnimationWide */
.logoAnimationWide{
        opacity: 0;
        animation: logoAnimationWide 1.5s ease forwards;
    }

/* .logo-mobile */
.logo-mobile{
        width: 200px;
        height:auto;
    }

/* .offcanvas */
.offcanvas{
        background-color:var(--background-main-color);
    }

/* .offcanvas-body */
.offcanvas-body {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Aligns content to the left */
        padding-left: 20px; /* Adjust as needed */
    }

/* .mobile-dropdown .dropdown-toggle */
.mobile-dropdown .dropdown-toggle {
        background: var(--foreground-main-color);
        border: none;
        color: white;
        width: 250px; /* Makes button wider */
        max-width: 250px; /* Adjust as needed */
        text-align: left; /* Aligns text to the left */ 
        padding: 10px 15px; /* Increases padding for better touch */
    }

/* .mobile-header */
.mobile-header {
        display: none; /* Initially hidden */
        position: fixed;
        top: 0; /* Stick to the top of the screen */
        left: 0;
        min-height: 50px;
        width: 100%; /* Ensure it spans the full width */
        background: var(--background-main-color);
        color: white;
        padding: 15px;
        z-index: 10; /* Ensure it's above other content */
    }

/* .mobile-window */
.mobile-window { 
        display: none; 
    }

/* header .logo */
header .logo {
        max-width: 150px;
        margin-left: 1rem;
        margin: 1rem;
    }

/* header .logo-mobile */
header .logo-mobile {
        display: block; 
        max-width: 200px; 
        margin: 0 auto; 
        padding: 1rem;
    }

/* main */
main {
        display: flex;
        position: relative;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        overflow: hidden;
    }

/* main::before */
main::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--background-main-color-dark); /* Red overlay with transparency */
        pointer-events: none; /* Ensures the overlay doesn't interfere with interactions */
        z-index: -1;
    }

/* #embedded-page */
#embedded-page {
        width: 85.5vw;
        height: 150vh;
        margin-left:7.5vw;
        margin-top:5vh;
        margin-bottom: 5vh;
        border-radius: 10px;
        /* Height should adjust based on header and footer heights */
        /*height: calc(100vh - 140px); 
         /* Adjust this value based on header/footer size */
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

/* #home-screen */
#home-screen {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column; /* Stacks content vertically */
        width: 100%;
        height: calc(100vh - 150px);
        overflow: hidden;
        position: relative;
    }

/* a img.big-icon */
a img.big-icon{
        width: auto;
    }

/* iframe */
iframe {
        height: 100%;
        width: 100%;
        border: none;  /* Remove border */
        overflow: hidden;
    }

/* p */
.body-header p{
        padding-top: 0px;
        padding-bottom: 45px;
        font-size: 2em;
        text-align: left;
        padding-left: 15vw;
        padding-right: 15vw;
        color: var(--secondary-text-color);
        font-weight: 250;
    }

/* Project Section */
#projects{
    background: var(--background-main-gradient);
}

.project-card {
    background-color: #1d1d1d;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 20px 0;
}

.project-card h3 {
    font-family: 'Montserrat', sans-serif; /* Montserrat for project card titles */
    color: #649999; /* Softer teal accent */
    font-size: 2rem;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 1.1rem;
    color: #e0e0e0;
    
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 40px;
    width: 80vw;
    height: 80vh;
    margin: 0 auto;
}
  

.project-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.project-main-bg  {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}


.project-item div p {
    font-size: 36px;
}

.project-item div img{
    width: 75%;
    object-fit: cover !important;
    box-sizing: border-box;
    object-fit: contain;
    transition: transform 2s ease-in-out;
    transform: scale(1);
}


.project-item:hover img {
    transform: scale(1.05); 
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 22, 24, 0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    
}

.project-item:hover .overlay {
    opacity: 1; 
}

.overlay p {
    font-size: 18px;
    font-weight: bold;
}

/* .small-logo */
.small-logo{
        align-content: center;
        width: 300px;
        height:auto;
    }

/* .slide-down-3s */
.slide-down-3s{
        opacity: 0;
        /*animation: slideDown 3s ease forwards;*/
    }

.slide-down{
        opacity: 0;
}

.slide-down.animate{
    animation: slideDownLarge 1s ease forwards;
}

/* .video-background */
.paragraph-background {
        opacity: 0;
        position: relative;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 100%;
        height: 100%;
        margin-top: -500px;
        z-index: -1;
    }

/* .video-background */
.video-background {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: -1;
    }

/* .video-content */
.video-content {
        position: relative;
        color: white;
         
        text-align: center;
        font-size: 2rem;
    }

/* .video-overlay */
.video-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(20, 16, 20, 0.2);
    }

/* @media (max-width: 768px) */
@media (max-width: 768px) {
        .desktop-header {
            display: none; 
        }
        .flex-container {
            flex-direction: column; 
        }
        .flex-item {
            width: 100%; 
        }
        h4 {
            font-size: 4vw; 
        }
        .logo-mobile {
            display: block !important;
        }
        .mobile-header {
            display: flex; 
        }
    }

/* @media (min-width: 769px) */
@media (min-width: 769px) {
        .btn-primary {
            display: none !important;
        }
        .desktop-header {
            display: flex; 
        }
        .logo-mobile {
            display: none !important;
        }
        .mobile-header {
            display: none; 
        }
    }
