/* ppuzzl.dev — Bauhaus-Botanical Design System */

:root {
    --cyan: #00f0ff;
    --magenta: #ff2daa;
    --chartreuse: #b8ff00;
    --light-ground: #fafafa;
    --dark-ground: #0a0a14;
    --mid-dark: #0d0d1a;
    --text-light: #2a2a35;
    --text-dark: #e0daf0;
    --skew-angle: -12deg;
    --counter-skew: 12deg;
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.25);
    --glow-magenta: 0 0 20px rgba(255, 45, 170, 0.25);
    --glow-chartreuse: 0 0 20px rgba(184, 255, 0, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: var(--text-light);
    background: var(--light-ground);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h3 {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

p {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
}

.annotation {
    font-family: 'Kalam', cursive;
    font-weight: 300;
    font-size: 0.85rem;
}

code, .code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.9rem;
    background: rgba(0, 240, 255, 0.08);
    border-radius: 3px;
    padding: 0.1em 0.3em;
}

/* Navigation Circle */
.nav-circle {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--cyan);
    background: rgba(250, 250, 250, 0.7);
    backdrop-filter: blur(2px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    color: var(--text-light);
    box-shadow: var(--glow-cyan);
}

.nav-circle:hover {
    border-color: var(--magenta);
    box-shadow: var(--glow-magenta);
}

.nav-circle.is-open {
    border-color: var(--magenta);
    background: rgba(10, 10, 20, 0.8);
    color: var(--text-dark);
}

.nav-line {
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-circle.is-open .nav-line--1 {
    transform: translateY(4px) rotate(45deg);
}

.nav-circle.is-open .nav-line--2 {
    opacity: 0;
}

.nav-circle.is-open .nav-line--3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(10, 10, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.nav-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.nav-list {
    list-style: none;
    text-align: center;
}

.nav-list li {
    margin: 1.5rem 0;
}

.nav-link {
    font-family: 'Caveat', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--cyan);
    text-shadow: var(--glow-cyan);
}

/* Panel System — Diagonal Sections */
.panel {
    position: relative;
    overflow: hidden;
}

.panel--seed {
    min-height: 100vh;
    background: var(--light-ground);
}

.panel--roots {
    min-height: 120vh;
    background: var(--mid-dark);
    margin-top: -8vw;
}

.panel--branching {
    min-height: 100vh;
    background: var(--light-ground);
    margin-top: -8vw;
}

.panel--bloom {
    min-height: 120vh;
    background: var(--dark-ground);
    margin-top: -8vw;
}

.panel--stillness {
    min-height: 80vh;
    background: var(--light-ground);
    margin-top: -8vw;
}

.panel__skew {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    clip-path: polygon(0 8vw, 100% 0, 100% calc(100% - 8vw), 0 100%);
}

.panel--seed .panel__skew {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8vw), 0 100%);
}

.panel--stillness .panel__skew {
    clip-path: polygon(0 8vw, 100% 0, 100% 100%, 0 100%);
}

/* Diagonal Line Pattern */
.diagonal-lines {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        102deg,
        rgba(0, 240, 255, 0.06) 0px,
        rgba(0, 240, 255, 0.06) 1px,
        transparent 1px,
        transparent 80px
    );
    pointer-events: none;
}

.diagonal-lines--dark {
    background-image: repeating-linear-gradient(
        102deg,
        rgba(0, 240, 255, 0.04) 0px,
        rgba(0, 240, 255, 0.04) 1px,
        transparent 1px,
        transparent 80px
    );
}

.diagonal-lines--faded {
    background-image: repeating-linear-gradient(
        102deg,
        rgba(0, 240, 255, 0.02) 0px,
        rgba(0, 240, 255, 0.02) 1px,
        transparent 1px,
        transparent 80px
    );
}

/* Panel Content */
.panel__content {
    position: relative;
    z-index: 2;
    padding: clamp(4rem, 10vw, 8rem) clamp(2rem, 8vw, 12rem);
    max-width: 900px;
}

.panel--roots .panel__content,
.panel--bloom .panel__content {
    color: var(--text-dark);
}

