/* miris.works — Zen-Punk Portfolio */
/* Wabi-sabi meets rebellion */

:root {
    --bg-linen: #f0e8d8;
    --bg-sumi: #1a1610;
    --bg-paper: #d9cdb7;
    --text-dark: #1a1610;
    --text-light: #d4c8b8;
    --text-secondary: #8b8275;
    --accent-copper: #5a8a6e;
    --accent-persimmon: #c4533a;
    --accent-indigo: #3a4a7a;
    --accent-bone: #8b8275;
    --accent-oxidized: #8b6a4f;
    --spring-tension: 0.15;
    --spring-friction: 0.7;
    --spring-mass: 1.2;
}

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

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

body {
    background-color: var(--bg-linen);
    color: var(--text-dark);
    font-family: 'Crimson Pro', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ===== SECTION INDICATOR ===== */
.section-indicator {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    pointer-events: none;
}

.section-indicator-text {
    font-family: 'Syne Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-oxidized);
    opacity: 0.7;
    transition: opacity 0.6s ease;
}

/* ===== SECTIONS BASE ===== */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ===== OPENING VOID ===== */
.section-void {
    min-height: 100vh;
    background: var(--bg-linen);
}

.void-mark {
    position: absolute;
    top: 25%;
    left: 15%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.void-mark.visible {
    opacity: 1;
    transform: translateY(0);
}

.mark-text {
    display: block;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 300;
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--text-dark);
}

.mark-sub {
    display: block;
    font-family: 'Syne Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-oxidized);
    margin-top: 1rem;
}

.botanical-bleed {
    position: absolute;
    right: -40px;
    top: 10%;
    width: 35vw;
    max-width: 400px;
    height: auto;
    opacity: 0;
    transition: opacity 2s ease;
}

.botanical-bleed.visible {
    opacity: 0.8;
}

.botanical-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.botanical-path.drawn {
    stroke-dashoffset: 0;
}

.circuit-trace {
    transition: stroke-dashoffset 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.5s;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeInHint 2s ease 2s forwards;
}

@keyframes fadeInHint {
    to { opacity: 0.6; }
}

.scroll-hint-text {
    font-family: 'Syne Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent-bone);
}

.scroll-hint-line {
    width: 1px;
    height: 40px;
    background: var(--accent-bone);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.3; }
    50% { transform: scaleY(1.5); opacity: 0.8; }
}

/* ===== PANELS ===== */
.panel {
    position: relative;
    max-width: 75vw;
    padding: 4rem 3rem;
    background: var(--bg-paper);
    opacity: 0;
    transform: translateY(40px);
}

.panel.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--panel-rotate, 0deg));
}

.panel-1 {
    --panel-rotate: -1.5deg;
    margin-left: -5vw;
}

.panel-2 {
    --panel-rotate: 2deg;
    margin-right: -5vw;
    background: var(--bg-linen);
    border-left: 3px solid var(--accent-indigo);
}

.panel-3 {
    --panel-rotate: -1deg;
    margin-left: 5vw;
}

.panel-4 {
    --panel-rotate: 1.5deg;
    margin-right: -3vw;
    background: var(--bg-paper);
}

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

/* ===== TORN EDGES ===== */
.torn-edge-bottom {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 20px;
    background: inherit;
    clip-path: polygon(
        0% 0%, 3% 60%, 7% 20%, 12% 70%, 16% 30%, 20% 80%,
        25% 15%, 30% 65%, 35% 25%, 40% 75%, 44% 35%, 48% 85%,
        52% 20%, 56% 70%, 60% 30%, 65% 80%, 70% 10%, 75% 60%,
        80% 25%, 85% 75%, 90% 35%, 94% 65%, 97% 20%, 100% 0%
    );
}

.torn-edge-top {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 20px;
    background: inherit;
    clip-path: polygon(
        0% 100%, 4% 30%, 8% 80%, 13% 25%, 18% 70%, 22% 40%,
        27% 85%, 32% 30%, 37% 75%, 42% 20%, 47% 65%, 52% 35%,
        57% 80%, 62% 25%, 67% 70%, 72% 15%, 77% 60%, 82% 30%,
        87% 75%, 91% 40%, 95% 70%, 98% 35%, 100% 100%
    );
}

/* ===== HEADINGS ===== */
.heading {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 0.95;
    margin-bottom: 2rem;
}

.heading-contemplative {
    font-weight: 300;
    color: var(--text-dark);
}

.heading-rebellious {
    font-weight: 900;
    color: var(--accent-persimmon);
}

.body-text {
    font-family: 'Crimson Pro', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    color: #4a3f35;
    max-width: 60ch;
    margin-bottom: 1.5rem;
}

/* ===== BREATHING SECTIONS ===== */
.section-breath {
    min-height: 100vh;
    background: var(--bg-linen);
    flex-direction: column;
    gap: 3rem;
}

.section-breath-dark {
    background: var(--bg-sumi);
}

.breath-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.botanical-bamboo {
    width: 200px;
    height: auto;
    opacity: 0;
    transition: opacity 2s ease;
}

.botanical-bamboo.visible {
    opacity: 0.7;
}

.haiku-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding-left: 20vw;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.haiku-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.haiku-center {
    align-items: center;
    padding-left: 0;
}

.haiku-line {
    font-family: 'Crimson Pro', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* ===== CONCENTRIC CIRCLES ===== */
.concentric-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vmin;
    height: 80vmin;
}

