/* CSS Custom Properties & Reset */
:root {
    --primary-red: #D40000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --hover-bg: rgba(255, 255, 255, 0.1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
h1,
h2,
p {
    margin: 0;
}

body {
    background-color: #000;
    color: #fff;
    /*font-family: "Open Sans", "Segoe UI", "Helvetica Neue", "Arial", sans-serif;*/
    font-family: "Helvetica Neue", "Segoe UI", "Arial", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    /* Prevent body scroll, use content-wrapper instead */
}

.body-no-scroll {
    overflow: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    margin-top: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.025em;
}

/* Desktop Navigations (Center & Right) */
.glass-nav {
    display: none;
    /* Hidden on mobile by default */
    align-items: center;
    gap: 0.25rem;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 9999px;
    padding: 0.375rem;
    backdrop-filter: blur(24px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .glass-nav {
        display: flex;
    }

    .main-nav {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .social-nav {
        position: absolute;
        right: 1.5rem;
    }
}

.nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    color: #d1d5db;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-radius: 9999px;
    transition: transform 0.3s ease-in-out;
}

.nav-link:hover {
    color: #fff;
    transform: scale(1.05);
}

.nav-link .hover-bg {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: var(--hover-bg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link:hover .hover-bg {
    opacity: 1;
}

.nav-link .icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.nav-link span {
    position: relative;
    z-index: 1;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    width: 3rem;
    color: #fff;
    z-index: 100;

    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 9999px;
    /*backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);*/
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
    transition: transform 0.2s ease-in-out;
}

.mobile-menu-toggle:hover {
    background-color: var(--hover-bg);
    transform: scale(1.15);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

svg {
    width: 24px;
    height: 24px;
}


.mobile-menu-toggle .icon-close {
    display: none;
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background-color: rgba(255, 255, 255, 0.05);
    /* subtle white tint */
    backdrop-filter: blur(24px);
    /* stronger blur */
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    height: 3rem;
    width: 3rem;
    color: #fff;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 9999px;
    cursor: pointer;
    z-index: 100;
    -webkit-appearance: none;
    appearance: none;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: background-color 0.3s ease, transform 0.2s ease-in-out;
    transition: background-color 0.3s ease, transform 0.2s ease-in-out;
}

.mobile-nav-close:hover {
    background-color: var(--hover-bg);
    -webkit-transform: scale(1.15);
    transform: scale(1.15);
}

.mobile-nav-close svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.mobile-nav-overlay a {
    display: block;
    width: 100%;
    max-width: 260px;
    text-align: center;
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    backdrop-filter: blur(16px);
    transition: background-color 0.3s ease, color 0.3s ease;
    transition: transform 0.2s ease-in-out;
}

.mobile-nav-overlay a:hover {
    transform: scale(1.05);
    background-color: #fff;
    color: #000;
}

.mobile-socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.mobile-socials a {
    padding: 0.5rem;
    color: #fff;
    /* Set social icon color to white */
    transition: transform 0.2s ease-in-out;
}

.mobile-socials a:hover {
    transform: scale(1.15);
}

.mobile-socials .icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Main Layout */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/*
        .background-video-wrapper {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: -1;
        }

        .background-video {
            position: absolute;
            z-index: 0;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            /* PULL VIDEO UNDER NOTCH *
            top: env(safe-area-inset-top, 0) * -1;
            /* Negative top inset *
            left: env(safe-area-inset-left, 0) * -1;
            /* Negative left inset *
            right: env(safe-area-inset-right, 0) * -1;
            /* Negative right inset *
            bottom: env(safe-area-inset-bottom, 0) * -1;
            /* Negative bottom inset *
            width: calc(100% + env(safe-area-inset-left, 0) + env(safe-area-inset-right, 0));
            height: calc(100% + env(safe-area-inset-top, 0) + env(safe-area-inset-bottom, 0));
        }

        .video-overlay {
            position: absolute;
            inset: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 10;
        }
        */

/* --- Animated Gradient Background --- */
.background-blur {
    position: fixed;
    top: 50%;
    left: 50%;
    width: max(100vw, 100vh);
    height: max(100vw, 100vh);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
            rgba(255, 110, 196, 0.7),
            /* Pink */
            rgba(100, 100, 255, 0.7),
            /* Blue */
            rgba(255, 165, 0, 0.7),
            /* Orange */
            rgba(0, 212, 255, 0.7)
            /* Cyan */
        );
    background-size: 200% 200%;
    filter: blur(120px);
    z-index: -1;
    animation: gradient-flow 15s ease infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.content-wrapper {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Gradient fade out at the top */
    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0rem,
            rgba(0, 0, 0, 0) 1rem,
            rgba(0, 0, 0, 0.01) 2rem,
            rgba(0, 0, 0, 0.03) 3rem,
            rgba(0, 0, 0, 0.06) 4rem,
            rgba(0, 0, 0, 0.13) 5rem,
            rgba(0, 0, 0, 0.22) 6rem,
            rgba(0, 0, 0, 0.34) 7rem,
            rgba(0, 0, 0, 0.51) 8rem,
            rgba(0, 0, 0, 0.73) 9rem,
            rgba(0, 0, 0, 1) 10rem,
            rgba(0, 0, 0, 1) 100rem);
    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0rem,
            rgba(0, 0, 0, 0) 1rem,
            rgba(0, 0, 0, 0.01) 2rem,
            rgba(0, 0, 0, 0.03) 3rem,
            rgba(0, 0, 0, 0.06) 4rem,
            rgba(0, 0, 0, 0.13) 5rem,
            rgba(0, 0, 0, 0.22) 6rem,
            rgba(0, 0, 0, 0.34) 7rem,
            rgba(0, 0, 0, 0.51) 8rem,
            rgba(0, 0, 0, 0.73) 9rem,
            rgba(0, 0, 0, 1) 10rem,
            rgba(0, 0, 0, 1) 100rem);
}



/* Main Content */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 2rem;
    text-align: center;
}

h1 {
    font-size: 3.75rem;
    /* 5xl */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    opacity: 0;
    /* For animation */
    white-space: nowrap;
}

@media (min-width: 768px) {
    h1 {
        font-size: 6rem;
        /* 7xl */
    }
}

.red-square {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    background-color: var(--primary-red);
    margin-left: 0.3rem;
    margin-bottom: -0.05rem;
    border-radius: 0;
}

@media (min-width: 768px) {
    .red-square {
        width: 0.9rem;
        height: 0.9rem;
    }
}

p.subtitle {
    margin: 1rem auto 0;
    font-size: 1.125rem;
    color: #d1d5db;
    max-width: 42rem;
    opacity: 0;
    /* For animation */
}

@media (min-width: 768px) {
    p.subtitle {
        font-size: 1.25rem;
    }
}

.button-group {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    /* For animation */
}

.btn {
    display: inline-flex;
    min-width: 140px;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    height: 3rem;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 650;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn .icon-svg,
.btn .icon-svg svg {
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(0);
}

.btn .btn-text {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.875rem;
    font-weight: 600;
    transform: translateY(10px);
}

.btn:hover .icon-svg,
.btn:hover .icon-svg svg {
    opacity: 0;
    transform: translateY(-10px);
}

.btn:hover .btn-text {
    opacity: 1;
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--primary-red);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #fff;
    color: var(--primary-red);
}

.btn-secondary {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    backdrop-filter: blur(16px);
}

.btn-secondary:hover {
    background-color: #fff;
    color: #000;
}

/* Animations */
.animate-fade-in-down {
    animation: fade-in-down 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Button */
.footer-button-container {
    display: flex;
    bottom: 1rem;
    column-gap: 0.75rem;
    row-gap: 0.1rem;
    flex-wrap: wrap;
    justify-content: center;
    /*position: fixed;
            left: 50%;
            transform: translateX(-50%);*/
    padding: 1rem;
    z-index: 40;
}

.footer-button {
    color: #ffffff30;
    font-size: 0.75rem;
    text-decoration: none;
}

.footer-button:hover {
    color: #fff;
}

/* ======== MAIN CONTENT (Glass Style) ======== */
.site-main {
    padding: 10rem 2.5rem 5rem;
    flex: 1;
    /* Makes main content fill space */
}


/* --- Project Grid Layout --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

/* --- Frosted Glass Card Styling --- */
.project-card {
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    /* Semi-transparent white */
    backdrop-filter: blur(15px);
    /* The "frost" effect */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}


.project-card:hover {
    background-color: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
    /*
    transform: translateY(-2px);
    */
}


.project-card img {
    width: 100%;
    height: 200px;
    /* Set a fixed height */
    object-fit: cover;
    /* Ensures image covers the area */
    display: block;
}

.card-content {
    padding: 1.5rem;
}

.card-content span {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.card-content h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* --- Responsive for smaller screens --- */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        /* Stack cards vertically */
        gap: 1.5rem;
    }

    .project-card img {
        height: 250px;
    }
}