/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Karla', sans-serif;
    position: relative;
    color: #111;
    overflow-x: hidden;
    background: white;
}

/* Cymatics canvas - Y2K Chrome version */
#cymaticsBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    opacity: 1;
}

#airstreamCanvas {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 280px;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
}

/* CSS background layers removed - canvas only */


/* Main content - keep above blobs */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 10;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 6rem;
    font-weight: 500;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
    line-height: 0.95;
    /* Subtle floating animation */
    animation: gentleFloat 8s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

ul {
    list-style: none;
    font-size: 1.5rem;
    line-height: 2;
    /* Asymmetric offset - push to the right */
    margin-left: 8rem;
}

li {
    cursor: pointer;
    transition: all 0.3s ease, opacity 1s cubic-bezier(0.4, 0.0, 0.2, 1);
    width: fit-content;
    position: relative;
    padding: 0.2rem 0;
    opacity: 0;
}

li.fade-in {
    opacity: 1;
}

/* Colored hover states - Y2K palette + playful rotation */
li:nth-child(1):hover { transform: translateX(10px) rotate(1deg); color: #40E0D0; } /* changelog = Turquoise */
li:nth-child(2):hover { transform: translateX(10px) rotate(-1deg); color: #FF1493; } /* music = Hot Pink */
li:nth-child(3):hover { transform: translateX(10px) rotate(1.5deg); color: #9400D3; } /* passion = Electric Purple */
li:nth-child(4):hover { transform: translateX(10px) rotate(-0.5deg); color: #7FFF00; } /* videos = Acid Lime */
li:nth-child(5):hover { transform: translateX(10px) rotate(1deg); color: #00BFFF; } /* writing = Cyber Blue */

/* Colored bullets - ORIGINAL colors that panels will match */
li::before {
    display: inline-block;
    transform: scale(1);
    opacity: 1;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

li:nth-child(1)::before { content: "• "; color: #40E0D0; } /* changelog = Turquoise */
li:nth-child(2)::before { content: "• "; color: #FF1493; } /* music = Hot Pink */
li:nth-child(3)::before { content: "• "; color: #9400D3; } /* passion = Electric Purple */
li:nth-child(4)::before { content: "• "; color: #7FFF00; } /* videos = Acid Lime */
li:nth-child(5)::before { content: "• "; color: #00BFFF; } /* writing = Cyber Blue */

/* Bullet states */
li.bullet-hidden::before {
    opacity: 0 !important;
    transition: none !important; /* No transition = instant hide */
}

li.bullet-restoring::before {
    opacity: 1 !important;
    transition: opacity 10s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
}

.section-trigger {
    transition: opacity 0.4s ease-out;
}

.section-trigger.fading {
    opacity: 0;
}

/* Disable hover transforms when fading to prevent flicker */
li.fading:hover {
    transform: none !important;
}

/* Header letter animations - OPTIMIZED: Spring physics + complementary color shine */
#section-title span {
    display: inline-block;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1); /* Clean bounce overshoot */
    will-change: transform; /* Hint browser to optimize */
}

#section-title span.wave-active {
    transform: translateY(-10px);
}

#section-title span.shine-active {
    animation: shine 350ms cubic-bezier(0.2, 0.8, 0.3, 1);
    will-change: color, filter, transform;
}

@keyframes shine {
    0% {
        color: var(--section-color-stroke, #0f0);
        filter: brightness(1) drop-shadow(0 0 0px transparent);
        transform: scale(1) rotate(0deg);
    }
    40% {
        color: var(--section-color-complement, #ff0000);
        filter: brightness(2.5) saturate(2) drop-shadow(0 0 12px var(--section-color-complement, #f00));
        transform: scale(1.08) rotate(0deg);
    }
    60% {
        color: var(--section-color-complement, #ff0000);
        filter: brightness(2.5) saturate(2) drop-shadow(0 0 12px var(--section-color-complement, #f00));
        transform: scale(1.08) rotate(0deg);
    }
    100% {
        color: var(--section-color-stroke, #0f0);
        filter: brightness(1) drop-shadow(0 0 0px transparent);
        transform: scale(1) rotate(0deg);
    }
}

/* Color mines - invisible until hovered */
.color-mine {
    position: fixed;
    border-radius: 50%;
    cursor: crosshair; /* Fun cursor over invisible mines! */
    z-index: 500;
    pointer-events: all;
    transform: translate(-50%, -50%);
    opacity: 0;
    background: transparent;
}

/* Viscosity slider */
#viscosity-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Karla', sans-serif;
}

#viscosity-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

#viscosity-slider {
    width: 150px;
    cursor: pointer;
}

/* Section panels - clean and minimal */
.unfold-panel {
    position: fixed;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.04);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transform-origin: top left;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 800px;
    width: max-content;
    min-width: 300px;
}

.unfold-panel.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.unfold-panel h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: lowercase;
}

.unfold-panel p {
    color: #222;
    line-height: 1.8;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.unfold-panel a {
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: all 0.2s ease;
}

.unfold-panel a:hover {
    color: #000;
}

#section-content {
    max-height: 400px;
    overflow-y: auto;
}

/* Click tooltips */
.click-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Karla', sans-serif;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1001;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
    white-space: nowrap;
}

/* Skeuomorphic Decora rocker switch */
#lightswitch {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1000;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

#lightswitch:hover {
    opacity: 1;
}

.switch-plate {
    width: 14px;
    height: 24px;
    background: linear-gradient(180deg, #f8f8f5 0%, #eceae5 100%);
    border-radius: 2px;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.2),
        inset 0 0 0 0.5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.switch-toggle {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f0f0ed 50%, #e5e5e0 100%);
    border-radius: 1.5px;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.9);
    position: relative;
    transform-origin: center center;
    transform: perspective(40px) rotateX(-8deg);
    transition: transform 0.08s ease-out;
}

/* Subtle line in middle of rocker */
.switch-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 1px;
    background: rgba(0,0,0,0.1);
    border-radius: 1px;
}

body.dark-mode .switch-toggle {
    transform: perspective(40px) rotateX(8deg);
}

body.dark-mode .switch-plate {
    background: linear-gradient(180deg, #2a2a28 0%, #1a1a18 100%);
}

body.dark-mode .switch-toggle {
    background: linear-gradient(180deg, #3a3a38 0%, #2a2a28 50%, #202020 100%);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Dark mode styles */
body.dark-mode {
    background: #0a0a0a;
    color: #eee;
}

body.dark-mode .unfold-panel {
    background: rgba(20, 20, 25, 0.92);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .unfold-panel h2 {
    color: #eee;
}

body.dark-mode .unfold-panel p {
    color: #ddd;
}

body.dark-mode .unfold-panel a {
    color: #aaa;
}

body.dark-mode .unfold-panel a:hover {
    color: #fff;
}

body.dark-mode .click-tooltip {
    background: rgba(255, 255, 255, 0.9);
    color: #111;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    ul {
        font-size: 1.25rem;
        margin-left: 2rem;
    }

    #viscosity-control {
        top: 10px;
        right: 10px;
        padding: 0.75rem;
    }

    #viscosity-slider {
        width: 120px;
    }
}
