html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #222334;
    background-image: url(Media/az-subtle.png);
    color: #f3f3f3;
    overflow-x: hidden;
    overscroll-behavior: none;
    scroll-behavior: smooth;
}

header {
    background: #1a1a2e;
    color: #f3f3f3;
    padding: 10px 0;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    height: 50px;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #f3f3f3;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

header a {
    text-decoration: none;
}

.navbar-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #f3f3f3;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: #f3f3f3;
    transition: width 0.3s ease, right 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
    right: 0;
}

a {
    color: #f3f3f3;
}

#contact {
    background: #2c2e43;
    padding: 1px 0px 20px 0px;
    text-align: center;
}

.social-media a {
    color: #f3f3f3;
    text-decoration: none;
    margin: 0 10px;
    font-size: 20px;
}

.social-media i {
    transition: transform 0.2s ease;
}

.social-media i:hover {
    transform: scale(1.2);
}

footer {
    background: #1a1a2e; 
    color: #f3f3f3;
    text-align: center;
    padding: 1px 0;
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        height: fit-content;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        background-color: #1a1a2e;
        
        /* Initially collapsed */
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease; /* Smooth expand/collapse animation */
    }

    .nav-expanded ul {
        height: 200px;
    }

    nav ul li {
        margin: 15px 0;
    }

    .navbar-toggle {
        display: block;
    }

    .project-grid {
        flex-direction: column;
        gap: 20px;
    }

    .project {
        width: 100%;
    }
}

/*Main content area*/
.landing-page {
    height: fit-content;
    min-height: 100vh;
    background-color: #2C2E43;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 100px 0px 100px;
    /* background-image: url(Images/subtle-dark-vertical.png); try to add this to the landing page*/
    background-image: url(Media/test.png);
    background-size: cover;
    background-position: center;
}

.text-content {
    max-width: 50%;
    margin-top: 100px;
    margin-bottom: 75px;
}

.text-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.text-content h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.text-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    /* Adjust landing page layout on small screens */
    .landing-page {
        padding: 0 20px; /* Less padding on mobile */
        background-image: none; /* Remove background image on mobile */
        background-color: #2C2E43; /* Keep the solid background */
        background-size: auto; /* Ensure the background size is adjusted */
        background-position: center;
    }

    /* Adjust text content layout */
    .text-content {
        max-width: 100%; /* Full width on small screens */
        margin-top: 50px; /* Reduce the top margin */
        margin-bottom: 40px; /* Reduce the bottom margin */
        text-align: center; /* Center-align text on mobile */
    }

    .text-content h1 {
        font-size: 2rem; /* Smaller font size on mobile */
        margin-bottom: 10px;
    }

    .text-content h2 {
        font-size: 1.2rem; /* Smaller font size on mobile */
        margin-bottom: 15px;
    }

    .text-content p {
        font-size: 1rem; /* Smaller font size on mobile */
        margin-bottom: 15px;
    }
}

.projects-content{
    margin-top: 3rem;
}

#project-text {
    text-align: center;
}

#project-text h1 {
    font-size: 40px;
}

/* Game Project Section */
.left-box {
    width: 50%;
    margin-right: 25px;
    opacity: 0;
}

.right-box {
    width: 50%;
    margin-left: 25px;
    opacity: 0;
}

.project-background-color{
    background-color: #2C2E43;
    width: 100%;
    background-image: url(Media/subtle-dark-vertical.png);
} 