.circles-svg {
    width: 100%;
    height: 100%;
}

.zen-circle {
    transform-origin: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.single-phrase {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2s ease, transform 2s ease;
}

.single-phrase.visible {
    opacity: 1;
    transform: translateY(0);
}

.phrase-text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.1em;
    color: var(--text-light);
    line-height: 1.4;
}

/* ===== WORKS GRID ===== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.work-item {
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.work-item.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--item-rotate, 0deg));
}

.work-item:nth-child(1) {
    grid-column: 1 / 7;
    --item-rotate: -1deg;
    border-bottom: 2px solid var(--accent-copper);
}

.work-item:nth-child(2) {
    grid-column: 8 / 15;
    --item-rotate: 1.5deg;
    border-bottom: 2px solid var(--accent-persimmon);
}

.work-item:nth-child(3) {
    grid-column: 3 / 12;
    --item-rotate: -0.5deg;
    border-bottom: 2px solid var(--accent-indigo);
}

.work-number {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 900;
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 0.85;
    color: var(--accent-bone);
    opacity: 0.15;
    position: absolute;
    top: -10px;
    right: 10px;
}

.work-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.work-desc {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.7;
    color: #4a3f35;
    max-width: 45ch;
    margin-bottom: 1rem;
}

.work-meta {
    font-family: 'Syne Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-oxidized);
}

/* ===== STAMP MARKS ===== */
.stamp-mark {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--accent-persimmon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.15;
    transform: rotate(-15deg);
    z-index: 1;
}

.stamp-1 {
    top: 20px;
    right: 30px;
}

.stamp-2 {
    top: 15px;
    left: 25px;
}

.stamp-text {
    font-family: 'Syne Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-persimmon);
    text-align: center;
    line-height: 1.3;
}

/* ===== PHILOSOPHY ===== */
.philosophy-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 1rem;
}

.philosophy-heading {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-indigo);
    margin-bottom: 1rem;
}

.botanical-seedpod {
    position: absolute;
    right: 5vw;
    bottom: 5vh;
    width: 150px;
    height: auto;
    opacity: 0;
    transition: opacity 2s ease;
}

.botanical-seedpod.visible {
    opacity: 0.6;
}

/* ===== MOSS FIELD ===== */
.moss-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.moss-pixel {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-copper);
    opacity: 0;
    transition: opacity 1.5s ease, transform 2s ease;
}

.moss-pixel.visible {
    opacity: 0.3;
}

.moss-pixel.dissolve {
    opacity: 0;
    transform: scale(2);
}

/* ===== ABOUT SECTION ===== */
.section-about {
    background: var(--bg-linen);
}

/* ===== TERMINAL COLLISION ===== */
.section-terminal {
    min-height: 100vh;
    background: var(--bg-sumi);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
}

.terminal-layer {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.terminal-layer-1 {
    transform: translate(-30%, -20%) rotate(-5deg);
}

.terminal-layer-2 {
    transform: translate(25%, 10%) rotate(3deg);
}

.terminal-layer-3 {
    transform: translate(-10%, 30%) rotate(-2deg);
}

.terminal-layer.visible {
    opacity: 1;
}

.terminal-layer-1.visible {
    transform: translate(-15%, -15%) rotate(-3deg);
}

.terminal-layer-2.visible {
    transform: translate(10%, 5%) rotate(2deg);
}

.terminal-layer-3.visible {
    transform: translate(5%, 20%) rotate(-1deg);
}

.terminal-text-large {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 900;
    font-size: clamp(6rem, 15vw, 14rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 0.85;
}

.terminal-layer-1 .terminal-text-large {
    color: var(--accent-copper);
    opacity: 0.4;
}

.terminal-layer-2 .terminal-text-large {
    color: var(--accent-persimmon);
    opacity: 0.5;
}

.terminal-layer-3 .terminal-text-large {
    color: var(--accent-indigo);
    opacity: 0.4;
}

.terminal-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1.5s ease 0.8s, transform 1.5s ease 0.8s;
}

.terminal-overlay.visible {
    opacity: 1;
    transform: scale(1);
}

.terminal-final {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.terminal-mark {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 300;
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--text-light);
    letter-spacing: 0.3em;
}

.terminal-url {
    font-family: 'Syne Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.25em;
    text-transform: lowercase;
    color: var(--accent-bone);
}

.botanical-final {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 2s ease;
}

.botanical-final.visible {
    opacity: 0.4;
}

/* ===== CROSSHATCH OVERLAY ===== */
.panel-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='0' y1='0' x2='0' y2='8' stroke='%238b8275' stroke-width='0.3' opacity='0.08' transform='rotate(45 4 4)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ===== SVG DEFS ===== */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section-indicator {
        display: none;
    }

    .panel {
        max-width: 90vw;
        padding: 2.5rem 1.5rem;
    }

    .panel-1, .panel-2, .panel-3, .panel-4 {
        margin-left: 0;
        margin-right: 0;
    }

    .philosophy-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .work-item:nth-child(1),
    .work-item:nth-child(2),
    .work-item:nth-child(3) {
        grid-column: 1 / -1;
    }

    .void-mark {
        left: 10%;
    }

    .haiku-text {
        padding-left: 10vw;
    }

    .botanical-bleed {
        width: 50vw;
        right: -20px;
    }
}

@media (max-width: 480px) {
    .heading {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .terminal-text-large {
        font-size: clamp(3rem, 12vw, 6rem);
    }
}