/* ==========================================================================
   mujun.works — Dark-mode retro-futuristic paradox workspace
   Colors: #0a0b14, #12132a, #1c1e3a, #2a2d52, #5a5e7a, #9b9fb8, #e0e4f0, #e930a8, #f0a030
   Fonts: Bebas Neue (display), Space Grotesk (body), Inter (small text)
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body.mujun-works {
    background-color: #0a0b14;
    color: #e0e4f0;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Noise Overlay --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Circuit Layer --- */
.circuit-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.circuit-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.circuit-svg.visible {
    opacity: 1;
}

.circuit-trace {
    fill: none;
    stroke: #2a2d52;
    stroke-width: 1;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease;
}

.circuit-svg.visible .circuit-trace {
    stroke-dashoffset: 0;
}

.circuit-node {
    fill: #2a2d52;
    opacity: 0;
    transition: opacity 1s ease 1.5s;
}

.circuit-svg.visible .circuit-node {
    opacity: 1;
}

/* --- Progress Rail --- */
.progress-rail {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 500;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #5a5e7a;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: border-color 0.4s ease;
}

.dot.active {
    background: #e930a8;
    box-shadow: 0 0 12px rgba(233, 48, 168, 0.5);
}

.dot.active::before {
    border-color: rgba(233, 48, 168, 0.3);
}

.dot:hover {
    background: #e0e4f0;
    transform: scale(1.3);
}

/* --- Content Stream --- */
.content-stream {
    position: relative;
    z-index: 10;
}

/* --- Panels --- */
.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.panel__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Slide-reveal animation base */
.panel--from-left .glass-card {
    transform: translateX(-80px);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.panel--from-right .glass-card {
    transform: translateX(80px);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.panel.in-view .glass-card {
    transform: translateX(0);
    opacity: 1;
}

/* --- Glassmorphic Cards --- */
.glass-card {
    background: rgba(28, 30, 58, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(90, 94, 122, 0.25);
    border-radius: 4px;
    padding: clamp(2rem, 4vw, 3.5rem);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(233, 48, 168, 0.4), transparent);
}

.glass-card--hero {
    max-width: 700px;
}

.glass-card--offset-right {
    margin-left: auto;
    max-width: 680px;
}

.glass-card--offset-left {
    margin-right: auto;
    max-width: 680px;
}

.glass-card--contact {
    max-width: 600px;
}

/* --- Typography --- */
.headline {
    font-family: 'Bebas Neue', cursive;
    text-transform: uppercase;
    color: #e0e4f0;
    line-height: 0.95;
    letter-spacing: -0.02em;
}

.headline--hero {
    font-size: clamp(3rem, 10vw, 8rem);
    margin-bottom: 0.5rem;
}

.headline__dot {
    color: #e930a8;
}

.headline--section {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    margin-bottom: 1rem;
}

.subtext {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    color: #9b9fb8;
    font-size: clamp(1rem, 2vw, 1.25rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.subtext--hero {
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'Inter', 'Space Grotesk', sans-serif;
    font-weight: 300;
    color: #9b9fb8;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    line-height: 1.7;
    max-width: 540px;
}

.body-text--hero {
    margin-top: 1rem;
}

/* --- Kanji Mark --- */
.kanji-mark {
    font-family: serif;
    font-size: clamp(3rem, 6vw, 5rem);
    color: rgba(233, 48, 168, 0.12);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 1rem;
    user-select: none;
}

.kanji-mark--small {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-top: 2rem;
    margin-bottom: 0;
    color: rgba(233, 48, 168, 0.08);
}

/* --- Divider Line --- */
.divider-line {
    width: 60px;
    height: 2px;
    background: #e930a8;
    margin: 1.5rem 0;
    position: relative;
}

.divider-line--pink {
    background: #e930a8;
}

.divider-line--amber {
    background: #f0a030;
}

.divider-line::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: inherit;
}

/* --- Floating Glyphs --- */
.floating-glyph {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.floating-glyph--spear {
    top: 10%;
    right: 8%;
    width: 40px;
    animation: floatSpear 6s ease-in-out infinite;
}

.floating-glyph--shield {
    bottom: 15%;
    right: 15%;
    width: 60px;
    animation: floatShield 7s ease-in-out infinite;
}

.glyph-svg {
    width: 100%;
    height: auto;
}

@keyframes floatSpear {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes floatShield {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(15px) rotate(-3deg); }
}

/* --- Stat Row --- */
.stat-row {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(90, 94, 122, 0.2);
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-number {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    color: #e0e4f0;
    line-height: 1;
}

.stat-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #5a5e7a;
}

/* --- Process Grid --- */
.process-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.process-step {
    padding: 1.2rem;
    border: 1px solid rgba(90, 94, 122, 0.15);
    border-radius: 3px;
    position: relative;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.process-step:hover {
    border-color: rgba(233, 48, 168, 0.3);
    background: rgba(233, 48, 168, 0.03);
}

.step-index {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    color: rgba(240, 160, 48, 0.3);
    line-height: 1;
    display: block;
    margin-bottom: 0.5rem;
}

.step-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.3rem;
    color: #e0e4f0;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.step-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #9b9fb8;
    line-height: 1.6;
}

/* --- Works List --- */
.works-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1.5rem;
}

.work-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(90, 94, 122, 0.12);
    transition: background 0.3s ease, padding-left 0.3s ease;
}

.work-item:hover {
    background: rgba(233, 48, 168, 0.03);
    padding-left: 0.5rem;
}

.work-id {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem;
    color: #5a5e7a;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.work-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: #e0e4f0;
    flex: 1;
}

.work-status {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.work-status--active {
    color: #e930a8;
    border: 1px solid rgba(233, 48, 168, 0.3);
}

.work-status--complete {
    color: #f0a030;
    border: 1px solid rgba(240, 160, 48, 0.3);
}

.work-status--pending {
    color: #5a5e7a;
    border: 1px solid rgba(90, 94, 122, 0.3);
}

/* --- Contact Grid --- */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none;
    color: inherit;
    padding: 0.8rem;
    border-left: 2px solid #2a2d52;
    transition: border-color 0.3s ease;
}

.contact-link:hover {
    border-color: #e930a8;
}

a.contact-link:hover .contact-value {
    color: #e930a8;
}

.contact-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #5a5e7a;
}

.contact-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: #e0e4f0;
    transition: color 0.3s ease;
}

