/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #000;
    margin: 0;
    padding: 0;
}

/* Header and Navigation */
header {
    position: fixed;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links a {
    margin-left: 2rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links a:hover {
    color: #007bff;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    animation: subtle-zoom 30s ease-in-out infinite alternate;
}

@keyframes subtle-zoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    max-width: 800px;
    padding: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: none;
}

.cta-button:hover {
    background-color: rgba(0, 98, 204, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Projects Section */
.projects {
    padding: 5rem 2rem;
    position: relative;
    background-color: #1a1a1a;
    min-height: 100vh;
    isolation: isolate;
    margin-top: 0;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/projects-bg.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.15;
    z-index: -1;
    animation: subtle-fade 10s ease-in-out infinite alternate;
}

@keyframes subtle-fade {
    from {
        opacity: 0.1;
    }
    to {
        opacity: 0.2;
    }
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ffffff;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    perspective: 1000px;  
    position: relative;
    z-index: 1;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    position: relative;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 20px 30px rgba(0, 0, 0, 0.1),
        0 10px 10px rgba(0, 0, 0, 0.08);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 60%
    );
    transform: translateZ(1px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 1.5rem;
    background: white;
    position: relative;
    transform-style: preserve-3d;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    transform: translateZ(20px);
    transition: transform 0.3s ease;
}

.card:hover .card-content h3 {
    transform: translateZ(30px);
}

.card-content p {
    color: #666;
    margin-bottom: 1rem;
    transform: translateZ(15px);
    transition: transform 0.3s ease;
}

.card:hover .card-content p {
    transform: translateZ(25px);
}

.card-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transform: translateZ(20px);
    transition: all 0.3s ease;
    position: relative;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007bff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.card:hover .card-link::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 2rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        height: 80vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .projects {
        padding: 3rem 1rem;
    }

    .projects h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card:hover {
        transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
    }
}

/* Mobile menu animations and styling */
@keyframes menuSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes menuItemFadeIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #333;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1001;
}

.mobile-menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover::before {
    transform: scale(1);
}

.mobile-menu-btn i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mobile-menu-btn.active i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        padding: 5rem 2rem 2rem;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        animation: menuSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .nav-links a {
        margin: 0.8rem 0;
        padding: 1rem 2rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        font-size: 1.2rem;
        font-weight: 500;
        width: 100%;
        max-width: 300px;
        text-align: center;
        opacity: 0;
    }

    .nav-links.active a {
        animation: menuItemFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .nav-links.active a:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active a:nth-child(2) { animation-delay: 0.2s; }
    .nav-links.active a:nth-child(3) { animation-delay: 0.3s; }
    .nav-links.active a:nth-child(4) { animation-delay: 0.4s; }

    .nav-links a:hover {
        background: rgba(0, 123, 255, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}
