:root {
    /* Color Palette - Ultra Minimalist */
    --primary-color: #ffffff;
    --secondary-color: #888888;
    --accent-color: #00ff00; /* Matching the green in the logo */
    --accent-gold: #d4af37;
    --bg-dark: #000000;
    --bg-darker: #000000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

html,
body {
    height: 100%;
    overflow: hidden;
    margin: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--primary-color);
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding: 120px 5%;
}

#home .section-padding {
    padding: 40px 5% 120px;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 18px 0; /* Increased thickness */
    background: transparent;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.85); /* Slightly more transparent to see blur */
    padding: 12px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.header-brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-logo-svg {
    width: 48px;
    height: 48px;
}

.header-brand-text {
    display: flex;
    flex-direction: column; /* Stack vertically for more presence */
    gap: 2px;
}

.header-brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

.header-brand-sub {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 8px;
    color: var(--secondary-color);
    text-transform: uppercase;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 35px; /* Increased gap for better spacing */
    align-items: center;
}

.nav-link {
    font-size: 0.7rem;
    letter-spacing: 3px;
    font-weight: 500;
    opacity: 0.5;
    position: relative;
    display: inline-block;
    transition: all 0.4s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--primary-color);
}

.nav-link.active {
    font-size: 0.9rem;
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* Glow removed for minimalist feel */


/* Floating Social Buttons */
.social-floating-btns {
    position: fixed;
    right: 40px;
    bottom: 40px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.floating-btn {
    background: #ffffff80;
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-btn:hover {
    transform: scale(1.1) rotate(10deg);
    background: #ffffff;
    color: #000;
}

.whatsapp-btn {
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.instagram-btn {
    box-shadow: 0 10px 25px rgba(225, 48, 108, 0.3);
}

/* Hero Section */
.hero {
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.hero-video {
    display: none; /* Hidden in SPA as we use the central container */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 4;
    pointer-events: none;
}

.bg-overlay-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 4px 4px;
    z-index: 5; /* Above video(1), below content (10) */
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-title span {
    display: block;
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-top: 10px;
}

.hero-subtitle {
    font-size: 1rem;
    letter-spacing: 2px;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--secondary-color);
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
        letter-spacing: 2px;
    }
    
    .hero-title span {
        letter-spacing: 0.1em;
        font-size: 0.8em;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        padding: 0 20px;
    }
}

/* Secondary Page Hero */
.hero-sub {
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.hero-sub .hero-content {
    margin-top: 80px;
}

.hero-sub .hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 18px 45px;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    cursor: pointer;
    transition: 0.5s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

/* Projects Section */
.section-header {
    margin-bottom: 80px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    letter-spacing: 8px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.project-card {
    position: relative;
    overflow: hidden;
    height: 450px;
    cursor: pointer;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 255, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1);
    transition: 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    transition: 0.5s;
}

.project-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary-color);
    letter-spacing: 3px;
    transition: 0.4s;
}

.project-info p {
    font-size: 0.7rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    transition: 0.4s;
}

.project-card:hover .project-image img {
    filter: brightness(1) contrast(1.2);
    transform: scale(1.08);
}

.project-card:hover .project-info {
    padding-bottom: 40px;
}

.project-card:hover h3 {
    color: var(--accent-color);
}

/* Homepage Grid Mobile Optimization - Horizontal Swipe */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        margin-left: -25px;
        margin-right: -25px;
        padding-left: 25px;
        padding-right: 25px;
        -webkit-overflow-scrolling: touch;
    }
    
    .project-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
        height: 380px;
    }
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Specific Section Padding for Mobile */
@media (max-width: 768px) {
    .section-padding {
        padding: 80px 5%;
    }
    
    .container {
        padding: 0 25px;
    }
}

/* --- RESPONSIVE HEADER & MOBILE MENU --- */

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.menu-toggle .bar {
    width: 25px;
    height: 1px;
    background-color: #fff;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.6s cubic-bezier(0.7, 0, 0.3, 1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.2rem;
        letter-spacing: 6px;
        opacity: 0.8;
    }

    .nav-link.active {
        font-size: 1.3rem;
        color: var(--accent-color);
        opacity: 1;
    }

    /* Hamburger Animation */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background-color: var(--accent-color);
    }
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background-color: var(--accent-color);
    }

    .header-brand-name {
        font-size: 1.4rem;
    }
    
    .header-brand-sub {
        font-size: 0.7rem;
        letter-spacing: 6px;
    }
}

