/* yongzoon.xyz — blobitecture fluid */

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

/* ===== ROOT VARIABLES ===== */
:root {
    --bg: #F0F0FF;
    --surface: #FFFFFF;
    --text: #1A1A2E;
    --muted: #6B7280;
    --violet: #7C3AED;
    --pink: #EC4899;
    --cyan: #06B6D4;
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Mono', monospace;
    --radius-card: 24px;
    --radius-pill: 999px;
}

/* ===== BODY ===== */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== SECTION HEADINGS ===== */
.section-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 24px;
    color: var(--text);
    text-align: center;
    margin-bottom: 1rem;
}

/* ===== BACKGROUND BLOBS ===== */
.blob {
    position: fixed;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    will-change: border-radius, transform;
    opacity: 0;
    animation-fill-mode: forwards;
}

.blob-1 {
    width: 380px;
    height: 380px;
    background: linear-gradient(135deg, var(--violet), var(--pink));
    opacity: 0.08;
    top: 5%;
    left: 6%;
    animation: morph1 10s ease-in-out infinite, blobFadeIn 1.5s ease forwards;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    opacity: 0.06;
    top: 40%;
    right: 4%;
    animation: morph2 12s ease-in-out infinite, blobFadeIn 1.5s 0.3s ease forwards;
}

.blob-3 {
    width: 260px;
    height: 260px;
    background: linear-gradient(135deg, var(--pink), var(--cyan));
    opacity: 0.05;
    bottom: 15%;
    left: 25%;
    animation: morph3 8s ease-in-out infinite, blobFadeIn 1.5s 0.6s ease forwards;
}

.blob-4 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--violet), var(--cyan));
    opacity: 0.04;
    top: 65%;
    left: 60%;
    animation: morph4 14s ease-in-out infinite, blobFadeIn 1.5s 0.9s ease forwards;
}

@keyframes blobFadeIn {
    from { opacity: 0; }
    to { opacity: var(--blob-opacity, 0.06); }
}

.blob-1 { --blob-opacity: 0.08; }
.blob-2 { --blob-opacity: 0.06; }
.blob-3 { --blob-opacity: 0.05; }
.blob-4 { --blob-opacity: 0.04; }

@keyframes morph1 {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0, 0) scale(1); }
    25%      { border-radius: 50% 50% 40% 60% / 60% 40% 50% 50%; }
    50%      { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: translate(20px, -10px) scale(1.05); }
    75%      { border-radius: 40% 60% 50% 50% / 50% 50% 60% 40%; }
}

@keyframes morph2 {
    0%, 100% { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; transform: translate(0, 0) scale(1); }
    33%      { border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%; }
    50%      { border-radius: 30% 70% 50% 50% / 40% 60% 40% 60%; transform: translate(-15px, 15px) scale(1.03); }
    66%      { border-radius: 60% 40% 40% 60% / 60% 40% 60% 40%; }
}

@keyframes morph3 {
    0%, 100% { border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%; transform: translate(0, 0); }
    50%      { border-radius: 60% 40% 40% 60% / 50% 50% 50% 50%; transform: translate(10px, 10px) scale(0.97); }
}

@keyframes morph4 {
    0%, 100% { border-radius: 55% 45% 50% 50% / 45% 55% 50% 50%; transform: translate(0, 0); }
    33%      { border-radius: 35% 65% 60% 40% / 60% 40% 55% 45%; transform: translate(-12px, 8px); }
    66%      { border-radius: 65% 35% 40% 60% / 40% 60% 45% 55%; transform: translate(8px, -6px); }
}

/* ===== CURSOR BLOB ===== */
.cursor-blob {
    position: fixed;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.07), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    will-change: left, top;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem 3rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 42px;
    color: var(--text);
    margin-bottom: 0.3rem;
    animation: bob 4s ease-in-out infinite;
    letter-spacing: -0.5px;
}

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

.hero-sub {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 1.8rem;
    letter-spacing: 0.5px;
}

