html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Share Tech Mono', monospace;
    color: #ffffff;
    background-color: #0b0b0b;
    overflow-x: hidden;
}

.webgl {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
    z-index: -1;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 4rem 3rem 4rem;
    /* Shift text up: less top pad, more bottom pad */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, #0b0b0b 50%, rgba(11, 11, 11, 0) 100%);
    pointer-events: none;
    /* Allow clicks through the transparent part if needed, but links assume pointer-events:auto */
}

nav a,
.logo {
    pointer-events: auto;
    /* Re-enable pointer events for interactive elements */
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: all 0.3s;
}

nav a:hover {
    opacity: 1;
}

/* SECTION FIX: Use min-height and padding to allow content to grow */
.section {
    min-height: 100vh;
    /* Changed from height: 100vh */
    height: auto;
    display: flex;
    align-items: center;
    padding: 120px 10%;
    /* increased top padding to clear nav */
    position: relative;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed */
}

.content {
    max-width: 600px;
    pointer-events: auto;
    width: 100%;
    /* Ensure content takes space */
}

h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 1rem;
}

h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.9;
}

/* --- GRID LAYOUT START --- */
.project-list {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

/* Base Card Style */
.project-item {
    text-decoration: none;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #1a1a1a;
    border-left: 2px solid #00ff88;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    position: relative;
    padding: 0;
    /* Remove default padding for image flush */
}

/* Card Images */
.project-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s;
    border-bottom: 1px solid #1a1a1a;
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

/* Hover Effects */
.project-item:hover {
    border-left: 4px solid #00ffff;
    background: rgba(0, 255, 136, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.project-item:hover img {
    opacity: 1;
}

.project-item h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #00ff88;
}

.project-item:hover h3 {
    color: #00ffff;
}

.project-item p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.7;
    margin-bottom: 1rem;
}

/* Featured Project (willowOS) - Spans 2x2 */
.project-group.featured {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.project-group.featured .project-item {
    height: 100%;
    border-left: 4px solid #00ffff;
    background: rgba(0, 26, 26, 0.747);
}

/* Hide the old project-images div logic since we are using card images now */
.project-images {
    display: none;
}

/* Make featured image bigger */
.project-group.featured .project-item img {
    height: 300px;
}

.project-group.featured .project-item h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-group.featured .project-item p {
    font-size: 1.1rem;
    max-width: 90%;
}

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

    .project-group.featured {
        grid-column: span 2;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .project-list {
        grid-template-columns: 1fr;
    }

    .project-group.featured {
        grid-column: span 1;
    }
}

/* --- GRID LAYOUT END --- */

/* Social Links */
.socials {
    margin-top: 1rem;
}

.socials a {
    color: #00ff88;
    text-decoration: none;
    font-size: 1.2rem;
    border: 1px solid #00ff88;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.socials a:hover {
    background: #00ff88;
    color: #000;
}








/* --- SCROLL DOWN ARROW --- */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    pointer-events: auto; /* Overrides section pointer-events: none */
    z-index: 10;
}

/* Creates a sharp, minimal down-pointing chevron */
.scroll-down .arrow {
    width: 15px;
    height: 15px;
    border-right: 2px solid #00ff88; /* Matches your neon green accent */
    border-bottom: 2px solid #00ff88;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

/* Hover glow effect to match your cards */
.scroll-down:hover .arrow {
    border-right-color: #00ffff; /* Changes to cyan on hover */
    border-bottom-color: #00ffff;
    filter: drop-shadow(0 0 8px #00ffff);
}

/* Bouncing Keyframes */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg); /* Moves up slightly */
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}


/* Snappy Downward Pulse Animation */
@keyframes cyberFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.6;
    }
    40% {
        transform: translateX(-50%) translateY(-14px); /* Hops up */
        opacity: 1;
    }
    60% {
        transform: translateX(-50%) translateY(2px); /* Drops slightly below baseline */
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.6)); /* Glows intense on the drop */
    }
    80% {
        transform: translateX(-50%) translateY(-3px);
    }
}


/* --- CYBERPUNK WIREFRAME SCROLL INDICATOR --- */
.scroll-down-cyber {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    text-decoration: none;
    pointer-events: auto; /* Allow clicking over canvas */
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: cyberFloat 2.5s ease-in-out infinite;
}

/* Outer Wireframe Box/Chamber */
.vector-frame {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 1px dashed rgba(0, 255, 136, 0.4);
    transform: rotate(45deg);
    transition: all 0.4s ease;
}

/* The Downward Vector Chevron */
.vector-core {
    position: absolute;
    width: 14px;
    height: 14px;
    border-right: 2px solid #00ff88;
    border-bottom: 2px solid #00ff88;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: all 0.4s ease;
}

/* Simulated "Radar/Wireframe" crosshairs using pseudo-elements */
.scroll-down-cyber::before,
.scroll-down-cyber::after {
    content: '';
    position: absolute;
    background: rgba(0, 255, 136, 0.2);
    transition: all 0.4s ease;
}
/* Vertical axis guide line */
.scroll-down-cyber::before {
    width: 1px;
    height: 15px;
    top: -5px;
}

/* --- HOVER EFFECTS (Fires up the terminal UI) --- */
.scroll-down-cyber:hover .vector-frame {
    border: 1px solid #00ffff;
    transform: rotate(135deg); /* Spin the geometric frame on hover */
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.scroll-down-cyber:hover .vector-core {
    border-right-color: #00ffff;
    border-bottom-color: #00ffff;
    filter: drop-shadow(0 0 8px #00ffff);
}

.scroll-down-cyber:hover::before {
    background: #00ffff;
    height: 25px;
}