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

:root {
    --cream: #FFF8F4;
    --peachy: #FFF0EA;
    --peach: #F8E0D4;
    --dust-rose: #E8C8D8;
    --muted-pink: #D4A0B8;
    --deep-mauve: #4A2038;
    --muted-plum: #5A3A4A;
    --dusty-mauve: #9A7A8A;
    --golden: #C8A878;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--cream);
    color: var(--muted-plum);
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* Metallic Ribbon Navigation */
.metallic-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, #F0D0E0, #E0B0C8, #F0D0E0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 100;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bento Box Container */
.bento-box-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(auto-fill, 200px);
    gap: 12px;
    padding: 80px 24px 24px;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--cream);
    border: 3px solid var(--muted-pink);
    border-radius: 4px;
    box-shadow: inset 0 0 0 16px var(--cream);
}

.bento-cell {
    position: relative;
    border: 2px solid var(--dust-rose);
    border-radius: 4px;
    padding: 16px;
    background-color: var(--peachy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    animation: cellReveal 0.3s ease-out forwards;
    opacity: 0;
}

.bento-cell:nth-child(2) { animation-delay: 0.06s; }
.bento-cell:nth-child(3) { animation-delay: 0.12s; }
.bento-cell:nth-child(4) { animation-delay: 0.18s; }
.bento-cell:nth-child(5) { animation-delay: 0.24s; }
.bento-cell:nth-child(6) { animation-delay: 0.30s; }
.bento-cell:nth-child(7) { animation-delay: 0.36s; }
.bento-cell:nth-child(8) { animation-delay: 0.42s; }
.bento-cell:nth-child(9) { animation-delay: 0.48s; }
.bento-cell:nth-child(10) { animation-delay: 0.54s; }

@keyframes cellReveal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bento-cell-large {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-cell:hover .glossy-shine {
    animation: glossySweep 0.6s ease-in-out;
}

.bento-cell:hover .cultural-icon {
    transform: rotateZ(5deg);
    transition: transform 0.2s ease-out;
}

@keyframes glossySweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.glossy-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

/* Cultural Icons */
.cultural-icon {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 16px;
    height: 16px;
    color: var(--muted-pink);
    opacity: 0.4;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cultural-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

/* Typography */
.domain-text {
    font-family: 'Recursive', sans-serif;
    font-weight: 700;
    font-size: 38px;
    color: var(--deep-mauve);
    margin: 0;
    line-height: 1;
}

.subtitle-text {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--dusty-mauve);
    margin-top: 8px;
    margin-bottom: 0;
}

.entry-title {
    font-family: 'Recursive', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--deep-mauve);
    margin: 12px 0;
    min-height: 1.4em;
}

.entry-code {
    font-family: 'Courier Prime', monospace;
    font-weight: 400;
    font-size: 11px;
    color: var(--dusty-mauve);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 8px;
}

.footer-text {
    font-family: 'Courier Prime', monospace;
    font-weight: 400;
    font-size: 13px;
    color: var(--dusty-mauve);
    text-align: center;
    letter-spacing: 0.02em;
}

/* Isometric Icons */
.isometric-icon {
    width: 64px;
    height: 64px;
    display: block;
    margin: 8px auto;
}

/* Typewriter Effect */
.typewriter-text {
    position: relative;
    display: inline-block;
}

.typewriter-text::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--muted-pink);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 49%, 100% { opacity: 1; }
    50%, 99% { opacity: 0; }
}

/* Cell Variants */
.cell-large {
    grid-column: span 2;
}

.cell-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    background: linear-gradient(135deg, var(--peachy), var(--peach));
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-box-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 80px 20px 20px;
    }

    .bento-cell {
        grid-column: span 1 !important;
    }

    .domain-text {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .bento-box-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 80px 16px 16px;
    }

    .domain-text {
        font-size: 22px;
    }

    .entry-title {
        font-size: 14px;
    }

    .entry-code {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .bento-box-container {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 70px 12px 12px;
    }

    .domain-text {
        font-size: 20px;
    }

    .isometric-icon {
        width: 48px;
        height: 48px;
    }
}
