/* muhan.dev - Anti-Design Cosmological Observatory */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    color: #B8B8C8;
    background: #0B0B12;
    overflow-x: hidden;
}

/* ===== CSS Custom Properties ===== */
:root {
    --void: #0B0B12;
    --surface: #16161F;
    --grid: #2D2D3A;
    --separator: #3A3A4F;
    --text-body: #B8B8C8;
    --text-heading: #E8E8F0;
    --accent-primary: #6C63FF;
    --accent-secondary: #00D4AA;
    --accent-warn: #F5A623;
}

/* ===== Generative Grid ===== */
.gen-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(to right, var(--grid) 0px, var(--grid) 1px, transparent 1px, transparent 60px),
        repeating-linear-gradient(to bottom, var(--grid) 0px, var(--grid) 1px, transparent 1px, transparent 60px);
    opacity: 0.15;
}

/* ===== Separator Pulse ===== */
.separator-pulse {
    position: fixed;
    left: 55%;
    top: 0;
    width: 1px;
    height: 100vh;
    background: var(--separator);
    z-index: 1;
    opacity: 0.3;
    animation: pulse-sep 8s ease-in-out infinite;
}

@keyframes pulse-sep {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.4; }
}

/* ===== Domain Anchor ===== */
.domain-anchor {
    position: fixed;
    top: 2rem;
    left: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--text-heading);
    z-index: 50;
    opacity: 0;
    animation: anchor-fade 1.2s ease 0s forwards;
}

@keyframes anchor-fade {
    to { opacity: 1; }
}

/* ===== Zones ===== */
.zone {
    position: relative;
    z-index: 2;
    padding: 20vh 4vw;
}

/* ===== Zone Identity ===== */
.zone-identity {
    display: grid;
    grid-template-columns: 55% 35%;
    gap: 10%;
    align-items: start;
    padding-top: 20vh;
}

/* ===== Zone Work ===== */
.zone-work {
    padding-top: 10vh;
}

.zone-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 4.5rem);
    color: var(--text-heading);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zone-heading.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Body Text ===== */
.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    color: var(--text-body);
    letter-spacing: 0.005em;
}

/* ===== Content Layout ===== */
.content-left,
.content-right {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.content-left.revealed,
.content-right.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Constellation ===== */
.constellation {
    margin-bottom: 1rem;
}

/* ===== Coordinate Labels ===== */
.coord-label {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 10px;
    color: var(--separator);
}

/* ===== Project Cards ===== */
.project-card {
    display: grid;
    grid-template-columns: 55% 35%;
    gap: 10%;
    margin-bottom: 4rem;
    background: var(--surface);
    border: 1px solid var(--grid);
    padding: 2rem;
    transform: scale(0.97);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card.revealed {
    transform: scale(1);
    opacity: 1;
}

.project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.08);
}

.project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-heading);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.project-desc {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1vw, 1rem);
    line-height: 1.65;
    color: var(--text-body);
}

.card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 0.5rem;
}

/* ===== Zone Thoughts ===== */
.zone-thoughts {
    padding-top: 15vh;
}

.thought-block {
    margin-bottom: 8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.thought-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

.thought-time {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 0.85em;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.thought-text {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.72;
    color: var(--text-body);
    max-width: 50ch;
}

/* ===== Zone Tail ===== */
.zone-tail {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.infinity-symbol {
    opacity: 0;
    transition: opacity 1s ease;
}

.infinity-symbol.revealed {
    opacity: 1;
}

.infinity-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: draw-infinity 3s linear infinite;
}

.infinity-symbol.revealed .infinity-path {
    animation: draw-infinity 3s linear infinite;
}

@keyframes draw-infinity {
    0% { stroke-dashoffset: 300; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -300; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .zone-identity,
    .project-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .separator-pulse {
        display: none;
    }

    .zone {
        padding: 10vh 1.5rem;
    }
}