/* Panel 1 — The Seed */
.seed-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bauhaus-bloom--hero {
    width: clamp(280px, 40vw, 420px);
    height: clamp(280px, 40vw, 420px);
    filter: drop-shadow(var(--glow-cyan));
    animation: seedPulse 4s ease-in-out infinite;
}

.bloom__petal {
    fill: none;
}

.bloom__center {
    fill: none;
    filter: drop-shadow(var(--glow-cyan));
}

.seed-circle__logo {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--text-light);
    letter-spacing: 0.05em;
}

@keyframes seedPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.25));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 35px rgba(0, 240, 255, 0.4));
    }
}

/* Panel 2 — The Roots */
.root-illustration {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50%;
    height: 80%;
    opacity: 0.6;
    z-index: 1;
}

.flowing-curve {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.roots__heading {
    color: var(--cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 2rem;
}

.roots__text {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.roots__annotation {
    color: var(--magenta);
    margin-top: 1rem;
}

/* Panel 3 — The Branching */
.branching-composition {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.panel__content--branching {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.branch-label {
    position: absolute;
    left: var(--x, 10%);
    top: var(--y, 20%);
    z-index: 3;
}

.branch-label .annotation {
    color: var(--text-light);
    background: rgba(250, 250, 250, 0.85);
    padding: 0.3em 0.8em;
    border-left: 2px solid var(--cyan);
    display: inline-block;
}

.branching__title {
    position: absolute;
    left: 35%;
    top: 70%;
    z-index: 3;
}

.branching__title h2 {
    color: var(--text-light);
    font-size: clamp(2rem, 5vw, 4rem);
}

/* Panel 4 — The Bloom */
.bloom-illustration {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.bloom-illustration--left {
    left: -5%;
    top: 10%;
    width: 45%;
    height: auto;
    opacity: 0.7;
}

.bloom-illustration--right {
    right: -5%;
    bottom: 15%;
    width: 35%;
    height: auto;
    opacity: 0.5;
}

.neon-bloom {
    mix-blend-mode: screen;
}

.bloom__heading {
    color: var(--magenta);
    text-shadow: var(--glow-magenta);
    margin-bottom: 3rem;
}

.bloom__projects {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    z-index: 2;
}

.project-card {
    border-left: 2px solid var(--cyan);
    padding: 1.5rem 2rem;
    background: rgba(0, 240, 255, 0.03);
    max-width: 550px;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.project-card:hover {
    border-color: var(--magenta);
    background: rgba(255, 45, 170, 0.05);
}

.project-card__label {
    color: var(--chartreuse);
    display: block;
    margin-bottom: 0.5rem;
}

.project-card__title {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.project-card__desc {
    color: var(--text-dark);
    opacity: 0.85;
    font-size: 0.95rem;
}

/* Panel 5 — The Stillness */
.panel__content--stillness {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80vh;
}

.convergence-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.stillness__haiku {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--text-light);
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.stillness__mark {
    width: 40px;
    height: 40px;
    margin-top: 3rem;
}

/* Grid Pulse */
.grid-pulse {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.grid-pulse.is-visible {
    opacity: 1;
}

.pulse-dot {
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.pulse-dot.is-active {
    opacity: 0.8;
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
}

/* Fade Reveal Animations */
.fade-reveal {
    opacity: 0;
    transform: translate(8px, 30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* SVG Stroke Draw Animation */
.root-line,
.neon-bloom circle,
.neon-bloom line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.2s ease-out;
}

.root-line.is-drawn,
.neon-bloom.is-drawn circle,
.neon-bloom.is-drawn line {
    stroke-dashoffset: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .panel__content {
        padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
    }

    .bloom-illustration--left {
        width: 60%;
        opacity: 0.4;
    }

    .bloom-illustration--right {
        width: 50%;
        opacity: 0.3;
    }

    .root-illustration {
        width: 70%;
        opacity: 0.4;
    }

    .branch-label {
        position: relative;
        left: auto;
        top: auto;
        margin: 0.5rem 0;
    }

    .branching__title {
        position: relative;
        left: auto;
        top: auto;
        margin-top: 2rem;
    }

    .panel__content--branching {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .nav-circle {
        top: 16px;
        left: 16px;
        width: 40px;
        height: 40px;
    }

    .grid-pulse {
        display: none;
    }
}
