/* --- Home Page Specific Styles (Static Hero Mosaic with Integrated Title) --- */

.home-page {
    background-color: #050505 !important;
}

.main-hero {
    position: relative;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #050505;
    padding: 100px 0 0; /* No bottom padding here */
}

/* Mosaic limited to Hero background layer */
.hero-mosaic-wrapper {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 140%;
    height: 150%; /* Way more height */
    z-index: 1;
    transform: rotate(-15deg);
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0.5;
}

/* Transition to solid black at very bottom of hero */
.hero-fade-out {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 221px; /* Shorter, tighter fade */
    background: linear-gradient(to bottom, transparent, #050505);
    z-index: 5;
}

/* Standardize Rows and Items */
.mosaic-row {
    display: flex;
    gap: 20px;
    width: fit-content;
    animation: mosaicScroll 80s linear infinite;
}
.mosaic-row:nth-child(even) { animation-direction: reverse; }

.mosaic-item {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.03);
    filter: brightness(0.25) saturate(0.5);
    animation: mosaicPulse 15s ease-in-out infinite;
}

@keyframes mosaicPulse {
    0%, 100% { filter: brightness(0.25) saturate(0.5); }
    50% { filter: brightness(0.4) saturate(0.8); }
}

@keyframes mosaicScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Content on top of everything */
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 850px;
    padding: 0 20px;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 100;
    font-family: 'TitleFont', sans-serif;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 0px 30px rgba(0, 0, 0, 1);
    line-height: 0.85em;
    margin: 0;
}

.hero-title span { color: var(--accent-color); }

.hero-tagline {
    font-family: 'handwritting', cursive;
    font-size: 2.2rem;
    color: #fff;
    margin-top: 10px;
    display: block;
    text-shadow: 0 0px 30px rgba(0, 0, 0, 1);
    opacity: 0.8;
}

.hero-description-box {
    max-width: 700px;
    margin: 40px auto 0;
    padding: 30px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.hero-highlight {
    color: var(--accent-color);
    font-size: 1.4rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 800;
}

.hero-description {
    color: #ccc;
    line-height: 1.7;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

.hero-cta { 
    margin-top: 40px; 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; /* Allows stacking on small screens */
}

@media (max-width: 600px) {
    .hero-cta {
        flex-direction: column; /* Stack vertically on mobile */
        gap: 15px;
    }
    .hero-cta .modal-btn {
        width: 100%; /* Optional: set to 100% on mobile for better tap area */
        max-width: 300px;
    }
}

.register-btn:hover {
    background: var(--accent-color) !important;
    color: #000 !important;
    transform: scale(1.05);
}

/* Section Title Styling (Inside Hero) */
.section-title-container {
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 80px; /* Space between CTA and Title */
    padding-bottom: 60px; /* Space for the fade-out to start below the title */
    scroll-margin-top: 100px;
}

.main-section-title {
    font-family: 'TitleFont', sans-serif;
    font-size: 3.5rem;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    letter-spacing: 2px;
}
div#projects-anchor {
    position: absolute;
    left: 0;
    right: 0;
    height: 1em;
    margin-top: -250px;
    user-select: none;
    visibility: hidden;
}

.title-underline {
    width: 100px;
    height: 5px;
    background: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Grid Area (Solid Black) */
#projects-grid {
    background: #050505;
    padding: 20px 20px 80px;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .main-hero {min-height: 465px;padding: 60px 0 0;}
    .hero-content { margin-bottom: 40px; }
    .hero-title { font-size: 3.5rem; }
    .hero-tagline { font-size: 1.8rem; }
    .main-section-title { font-size: 2.2rem; }
    .section-title-container { margin-top: 40px; padding-bottom: 40px; }
    .mosaic-item { width: 130px; height: 130px; }
}
