/* ============================================================
   TESSERACT NAVIGATION — Styles
   The tesseract IS the homepage. Touch-first. 3D navigation.
   ============================================================ */

/* --- Home Section Layout --- */
.section--home {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    padding: 0;
}

/* --- Active Projects Preview (above tesseract) --- */
.home-projects-preview {
    padding: 16px;
    background: var(--off-white);
    border-bottom: 1px solid var(--gray-border);
}

.home-projects-preview .section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.project-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-left: 3px solid var(--red);
    padding: 12px 14px;
    border-radius: 4px;
}

.project-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.project-card__status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.project-card__status--active {
    color: var(--red);
}

.project-card__status--complete {
    color: #2E8B57;
}

.project-card__status--available {
    color: #2563EB;
}

.project-card__status--new {
    color: #D97706;
}

.project-card__status--filed {
    color: #7C3AED;
}

.project-card--clickable {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.project-card--clickable:hover {
    border-color: var(--red);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.15);
}

.project-card__desc {
    font-size: 13px;
    color: var(--gray-mid);
    line-height: 1.4;
}

/* --- Tesseract Container --- */
.tesseract-container {
    flex: 1;
    min-height: 300px;
    position: relative;
    touch-action: none;
    cursor: grab;
    background: var(--white);
}

.tesseract-container:active {
    cursor: grabbing;
}

.tesseract-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* --- Tesseract Node Labels (CSS overlay on Three.js) --- */
.tesseract-label {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--black);
    background: rgba(255, 255, 255, 0.85);
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid var(--gray-border);
    pointer-events: auto;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
    -webkit-user-select: none;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tesseract-label:hover,
.tesseract-label:focus {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    transform: scale(1.1);
}

.tesseract-label--near {
    opacity: 1;
    font-size: 12px;
}

.tesseract-label--far {
    opacity: 0.4;
    font-size: 9px;
}

/* --- Hint Text --- */
.tesseract-hint {
    text-align: center;
    font-size: 12px;
    color: var(--gray-mid);
    padding: 8px;
    letter-spacing: 0.5px;
}

/* --- Desktop --- */
@media (min-width: 768px) {
    .project-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tesseract-container {
        min-height: 450px;
    }

    .tesseract-label {
        font-size: 12px;
    }
}

@media (min-width: 1024px) {
    .section--home {
        flex-direction: row;
    }

    .home-projects-preview {
        width: 320px;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid var(--gray-border);
        overflow-y: auto;
        max-height: calc(100vh - var(--header-height));
    }

    .project-cards {
        grid-template-columns: 1fr;
    }

    .tesseract-container {
        flex: 1;
        min-height: calc(100vh - var(--header-height));
    }

    .tesseract-hint {
        position: absolute;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
    }

    .tesseract-label {
        font-size: 13px;
        padding: 6px 12px;
    }
}
