/* Base body styles */
body {
    margin: 0;
    /* overflow-x: hidden; */
    background-color: white;
    color: black;
    transition: background-color 0.7s, color 0.7s;
}

body.dark {
    background-color: #1a202c;
    color: #f7fafc;
}

/* Background SVG styling */
svg#fractal-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.6;
    stroke: #999;
    filter: blur(1.5px);
}

body.dark svg#fractal-bg {
    stroke: #121314;
    opacity: 0.5;
    filter: blur(2px);
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* Hamburger menu icon - hidden on desktop */
.hamburger {
    display: none;
}

/* Navigation items container */
.nav-items {
    display: flex;
}

/* Responsive styles */
@media (max-width: 968px) {
    .nav-items {
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        padding: 10px 0; /* Increased padding */
        gap: 8px; /* Add gap between buttons */
    }
    .hamburger {
        display: block;
        cursor: pointer;
        color: #4a5568;
        transition: color 0.3s ease;
    }
    .hamburger:hover {
        color: #2d3748;
    }
    .nav-items.active {
        display: flex !important; /* Force display */
        position: absolute;
        top: 100px; /* Increased to ensure it appears below header */
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
        margin: 0;
        padding: 10px 0;
        opacity: 1; /* Ensure visibility */
        visibility: visible; /* Force visibility */
        min-height: 200px; /* Ensure enough space for buttons */
    }
    .nav-items.active.dark {
        background-color: #1a202c;
        color: #f7fafc;
    }
    .nav-items.active button {
        padding: 10px 20px;
        font-size: 1.125rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(0,0,0,0.1); /* Add separator for clarity */
    }
    .nav-items.active.dark button {
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Separator for dark mode */
    }
}

/* Ensure project cards stretch naturally within the grid */
.project-card {
    width: 100%;
}

/* For very wide screens, let the grid control the width */
@media (min-width: 1536px) {
    .project-card {
        max-width: 100%; /* Let the grid control the width */
    }
}