:root {
    --primary-color: #003366;
    --secondary-color: #001f3f;
    --accent-color: #00ccff;
    --text-color: #ffffff;
    --background-color: #000033;
}

/* 3D Cube Cursor */
.cube-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 9999;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 204, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cube-face.front { transform: translateZ(10px); }
.cube-face.back { transform: translateZ(-10px) rotateY(180deg); }
.cube-face.right { transform: rotateY(90deg) translateZ(10px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(10px); }
.cube-face.top { transform: rotateX(90deg) translateZ(10px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(10px); }

@keyframes rotateCube {
    0% {
        transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

body {
    cursor: none;
}

a, button {
    cursor: none;
}

a:hover ~ .cube-cursor,
button:hover ~ .cube-cursor {
    animation: rotateCube 2s linear infinite;
}

/* Floating Home Button */
.floating-home {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    cursor: none;
}

.bubble-container {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    animation: float 3s ease-in-out infinite;
}

.bubble-shine {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 25%;
    height: 25%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.floating-home i {
    color: var(--text-color);
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.floating-home:hover i {
    transform: scale(1.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 51, 0.3), rgba(0, 0, 51, 0.6));
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    z-index: 2;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4rem;
    margin: 0;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: var(--text-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Play Button */
.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    margin-top: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.play-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-color);
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.play-button:hover::after {
    opacity: 0.5;
}

.play-button i {
    font-size: 2rem;
    animation: floatButton 2s ease-in-out infinite;
}

@keyframes floatButton {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Gallery Section */
.gallery-section {
    background-color: var(--background-color);
    padding: 6rem 2rem;
    transform: translateZ(0);
    will-change: transform;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    line-height: 1.6;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--background-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

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

.project-card.hidden {
    display: none;
}

.project-card.reveal {
    display: block;
    animation: revealCard 0.5s ease forwards;
}

@keyframes revealCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-image {
    height: 300px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

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

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.location {
    color: var(--accent-color);
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
}

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

.project-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-color);
}

.contact-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.contact-btn:hover {
    color: var(--text-color);
}

/* Load More Button */
.pagination {
    text-align: center;
    margin-top: 3rem;
}

.load-more {
    background: none;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more:hover {
    background: var(--accent-color);
    color: var(--background-color);
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 51, 0.9);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--background-color);
    border-radius: 15px;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 2rem;
}

.modal-info h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.modal-location {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
}

.detail-label {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-value {
    color: var(--text-color);
    font-size: 1.1rem;
}

.modal-features {
    margin-bottom: 2rem;
}

.modal-features h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.features-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.features-list li {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-list li::before {
    content: '•';
    color: var(--accent-color);
}

.modal-contact-btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--background-color);
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.modal-contact-btn:hover {
    transform: translateY(-2px);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .hero {
        height: 100vh;
        min-height: -webkit-fill-available;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
        line-height: 1.2;
    }

    .hero-content p {
        font-size: clamp(1rem, 4vw, 1.5rem);
        margin: 0.5rem 0;
    }

    .play-button {
        width: 60px;
        height: 60px;
        margin-top: 1.5rem;
    }

    .play-button i {
        font-size: 1.5rem;
    }

    .gallery-section {
        padding: 4rem 1.5rem;
    }

    .section-description {
        font-size: clamp(1rem, 3vw, 1.2rem);
        margin-bottom: 3rem;
        padding: 0 1rem;
    }

    h2 {
        font-size: clamp(2rem, 6vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card {
        margin: 0 auto;
        max-width: 400px;
    }

    .project-info h3 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .floating-home {
        top: 1rem;
        left: 1rem;
        width: 50px;
        height: 50px;
    }

    .floating-home i {
        font-size: 1.2rem;
    }

    /* Optimize animations for mobile */
    .cube-cursor {
        display: none;
    }

    body, a, button {
        cursor: auto;
    }

    /* Performance optimizations */
    .project-card {
        transform: none !important;
    }

    .project-card:hover .project-image img {
        transform: none !important;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 300px;
    }

    .features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 1rem;
    }

    .project-card {
        max-width: 100%;
    }

    .gallery-section {
        padding: 3rem 1rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Disable animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}