.game-project {
    align-items: center;
    justify-content: space-between;
    margin: 50px 0;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.game-project-color {
    align-items: center;
    justify-content: space-between;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.project-background-color{
    padding: 50px 0;
}

.project-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
}

.left-box img{
    float:right; 
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* Maintain a 16:9 aspect ratio */
    max-width: 100%; /* Limit the max width to be responsive */
    overflow: hidden; /* Hide overflow to prevent stretching or cropping issues */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.game-image img, .game-image video{
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gameImage, .gameVideo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image/video covers the entire area */
    display: block; /* Ensures there's no extra space below the image/video */
}

.gameVideo {
    display: none; /* Start hidden, shown only when needed */
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    padding: 10px;
    visibility: hidden;
    cursor: pointer;
    pointer-events: none;
    user-select: none;
}

.side-panel {
    position: absolute;
    top: 0;
    width: 30%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-panel:hover{
    visibility: visible;
}

.side-panel:hover .arrow{
    visibility: visible;
}

.left-panel {
    left: 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.right-panel {
    right: 0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.side-panel:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Dot navigation container - positioned inside the image */
.dot-navigation {
    position: absolute;
    bottom: 10px; /* Position dots near the bottom */
    left: 50%;
    transform: translateX(-50%); /* Center the dots horizontally */
    display: flex;
    justify-content: center;
    gap: 10px; /* Space between dots */
}

/* Individual dot styling */
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.7); /* Light dot color for visibility on images */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Smooth transition for color change */
}

/* Active dot styling */
.active-dot {
    background-color: #333;
    font-weight: bold;
}

.game-details {
    max-width: 100%;
    color: white;
}

.game-details h2 {
    font-size: 1.7rem;
    margin-bottom: 5px;
}

.game-details p {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.game-details ul {
    list-style-type: disc;
    margin-left: 10px;
}

.game-details ul li {
    margin-bottom: 10px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .project-container {
        flex-direction: column; 
        text-align: center; 
        gap: 20px; 
        padding: 0 15px; 
    }

    .project-container li{
        text-align: left; 
    } 

    .left-box, .right-box {
        width: 100%; /* Full-width boxes for stacking */
        margin: 0; /* Remove side margins for clean stacking */
    }

    .image-wrapper {
        margin-bottom: 20px; /* Add space below the image */
    }

    .game-details {
        text-align: center; /* Center-align text for mobile */
        padding: 0 10px; /* Add some padding for spacing */
    }
}

/* Keyframes for sliding in and fading in */
@keyframes slideInLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Keyframes for sliding in and fading in */
@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Keyframes for sliding in and fading in */
@keyframes expand {
    0% {
        transform: scale(0%);
        opacity: 0;
    }
    100% {
        transform: scale(100%);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .left-box-animation {
        animation-name: slideInLeft;
        animation-duration: 1s;
        animation-iteration-count: 1;
        animation-fill-mode: forwards;
    }
    .right-box-animation {
        animation-name: slideInRight;
        animation-duration: 1s;
        animation-iteration-count: 1;
        animation-fill-mode: forwards;
    }
    .expand-animation {
        animation-name: expand;
        animation-duration: 1s;
        animation-iteration-count: 1;
        animation-fill-mode: forwards;
    }
}

.about-me-section {
    display: flex;
    flex-direction: column; /*Stack elements vertically on smaller screens*/
    align-items: center;
    max-width: 1100px;
    margin: 50px auto;
    padding: 10px;
    background-color: #2C2E43;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; /* Ensures padding is included in width/height calculations */
}

.profile-pic {
    width: 100%; /* Allow the image to scale */
    max-width: 300px; /* Limit its maximum size */
    height: auto;
    margin-bottom: 20px; /* Add space below the image */
}

.about-me-content {
    flex: 1;
    text-align: center; /* Center align text for smaller screens */
    padding: 0 10px; /* Add padding to prevent text from touching edges */
}

.about-me-content h1 {
    font-size: 32px; /* Adjust size for smaller screens */
    margin-bottom: 20px;
}

.about-me-content p {
    margin-bottom: 15px;
    font-size: 16px; /* Reduce font size for better readability on smaller screens */
    line-height: 1.5; /* Improve line spacing */
    word-wrap: break-word; /* Prevent long words from overflowing */
}

.resume-button {
    display: inline-block;
    padding: 10px 20px;
    outline: white solid 1px;
    background-color: #222334;
    color: white;
    text-decoration: none;
    margin-top: 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 16px; /* Adjust button font size for smaller screens */
}

.resume-button:hover {
    background-color: #1a1a2e;
}

#about-me {
    margin-top: 5rem;
}

/* Media Queries for Responsiveness */
@media (min-width: 768px) {
    .about-me-section {
        display: flex;
        flex-direction: row;
        align-items: center;
        max-width: 1100px;
        margin: 50px auto;
        padding: 10px;
        background-color: #2C2E43;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .profile-pic {
        height: 100%; 
        max-height: 500px;
        width: auto;
        margin-right: 20px;
    }
    
    .about-me-content {
        flex: 1;
    }
    
    .about-me-content h1 {
        font-size: 36px;
        margin-bottom: 20px;
    }
}

.resume img {
    transform: translatex(50%);
    padding-top: 8rem;
    padding-bottom: 10px;
    width: 50%;
    height: auto;
    border: none; /* Remove the default border */
    box-shadow: none; /* Remove any shadows if applied */
}

.download {
    text-align: center; /* Center the heading and buttons */
    margin-bottom: 3rem;
}

.download h1 {
    font-size: 24px;
}

.download-button {
    display: inline-block;
    padding: 10px 20px;
    outline: white solid 1px;
    background-color: #2c2e43;
    color: white;
    text-decoration: none;
    margin-top: 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin: 0px 10px;
}

.download-button:hover {
    background-color: #1a1a2e;
}
