/* =========================================
   mujun.work — Y2K-futurism meets artisan leather
   Bento-box grid, serif-classic typography
   ========================================= */

/* Reset & Foundation */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0a;
    color: #d4d4d8;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Leather texture overlay */
#leather-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: multiply;
}

/* =========================================
   Bento Section & Grid
   ========================================= */
.bento-section {
    scroll-snap-align: start;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 3px;
    height: 100vh;
    width: 100%;
    background-color: #d4d4d8;
}

.bento-cell {
    background-color: #0a0a0a;
    position: relative;
    overflow: hidden;
}

/* =========================================
   Section 1: Landing Bento
   ========================================= */

/* Hero Cell: columns 1-8, rows 1-5 */
.cell-hero {
    grid-column: 1 / 9;
    grid-row: 1 / 6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 50%, rgba(139, 94, 60, 0.15) 0%, #0a0a0a 70%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-kanji {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 6.5rem);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #d4d4d8 0%, #8b5e3c 50%, #d4d4d8 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chrome-shift 30s linear infinite;
    text-shadow: none;
    line-height: 1.1;
}

@keyframes chrome-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d4d4d8;
    margin-top: 1rem;
    opacity: 0.6;
}

/* Date Cell: columns 9-12, rows 1-2 */
.cell-date {
    grid-column: 9 / 13;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background-color: #1a1a1e;
}

.date-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c7a5a;
    margin-bottom: 0.5rem;
}

.date-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.3rem);
    letter-spacing: 0.04em;
    color: #d4d4d8;
    background: linear-gradient(135deg, #d4d4d8, #00e5ff, #d4d4d8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographic 8s ease-in-out infinite;
}

@keyframes holographic {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.date-time {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: #d4d4d8;
    opacity: 0.4;
    margin-top: 0.3rem;
}

/* Status Cell: columns 9-12, rows 3-5 */
.cell-status {
    grid-column: 9 / 13;
    grid-row: 3 / 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    background-color: #1a1a1e;
    backdrop-filter: blur(10px);
    border-left: 1px dashed #5c7a5a;
}

.status-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00e5ff;
    margin-bottom: 0.75rem;
}

.status-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #d4d4d8;
    opacity: 0.8;
}

/* Navigation Cells */
.cell-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: 6 / 9;
}

#nav-work { grid-column: 1 / 5; }
#nav-thought { grid-column: 5 / 9; }
#nav-inquiry { grid-column: 9 / 13; }

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #d4d4d8;
    position: relative;
    padding-bottom: 4px;
}

.nav-kanji {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    letter-spacing: -0.03em;
    text-shadow: 1px 1px 0px #3a2518, -1px -1px 0px rgba(212, 212, 216, 0.1);
    transition: color 0.3s ease;
}

.nav-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00e5ff;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover .nav-label {
    opacity: 1;
}

.nav-link:hover .nav-kanji {
    color: #00e5ff;
}

/* =========================================
   Section 2: Work Bento
   ========================================= */

.cell-work-1 {
    grid-column: 1 / 8;
    grid-row: 1 / 6;
    border-right: 1px dashed #5c7a5a;
}

.cell-work-2 {
    grid-column: 8 / 13;
    grid-row: 1 / 4;
}

.cell-work-3 {
    grid-column: 8 / 13;
    grid-row: 4 / 6;
    border-top: 1px dashed #5c7a5a;
}

.cell-work-4 {
    grid-column: 1 / 6;
    grid-row: 6 / 9;
}

.cell-work-5 {
    grid-column: 6 / 13;
    grid-row: 6 / 9;
    border-left: 1px dashed #5c7a5a;
}