/* Footer & Attribution */
.footer {
    padding: 60px 0;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
}

.copyright {
    font-size: 0.8rem;
    color: var(--secondary-color);
    letter-spacing: 1px;
}

.attribution {
    font-size: 0.8rem;
    color: var(--secondary-color);
    letter-spacing: 1px;
}

.dev-link {
    color: var(--accent-color);
    font-weight: 500;
    transition: 0.3s;
}

.dev-link:hover {
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

@media (max-width: 768px) {
    .footer {
        padding-bottom: 120px; /* Space for floating buttons */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* --- INTERACTIVE CATEGORY NAV (TAB STYLE) --- */
.category-nav {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

.category-nav-item {
    position: relative;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-nav-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
    transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    text-align: center;
}

.nav-item-overlay h3 {
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: #fff;
    font-weight: 600;
}

.category-nav-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.category-nav-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
    transform: translateY(-5px);
}

.category-nav-item.active img {
    filter: brightness(1);
}

/* --- CATEGORY CONTENT PANELS --- */
.category-content-wrapper {
    position: relative;
    min-height: 400px;
    margin-bottom: 80px;
}

.category-panel {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 60px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    backdrop-filter: blur(10px);
}

.category-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.panel-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.panel-text h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    letter-spacing: 5px;
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
}

.panel-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--secondary-color);
}

.panel-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.panel-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.5s;
}

.panel-gallery img:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
}

@media (max-width: 1024px) {
    .category-nav {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .panel-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-panel {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .category-nav {
        display: flex !important;
        grid-template-columns: none !important; /* Override the column helpers */
        overflow-x: auto !important;
        gap: 12px;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        padding-left: 25px;
        padding-right: 25px;
        margin-left: -25px;
        margin-right: -25px;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-nav-item {
        flex: 0 0 160px;
        height: 160px;
        scroll-snap-align: start;
    }
    
    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .panel-text h3 {
        font-size: 1.5rem;
    }
}

/* --- SPA ARCHITECTURE & PAGE TURNS --- */
#bg-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: -1;
    background: #000;
    overflow: hidden;
}

.spa-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.spa-bg-video.active {
    opacity: 0.45; /* Match previous hero video opacity */
    filter: brightness(0.7) contrast(1.1);
}

#spa-main {
    position: relative;
    width: 100%;
    height: 100dvh;
    perspective: 2000px;
    overflow: hidden;
    z-index: 10;
}

.spa-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow-y: auto;
    background: transparent;
    padding-top: 100px;
    transform-origin: left center;
    backface-visibility: hidden;
    z-index: 10;
    
    /* Hide scrollbar but keep functionality */
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}

.spa-page::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.spa-page.active {
    display: block;
}

/* Project Category Row Styling */
.project-category-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 120px;
    align-items: center;
}

.category-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 15px;
}

@media (max-width: 768px) {
    .project-category-row {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 80px;
    }
    
    .category-images-grid {
        grid-template-columns: 1fr; /* Stack images vertically for size */
    }
    
    .category-text {
        text-align: center;
        order: -1; /* Text comes before images on mobile */
    }
    
    .category-text h3 {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }
    
    .category-text p {
        max-width: 100%;
    }
}

.category-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: 0.5s ease;
}

.category-image:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-image:hover img {
    transform: scale(1.1);
}

.category-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    letter-spacing: 5px;
}

.category-text p {
    font-size: 1rem;
    color: var(--secondary-color);
    line-height: 1.8;
    max-width: 500px;
}

/* Page Transitions */
.page-flip-exit-forward {
    animation: flipOutLeft 1.2s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    z-index: 10;
}

.page-flip-enter-forward {
    display: block !important;
    animation: flipInRight 1.2s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    z-index: 5;
}

.page-flip-exit-backward {
    animation: flipOutRight 1.2s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    z-index: 10;
}

.page-flip-enter-backward {
    display: block !important;
    animation: flipInLeft 1.2s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    z-index: 5;
}

@keyframes flipOutLeft {
    0% { transform: rotateY(0); opacity: 1; }
    100% { transform: rotateY(-45deg) translateX(-100%); opacity: 0; }
}

@keyframes flipInRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes flipOutRight {
    0% { transform: rotateY(0); opacity: 1; }
    100% { transform: rotateY(45deg) translateX(100%); opacity: 0; }
}

