/* ═══════════════════════════════════════════════════════
   HERO PAGE STYLES
═══════════════════════════════════════════════════════ */

/* ─── Hero Section ─── */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* ─── Composition Container ─── */
.composition {
    position: absolute;
    left: calc(7 * var(--col-width));
    top: 46.78%;
    transform: translateY(-50%);
}

.name-block {
    position: relative;
}

.name-line {
    font-family: 'Heebo', sans-serif;
    font-weight: 100;
    font-size: 70px;
    letter-spacing: -0.06em;
    color: var(--text-color);
    line-height: 0.95;
    white-space: nowrap;
}

.name-line-second {
    display: block;
    margin-top: 2px;
}

.subtitle {
    margin-top: 12px;
    padding-left: 2px;
    font-family: 'artifakt-thin', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 21px;
    color: var(--text-color);
    letter-spacing: 0.01em;
}

.portfolio-counter {
    margin-top: 17px;
    padding-left: 2px;
}

.portfolio-counter .chakra-text {
    font-size: 11px;
}

/* ─── Project Labels ─── */
.project-label {
    position: absolute;
    font-family: 'artifakt-thin', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-color);
    white-space: nowrap;
    z-index: 10;
    cursor: none;
    text-decoration: none;
    display: inline-block;
}

.project-label::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 100%; height: 1px;
    background: var(--text-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}

.project-label:hover::after {
    transform: scaleX(1);
}

/* ─── Project Hover Preview — Full Bleed ─── */
.project-preview {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
}

.project-preview.visible {
    opacity: 1;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── Fade-out everything else when hovering a project ─── */
.hero-hovering .composition,
.hero-hovering .top-bar,
.hero-hovering .bottom-bar,
.hero-hovering .grid-overlay,
.hero-hovering .portfolio-counter,
.hero-hovering #cursorGlow {
    opacity: 0 !important;
    transition: opacity 0.35s ease;
}

.hero-hovering .project-label {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.hero-hovering .project-label.active-label {
    opacity: 1;
    z-index: 20;
    color: #fff;
}

.hero-hovering .project-label.active-label::after {
    background: #fff;
}

/* Ensure smooth restore */
.composition,
.top-bar,
.bottom-bar,
.grid-overlay,
.project-label {
    transition: opacity 0.35s ease;
}

/* ═══════════════════════════════════════════════════════
   LOADING SCREEN
═══════════════════════════════════════════════════════ */
.loader-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
}

.loader-screen.lifting {
    animation: liftAway 0.9s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes liftAway {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

.loader-text {
    font-family: 'artifakt-thin', sans-serif;
    font-size: 26px;
    font-weight: 100;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-color);
}

/* ═══════════════════════════════════════════════════════
   INDEX / PROJECT GRID (below hero)
═══════════════════════════════════════════════════════ */
.index-section {
    position: relative;
    z-index: 1;
    padding: 80px var(--grid-margin) 120px;
}

.index-section .section-label {
    margin-bottom: 48px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}

.project-card {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.project-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    margin-bottom: 14px;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-card-image {
    opacity: 0.85;
}

.project-card-number {
    font-family: 'artifakt-thin', sans-serif;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.project-card-title {
    font-family: 'artifakt-thin', sans-serif;
    font-weight: 100;
    font-size: 28px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 4px;
}

.project-card-year {
    font-family: 'artifakt-thin', sans-serif;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .composition {
        left: calc(5 * var(--col-width));
    }

    .name-line {
        font-size: 54px;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .composition {
        left: 24px;
        top: 50%;
    }

    .name-line {
        font-size: 42px;
    }

    .subtitle {
        font-size: 12px;
    }

    .project-label {
        display: none;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .index-section {
        padding: 60px 24px 80px;
    }

    .loader-text {
        font-size: 18px;
    }
}