/* --- Panel-specific backgrounds --- */
.panel--hero {
    background: radial-gradient(ellipse at 20% 50%, rgba(28, 30, 58, 0.8) 0%, transparent 70%);
}

.panel--philosophy {
    background: radial-gradient(ellipse at 80% 50%, rgba(28, 30, 58, 0.6) 0%, transparent 70%);
}

.panel--process {
    background: radial-gradient(ellipse at 20% 50%, rgba(42, 45, 82, 0.4) 0%, transparent 70%);
}

.panel--works {
    background: radial-gradient(ellipse at 80% 50%, rgba(28, 30, 58, 0.6) 0%, transparent 70%);
}

.panel--contact {
    background: radial-gradient(ellipse at 30% 60%, rgba(42, 45, 82, 0.5) 0%, transparent 70%);
}

/* --- Diagonal Drift Lines --- */
.panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        165deg,
        transparent 0%,
        transparent 48%,
        rgba(42, 45, 82, 0.08) 48%,
        rgba(42, 45, 82, 0.08) 52%,
        transparent 52%,
        transparent 100%
    );
    pointer-events: none;
    z-index: -1;
}


/* --- Accent teal color from palette --- */
.glass-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 204, 0.2), transparent);
}

.dot:hover {
    background: #00E5CC;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .progress-rail {
        right: 1rem;
        gap: 0.8rem;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .panel {
        padding: 3rem 1.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .glass-card--offset-right,
    .glass-card--offset-left {
        max-width: 100%;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .stat-row {
        gap: 1.5rem;
    }

    .work-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .floating-glyph {
        display: none;
    }

    .panel--from-left .glass-card {
        transform: translateX(-40px);
    }

    .panel--from-right .glass-card {
        transform: translateX(40px);
    }
}

@media (max-width: 480px) {
    .headline--hero {
        font-size: 3rem;
    }

    .headline--section {
        font-size: 2.2rem;
    }

    .stat-row {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
