:root {
    --primary-bg: #0A0819;
    --accent-purple: #4A2E8A;
    --header-footer-purple: #2A184E;
    --text-white: #F5F5F5;
    --hover-purple: #6B4C9A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

.nav-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-footer-purple);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    z-index: 1000;
    gap: 2rem;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.home-link {
    text-decoration: none;
    color: inherit; /* Keeps the original text color */
    cursor: pointer;
}

    /* Optional: Add hover effect */
    .home-link:hover {
        opacity: 0.8;
    }

h1 {
    font-size: 1.8rem;
    margin: 0;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

    .nav-links a {
        color: var(--text-white);
        text-decoration: none;
        transition: color 0.3s;
    }

    .nav-links a:hover {
        color: var(--hover-purple);
    }

.social-icons {
    display: flex;
    gap: 2rem;
}

    .social-icons a:hover {
        filter: brightness(0.8);
    }

.social-icons.mobile-socials-dropdown {
    display: none;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hover-purple);
    width: 100%;
}

.fa-linkedin {
    color: #0077B5;
}

.fa-github {
    color: #F5F5F5;
}

.fa-youtube {
    color: #FF0000;
}

.email-link {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s;
}

    .email-link:hover {
        color: var(--hover-purple);
    }

.all-projects {
    padding: 8rem 0 2rem;
}

.projects-section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem 1rem;
    font-size: 1.5rem;
}

    .section-header i {
        color: var(--accent-purple);
    }

.projects-container {
    position: relative;
    max-width: 100%;
}

.projects-grid {
    display: flex;
    gap: 2rem;
    max-width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--primary-bg);
    padding: 0 3rem;
}

    .projects-grid::-webkit-scrollbar {
        display: none;
    }

.projects-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent-purple);
    border: none;
    border-radius: 50%;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 10;
    opacity: 0.8;
}

    .scroll-arrow:hover {
        background: var(--hover-purple);
        opacity: 1;
    }

    .scroll-arrow:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.scroll-left {
    left: 1rem;
}

.scroll-right {
    right: 1rem;
}