.regen-btn {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    background: none;
    border: 1px solid rgba(26, 26, 46, 0.15);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.regen-btn:hover {
    color: var(--violet);
    border-color: var(--violet);
    transform: scale(1.04);
}

.regen-btn:active {
    transform: scale(0.96);
}

/* ===== EXPERIMENTS SECTION ===== */
.experiments {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

/* Category pill filters */
.cat-pills {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
}

.pill {
    font-family: var(--font-body);
    font-size: 13px;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    color: var(--muted);
    border: 1px solid rgba(26, 26, 46, 0.1);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    user-select: none;
}

.pill:hover {
    border-color: var(--violet);
    color: var(--violet);
    transform: translateY(-1px);
}

.pill.active {
    background: var(--violet);
    color: var(--surface);
    border-color: var(--violet);
}

/* Experiment grid — loose arrangement */
.exp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Experiment cards */
.exp-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transform: rotate(var(--r, 0deg));
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s ease,
                opacity 0.35s ease;
    position: relative;
    overflow: hidden;
}

.exp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--violet), var(--pink));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exp-card:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.12);
}

.exp-card:hover::before {
    opacity: 1;
}

.exp-card.hidden {
    display: none;
}

/* Card thumbnail gradients */
.exp-thumb {
    height: 64px;
    border-radius: 14px;
    margin-bottom: 0.85rem;
    transition: transform 0.3s ease;
}

.exp-card:hover .exp-thumb {
    transform: scale(1.03);
}

.exp-thumb.violet      { background: linear-gradient(135deg, #7C3AED, #4488FF); }
.exp-thumb.pink        { background: linear-gradient(135deg, #EC4899, #7C3AED); }
.exp-thumb.cyan        { background: linear-gradient(135deg, #06B6D4, #00FFB3); }
.exp-thumb.gold        { background: linear-gradient(135deg, #FFD700, #FF6EC7); }
.exp-thumb.violet-cyan { background: linear-gradient(135deg, #7C3AED, #06B6D4); }
.exp-thumb.pink-gold   { background: linear-gradient(135deg, #EC4899, #FFD700); }
.exp-thumb.cyan-pink   { background: linear-gradient(135deg, #06B6D4, #EC4899); }
.exp-thumb.gold-violet { background: linear-gradient(135deg, #FFD700, #7C3AED); }

.exp-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.exp-desc {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.exp-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(107, 114, 128, 0.7);
    display: block;
    margin-bottom: 0.6rem;
}

.exp-launch {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--violet);
    text-decoration: none;
    transition: color 0.2s ease;
}

.exp-launch:hover {
    color: var(--pink);
    text-decoration: underline;
}

/* Surprise Me button */
.surprise {
    text-align: center;
    margin-top: 2rem;
}

.surprise-btn {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--surface);
    background: linear-gradient(135deg, var(--violet), var(--pink));
    border: none;
    padding: 0.65rem 1.8rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}

.surprise-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35);
}

.surprise-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ===== BLOB PLAYGROUND ===== */
.playground {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.playground-desc {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.playground-area {
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#blobCanvas {
    display: block;
    width: 100%;
    height: 360px;
    cursor: crosshair;
}

.playground-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.ctrl-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid rgba(26, 26, 46, 0.12);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.ctrl-btn:hover {
    color: var(--violet);
    border-color: var(--violet);
}

.blob-counter {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(107, 114, 128, 0.6);
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem 3rem;
    text-align: center;
    overflow: hidden;
}

.footer-blob {
    position: absolute;
    border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.footer-blob-1 {
    width: 240px;
    height: 240px;
    background: linear-gradient(135deg, var(--violet), var(--pink));
    opacity: 0.04;
    bottom: -60px;
    left: 10%;
    animation: morph3 10s ease-in-out infinite;
}

.footer-blob-2 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    opacity: 0.03;
    bottom: -40px;
    right: 15%;
    animation: morph2 12s ease-in-out infinite;
}

.footer-inner {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto;
}

.seed-display {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-bottom: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.seed-display:hover {
    opacity: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    margin-bottom: 0.6rem;
}

.flink {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.flink:hover {
    color: var(--violet);
}

.footer-tagline {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.6;
}

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .hero-title {
        font-size: 32px;
    }

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

    .blob-1 { width: 220px; height: 220px; }
    .blob-2 { width: 180px; height: 180px; }
    .blob-3 { width: 150px; height: 150px; }
    .blob-4 { display: none; }

    .cursor-blob { display: none; }

    .playground-controls {
        flex-wrap: wrap;
    }
}

/* ===== CARD HIGHLIGHT FLASH (Surprise Me) ===== */
@keyframes cardFlash {
    0%   { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
    50%  { box-shadow: 0 0 0 12px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06); }
}

.exp-card.flash {
    animation: cardFlash 0.8s ease forwards;
}

/* ===== BLOB REGENERATION TRANSITION ===== */
.blob.regenerating {
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
