/* --- Basic Setup --- */
body, html {
    height: 100%;
    margin: 0;
    background-color: #0d0d0d;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
}

/* Apply a fade-in animation to the projects page on load */
body.projects-page {
    animation: fadeInAnimation 1s ease-in forwards;
}

/* --- Intro Section Styles (index.html) --- */
#intro-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 0 20px; /* Add some padding for smaller screens */
}

#projects-link {
    text-decoration: none;
}

.glitch {
    font-size: 6rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: #ffffff;
    text-shadow: 0 0 5px #00bfff, 0 0 10px #00bfff, 0 0 20px #00bfff;
    cursor: pointer;
    user-select: none;
    animation: pulsate-glow 2s infinite ease-in-out;
}

.subtitle {
    font-size: 1.5rem;
    margin-top: 20px;
    letter-spacing: 3px;
}

/* --- Gallery & Project Styles (projects.html) --- */
#gallery-container {
    padding: 40px 5%;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    color: #00bfff;
    margin-bottom: 40px;
    margin-top: 60px;
}

#gallery-container div:first-child .section-title {
    margin-top: 20px;
}

/* --- Featured Project Styles --- */
#featured-project {
    margin-bottom: 80px;
}

.featured-item {
    display: flex; /* Side-by-side layout for desktop */
    align-items: center;
    background: #1a1a1a;
    border: 1px solid #00bfff;
    border-radius: 8px;
    text-decoration: none;
    color: #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.25);
}

.featured-item img {
    max-width: 250px;
    margin: 30px;
    border-radius: 5px;
}

.featured-details {
    padding: 30px;
}

.featured-details h3 {
    font-size: 2rem;
    margin-top: 0;
    color: #00bfff;
}

.featured-details p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- Other Projects Grid Styles --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-item {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: #00bfff;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.project-title {
    padding: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #e0e0e0;
}

/* --- Animation Classes --- */
@keyframes fadeInAnimation {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulsate-glow {
    0% { text-shadow: 0 0 5px #00bfff, 0 0 10px #00bfff, 0 0 20px #00bfff; }
    50% { text-shadow: 0 0 10px #00bfff, 0 0 20px #00bfff, 0 0 40px #00bfff; }
    100% { text-shadow: 0 0 5px #00bfff, 0 0 10px #00bfff, 0 0 20px #00bfff; }
}

/*
==============================================
MOBILE & RESPONSIVE STYLES
==============================================
*/
@media (max-width: 768px) {

    /* --- Intro Page Styles --- */
    .glitch {
        font-size: 3.5rem; /* Reduce font size for the main title */
    }

    .subtitle {
        font-size: 1rem; /* Reduce font size for the subtitle */
    }

    /* --- Projects Page Styles --- */
    .section-title {
        font-size: 2rem;
    }
    
    .featured-item {
        flex-direction: column; /* Stack the featured project vertically */
    }

    .featured-item img {
        max-width: 80%; /* Allow image to be wider on mobile */
        margin-bottom: 0;
    }
    
    .featured-details {
        padding: 20px;
        text-align: center; /* Center the text for a cleaner look */
    }

    .featured-details h3 {
        font-size: 1.5rem;
    }
}