.project-card {
    flex: 0 0 375px;
    background: var(--accent-purple);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

    .project-card:hover {
        transform: translateY(-5px);
    }

.card-image {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 1.5rem;
}

    .card-content h3 {
        margin-bottom: 0.5rem;
    }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-socials {
    display: none;
}

/* Custom Engine Icons */
.engine-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

.fa-unity {
    color: #888888;
}

/* Additional project page styles */
.project-main {
    padding: 8rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.github-button {
    background: var(--accent-purple);
    color: var(--text-white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

    .github-button:hover {
        background: var(--hover-purple);
        transform: translateY(-2px);
    }

    .github-button i {
        font-size: 1.2em;
    }

    .github-button.disabled {
        background: #3a3a3a !important;
        opacity: 0.6;
        cursor: not-allowed;
        pointer-events: none;
    }

    .github-button.disabled:hover {
        background: #3a3a3a !important;
        transform: none;
    }

    .github-button.disabled i {
        opacity: 0.5;
    }

.back-button {
    background: var(--accent-purple);
    color: var(--text-white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

    .back-button:hover {
        background: var(--hover-purple);
        transform: translateY(-2px);
    }

    .back-button i {
        font-size: 1.2em;
    }

/* Mobile-only back button (hidden by default) */
.mobile-only {
    display: none;
}

.project-title {
    font-size: 3rem;
    text-align: center;
    flex-grow: 1;
    margin: 0;
}

.project-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.project-details {
    padding-right: 2rem;
}

.project-section {
    margin-bottom: 2.5rem;
}

    .project-section h3 {
        color: var(--hover-purple);
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .project-section li {
        margin-bottom: 8px; /* optional: add some space between items */
    }

    .project-section li::before {
        content: "▹";
        margin-right: 0.5rem;
    }

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: var(--primary-bg);
    flex: 0 0 auto;
}

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

/* Gallery Styles */
.project-media {
    min-width: 0; /* Allows column to shrink below content width */
    display: flex;
    flex-direction: column;
    height: auto;
}

.gallery-section {
    flex: 0 0 auto;
    max-height: 50vh; /* Constrain gallery height */
    overflow: hidden;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--hover-purple);
}

.gallery-title {
    color: var(--hover-purple);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.gallery-container {
    position: relative;
    max-width: 100%;
    height: 100%;
    padding: 0;
}

.gallery-grid {
    flex: none !important; /* Remove fixed basis */
    max-width: 100%; /* Constrain to parent width */
    width: 100%; /* Take full parent width */
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0;
    height: 100%;
}

    .gallery-grid::-webkit-scrollbar {
        display: none;
    }

.gallery-item {
    flex: 0 0 calc(50% - 1rem); /* Adjust to fit container */
    max-width: 350px; /* But cap at 350px */
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    background: var(--accent-purple);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    max-height: 100%;
    min-width: 200px;
}

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        aspect-ratio: 16/9;
    }

    .gallery-item:hover {
        transform: translateY(-5px);
    }

/* Scroll arrows for gallery */
.gallery-scroll-left,
.gallery-scroll-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent-purple);
    border: none;
    border-radius: 50%;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 10;
    opacity: 0.8;
}

    .gallery-scroll-left:hover,
    .gallery-scroll-right:hover {
        background: var(--hover-purple);
        opacity: 1;
    }

    .gallery-scroll-left:disabled,
    .gallery-scroll-right:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.gallery-scroll-left {
    left: 0.5rem;
}

.gallery-scroll-right {
    right: 0.5rem;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

    .lightbox-content img {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 8px;
        border: 2px solid var(--accent-purple);
    }

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
}

footer {
    background: var(--header-footer-purple);
    padding: 2rem;
    text-align: center;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    /* Target links in the footer copyright section */
    .footer-content .copyright a {
        color: white !important;
        text-decoration: none;
    }

        /* Optional: Add hover effect */
        .footer-content .copyright a:hover {
            color: #ccc !important;
        }

.footer-email {
    font-size: 1.1rem;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Additional resume-specific styles */
.resume-container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 2rem;
    color: #e0e0e0;
}

.resume-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 2rem;
}

.resume-left {
    border-right: 2px solid #2a2a2a;
    padding-right: 2rem;
}

.resume-section {
    margin-bottom: 2.5rem;
    position: relative;
}

.contact-info a {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s;
}

    .contact-info a:hover {
        color: var(--hover-purple);
    }

.section-title {
    color: var(--hover-purple);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}

    .section-title::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 2px;
        background: var(--hover-purple);
    }

.experience-item {
    margin-bottom: 1.8rem;
}

.experience-title {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.company, .date {
    color: #888;
    font-size: 0.9rem;
}

.date {
    float: right;
}

.skill-list {
    list-style: none;
    padding-left: 1rem;
}

    .skill-list li::before {
        content: "▹";
        color: var(--hover-purple);
        margin-right: 0.5rem;
    }

.certificate-item {
    margin-bottom: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
}

.title-icon {
    display: flex;
}

.certificate-content {
    flex: 1;
}

.certificate-icon {
    width: 128px; /* Adjust size as needed */
    height: 128px; /* Maintain aspect ratio */
    margin-left: 1rem;
    object-fit: contain;
    filter: brightness(0.8); /* Optional: match site aesthetic */
    transition: transform 0.3s ease;
}

.certificate-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

/* Desktop-specific gallery adjustments */
@media (min-width: 769px) {
    .project-columns {
        align-items: stretch; /* Make columns equal height */
    }

    .project-details {
        height: 100%;
        overflow-y: auto; /* Add scroll if content overflows */
    }

    .project-media {
        height: 100%;
    }

    .gallery-section {
        max-height: 40vh; /* Adjust based on your layout */
    }

    .gallery-grid {
        max-height: calc(100% - 20px); /* Account for title */
    }
}

@media (max-width: 768px) {
    .nav-header {
        padding: 1rem;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-bg);
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
        text-align: center;
    }

        .nav-links.active {
            display: flex;
        }

            .nav-links.active .mobile-socials-dropdown {
                display: flex;
                gap: 1.5rem;
            }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .desktop-socials {
        display: none;
    }

    .all-projects {
        padding-top: 5rem;
    }

    .scroll-arrow {
        width: 32px;
        height: 32px;
    }

    .section-header {
        font-size: 1.2rem;
    }

    .project-main {
        padding-top: 7rem !important;
    }

    .project-title {
        font-size: 2.5rem;
        padding: 0 1rem;
    }

    /* Create a flex container for buttons */
    .project-header {
        flex-direction: column;
        padding-top: 1rem;
    }

    /* Hide desktop back button on mobile */
    .desktop-only {
        display: none;
    }

    /* Show mobile back button */
    .mobile-only {
        display: inline-flex;
        width: 100%;
    }

    /* Style both buttons to take equal space */
    .mobile-only,
    .github-button {
        flex: 1;
        padding: 1rem;
        justify-content: center;
    }

    /* Align buttons horizontally */
    .mobile-only + .github-button {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        width: 100%;
    }

    /* Create a flex container for the buttons */
    .project-buttons-container {
        display: flex;
        gap: 1rem;
        width: 100%;
        margin-top: 1rem;
    }

    .project-columns {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem;
    }

    .project-details {
        order: 1;
        padding-right: 0;
    }

    .project-section ul {
        list-style: none;
    }

    .project-media {
        order: -1; /* Bring video up under title */
        margin-top: 1rem;
    }

    .project-details,
    .project-media {
        width: 100% !important; /* Ensure full width */
        max-width: 100% !important;
    }

    .video-container {
        margin: 0 -1rem; /* Full-width video on mobile */
        width: calc(100% + 2rem);
    }

    .gallery-section {
        max-height: none;
    }

    .gallery-container {
        padding: 0 1.5rem;
    }

    .gallery-grid {
        gap: 1.5rem;
        padding: 0.5rem;
    }

    .gallery-item {
        flex: 0 0 280px;
        max-height: 250px;
    }

    .gallery-scroll-left,
    .gallery-scroll-right {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    footer {
        padding: 1.5rem;
    }

    .resume-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .resume-left,
    .resume-right {
        display: contents;
    }

    .resume-left {
        border-right: none;
        padding-right: 0;
        border-bottom: none;
        padding-bottom: 0;
    }

    .resume-section {
        margin-bottom: 0;
        padding: 2rem 0;
        border-bottom: 2px solid #2a2a2a;
        text-align: center;
    }

        .resume-section > *:not(.section-title) {
            text-align: left;
        }

    /* Center section titles on mobile */
    .section-title {
        text-align: center;
        display: inline-block;
        width: auto;
        margin: 0 auto 1.2rem;
    }

        .section-title::after {
            width: 100%; /* This will be the width of the text */
        }

    /* Reorder sections */
    .resume-container .resume-grid {
        display: flex !important;
        flex-direction: column;
    }

    .certificate-item {
        align-items: center;
    }

    .certificate-icon {
        width: 78px;
        height: 78px;
        margin-top: 0.3rem;
    }

    .skills-section {
        order: 1;
    }

    .experience-section {
        order: 2;
    }

    .education-section {
        order: 3;
    }

    .certificates-section {
        order: 4;
    }

    .projects-section {
        order: 5;
    }
}