.cell-work {
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    background: radial-gradient(ellipse at 30% 70%, rgba(58, 37, 24, 0.3) 0%, #0a0a0a 80%);
}

.work-content {
    position: relative;
    z-index: 2;
}

.work-title {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    letter-spacing: -0.03em;
    color: #d4d4d8;
    text-shadow: 1px 1px 0px #3a2518, -1px -1px 0px rgba(212, 212, 216, 0.1);
    margin-bottom: 0.75rem;
}

.work-desc {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.65;
    color: #d4d4d8;
    opacity: 0.7;
    max-width: 40ch;
}

/* =========================================
   Section 3: Contradiction Bento
   ========================================= */

.cell-spear {
    grid-column: 1 / 7;
    grid-row: 1 / 7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: radial-gradient(ellipse at 70% 30%, rgba(0, 229, 255, 0.05) 0%, #0a0a0a 70%);
}

.cell-shield {
    grid-column: 7 / 13;
    grid-row: 1 / 7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: radial-gradient(ellipse at 30% 70%, rgba(139, 94, 60, 0.1) 0%, #0a0a0a 70%);
}

.contradiction-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 32ch;
}

.contradiction-kanji {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.03em;
    display: block;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #d4d4d8 0%, #8b5e3c 50%, #d4d4d8 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chrome-shift 30s linear infinite;
}

.contradiction-title {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    letter-spacing: -0.03em;
    color: #d4d4d8;
    text-shadow: 1px 1px 0px #3a2518, -1px -1px 0px rgba(212, 212, 216, 0.1);
    margin-bottom: 1rem;
}

.contradiction-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.7;
    color: #d4d4d8;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.contradiction-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00e5ff;
    opacity: 0.7;
}

/* Contact Cell */
.cell-contact {
    grid-column: 1 / 13;
    grid-row: 7 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1e;
    border-top: 1px dashed #5c7a5a;
}

.contact-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c7a5a;
}

.contact-link {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.3vw, 1.2rem);
    color: #d4d4d8;
    text-decoration: none;
    position: relative;
    letter-spacing: 0;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00e5ff;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-link:hover::after {
    width: 100%;
}

.contact-divider {
    color: #d4d4d8;
    opacity: 0.2;
}

.contact-note {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #d4d4d8;
    opacity: 0.4;
    font-style: italic;
}

/* =========================================
   Decorative Elements
   ========================================= */

/* Ginkgo leaves */
.ginkgo-leaf {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.ginkgo-hero {
    width: 120px;
    height: auto;
    top: 10%;
    right: 15%;
    transform: rotate(-25deg);
}

.ginkgo-work-1 {
    width: 80px;
    height: auto;
    top: 8%;
    left: 5%;
    transform: rotate(15deg);
}

.ginkgo-work-5 {
    width: 90px;
    height: auto;
    bottom: 10%;
    right: 8%;
    transform: rotate(-45deg);
}

.ginkgo-spear {
    width: 100px;
    height: auto;
    bottom: 8%;
    left: 10%;
    transform: rotate(30deg);
}

/* Enso circles */
.enso-large {
    position: absolute;
    width: 60%;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.enso-small {
    position: absolute;
    width: 30%;
    height: auto;
    top: 10%;
    right: 10%;
    pointer-events: none;
    z-index: 1;
}

/* Root lines */
.root-lines {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    pointer-events: none;
    z-index: 1;
}

.root-work {
    width: 60%;
    height: 30%;
}

/* Stitch lines */
.stitch-line {
    position: absolute;
    pointer-events: none;
}

.stitch-left {
    left: 0;
    top: 10%;
    height: 80%;
    width: 0;
    border-left: 1px dashed #5c7a5a;
}

.stitch-top {
    top: 0;
    left: 10%;
    width: 80%;
    height: 0;
    border-top: 1px dashed #5c7a5a;
}

/* =========================================
   Mobile Layout
   ========================================= */
@media (max-width: 768px) {
    html {
        scroll-snap-type: none;
    }

    .bento-section {
        height: auto;
        min-height: 100vh;
    }

    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 3px;
        height: auto;
        min-height: 100vh;
    }

    .cell-hero {
        min-height: 50vh;
        padding: 2rem;
    }

    .cell-date {
        min-height: 15vh;
        padding: 1.5rem;
    }

    .cell-status {
        min-height: 20vh;
        padding: 1.5rem;
    }

    .cell-nav {
        min-height: 12vh;
        padding: 1rem;
    }

    .cell-work {
        min-height: 30vh;
        padding: 1.5rem;
    }

    .cell-spear,
    .cell-shield {
        min-height: 40vh;
        padding: 2rem;
    }

    .cell-contact {
        min-height: 15vh;
        padding: 1.5rem;
    }

    .hero-kanji {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .contradiction-kanji {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .contact-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .contact-divider {
        display: none;
    }

    .ginkgo-hero {
        width: 80px;
    }

    .enso-large {
        width: 80%;
    }
}

/* =========================================
   Selection styling
   ========================================= */
::selection {
    background-color: rgba(0, 229, 255, 0.2);
    color: #d4d4d8;
}