@keyframes flipInLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: 1.2s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Text reveal effect */
.hero-title {
    overflow: hidden;
}

.hero-title > span {
    display: block;
    transform: translateY(100%);
    transition: 1.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.active .hero-title > span:not(.letter) {
    transform: translateY(0);
}

/* Interactive hover title */
.interactive-title .letters-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    white-space: nowrap;
}

.letter-wrapper {
    display: inline-block;
    padding: 0 1px;
    cursor: default;
}

.interactive-title .letter {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
    will-change: transform, color;
    pointer-events: none;
}

.reveal.active .interactive-title .letter {
    animation: letterIn 1s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

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

.letter-wrapper:hover .letter {
    color: var(--accent-color);
    transform: translateY(-4px) scale(1.02);
    text-shadow: 0 4px 8px rgba(0, 255, 0, 0.1);
}


/* Section Glass Effect */
.spa-page .section-padding {
    background: transparent;
    backdrop-filter: none;
}

/* Premium Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    position: relative;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding: 15px 0;
    color: var(--primary-color);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    transition: 0.4s;
    outline: none;
}

.contact-form textarea {
    min-height: 120px;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom-color: var(--accent-color);
    padding-left: 10px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 500;
}

.contact-form .btn {
    align-self: flex-start;
    margin-top: 20px;
}

/* Splash Screen - Epic SpaceX Style */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1), opacity 1s ease;
}

.splash-background {
    position: absolute;
    width: 110%;
    height: 110%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%);
    filter: blur(50px);
    animation: pulseBg 2s infinite alternate;
}

@keyframes pulseBg {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.1); opacity: 0.6; }
}

.splash-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.logo-svg {
    width: 250px;
    height: 250px;
    margin-bottom: 40px;
    overflow: visible;
}

.logo-piece {
    opacity: 0;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

/* Stage 2: M Structure (0.6-1.75s) */
.piece-sketch-v1, .piece-sketch-v2, .piece-sketch-s1, .piece-sketch-s2 { animation: fadeIn 0.5s forwards 0.25s; opacity: 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 0.3; } }

.piece-m-outline-1, .piece-m-outline-2 { animation: drawPath 0.75s ease forwards 0.6s; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.piece-m-inner-1, .piece-m-inner-2 { animation: fadeInInternal 0.5s forwards 1.25s; opacity: 0; }

@keyframes fadeInInternal { from { opacity: 0; } to { opacity: 0.8; } }

/* Stage 3: Green Line (1.5-2.5s) */
.piece-green {
    animation: drawPath 1s ease forwards 1.5s, neonPulse 1.5s ease-in-out infinite 2.5s;
    filter: drop-shadow(0 0 15px rgba(0, 255, 0, 0.8)) drop-shadow(0 0 30px rgba(0, 255, 0, 0.4));
}

@keyframes neonPulse {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(0, 255, 0, 0.8)) drop-shadow(0 0 30px rgba(0, 255, 0, 0.4)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 25px rgba(0, 255, 0, 1)) drop-shadow(0 0 45px rgba(0, 255, 0, 0.6)); transform: scale(1.02); }
}

@keyframes drawPath {
    0% { stroke-dashoffset: 1000; opacity: 0; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}


/* Stage 4: Title & Progress Bar (2.4-3s) */
.splash-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 20px;
    margin-top: 20px;
    opacity: 0;
    animation: epicReveal 0.75s cubic-bezier(0.2, 1, 0.3, 1) forwards 2.4s;
}

@keyframes epicReveal {
    0% { opacity: 0; transform: scale(0.9); letter-spacing: 30px; filter: blur(20px); }
    100% { opacity: 1; transform: scale(1); letter-spacing: 12px; filter: blur(0); }
}

.splash-loader {
    width: 300px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 40px auto 0;
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #00ff00;
    animation: loadBar 2.75s linear forwards;
}

@keyframes loadBar {
    0% { width: 0; }
    80% { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

.logo-link {
    text-decoration: none;
}

/* Homepage Grid Mobile Optimization - Horizontal Swipe */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        margin-left: -25px;
        margin-right: -25px;
        padding-left: 25px;
        padding-right: 25px;
        -webkit-overflow-scrolling: touch;
    }
    
    .project-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
        height: 380px;
    }

    /* Hide scrollbar for cleaner mobile look while allowing swipe */
    .projects-grid::-webkit-scrollbar {
        display: none;
    }
}