/* === iggi.dev - Blobitecture Organism === */
/* Palette: #0d1117 #1e1535 #0f2027 #00e5c7 #e040a0 #f0c040 #e8e2f0 #8a7fa8 #00e5c740 #ffffff */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0d1117;
    background-image: radial-gradient(ellipse at 30% 20%, #1e1535 0%, #0d1117 70%);
    color: #e8e2f0;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    line-height: 1.72;
    overflow-x: hidden;
    min-height: 100vh;
}

/* === Particle Canvas === */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === Cursor Glow === */
#cursor-glow {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00e5c7;
    opacity: 0.3;
    filter: blur(6px);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out;
}

.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00e5c7;
    pointer-events: none;
    z-index: 9998;
    filter: blur(4px);
    transition: transform 0.25s ease-out, opacity 0.3s ease-out;
}

#trail-1 { opacity: 0.2; }
#trail-2 { opacity: 0.12; }
#trail-3 { opacity: 0.06; }

/* === SVG Tendrils === */
.tendrils-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.tendril-path {
    fill: none;
    stroke: #00e5c7;
    stroke-width: 1.5;
    stroke-dasharray: 8 12;
    opacity: 0.25;
    animation: tendrilFlow 4s linear infinite;
}

@keyframes tendrilFlow {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -40; }
}

/* === Sections === */
.section {
    position: relative;
    z-index: 2;
}

/* === Section 1: The Nucleus === */
#nucleus {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nucleus-blob {
    width: clamp(300px, 60vw, 600px);
    height: clamp(300px, 60vw, 600px);
    background: #1e1535;
    border-radius: 42% 58% 70% 30% / 45% 55% 60% 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0, 229, 199, 0.08), inset 0 0 30px rgba(30, 21, 53, 0.5);
    animation: nucleusBreathe 12s ease-in-out infinite;
    transition: box-shadow 0.6s ease-in-out;
}

.nucleus-blob:hover {
    box-shadow: 0 0 60px rgba(0, 229, 199, 0.15), inset 0 0 30px rgba(30, 21, 53, 0.5);
}

@keyframes nucleusBreathe {
    0%, 100% {
        border-radius: 42% 58% 70% 30% / 45% 55% 60% 40%;
        transform: scale(1);
    }
    25% {
        border-radius: 58% 42% 30% 70% / 55% 45% 40% 60%;
        transform: scale(1.02);
    }
    50% {
        border-radius: 50% 50% 55% 45% / 40% 60% 50% 50%;
        transform: scale(0.98);
    }
    75% {
        border-radius: 35% 65% 45% 55% / 60% 40% 55% 45%;
        transform: scale(1.01);
    }
}

.site-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(4rem, 12vw, 10rem);
    color: #00e5c7;
    letter-spacing: 0.08em;
    text-shadow: 0 0 30px rgba(0, 229, 199, 0.3), 0 0 60px rgba(0, 229, 199, 0.15);
}

.title-letter {
    display: inline-block;
    opacity: 0;
    transform: scale(0);
    animation: letterBloom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.title-letter:nth-child(1) { animation-delay: 0.2s; }
.title-letter:nth-child(2) { animation-delay: 0.4s; }
.title-letter:nth-child(3) { animation-delay: 0.6s; }
.title-letter:nth-child(4) { animation-delay: 0.8s; }

@keyframes letterBloom {
    0% { opacity: 0; transform: scale(0); }
    70% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    font-weight: 400;
    color: #8a7fa8;
    letter-spacing: 0.04em;
    margin-top: 8px;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-teardrop {
    margin-top: 55px;
    animation: teardropBob 2s ease-in-out infinite;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.6s forwards, teardropBob 2s ease-in-out 1.6s infinite;
}

@keyframes teardropBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* === Section 2: The Colony === */
#colony {
    min-height: 250vh;
    padding: 89px 0;
    position: relative;
}

.blob-node {
    max-width: 420px;
    padding: 55px 45px;
    background: #1e1535;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 229, 199, 0.08), inset 0 0 30px rgba(30, 21, 53, 0.5);
    transition: box-shadow 0.6s ease-in-out, transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    transform: scale(0.6);
}

.blob-node.visible {
    animation: blobBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes blobBounceIn {
    0% { transform: scale(0.6); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    75% { transform: scale(0.98); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.blob-node:hover {
    box-shadow: 0 0 60px rgba(0, 229, 199, 0.15), inset 0 0 30px rgba(30, 21, 53, 0.5);
    transform: scale(1.03);
}

.blob-a {
    border-radius: 42% 58% 70% 30% / 45% 55% 60% 40%;
    margin-left: 15%;
    animation-duration: 10s;
    animation-name: breatheA;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.blob-a.visible {
    animation: blobBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, breatheA 10s ease-in-out 0.8s infinite;
}

@keyframes breatheA {
    0%, 100% { border-radius: 42% 58% 70% 30% / 45% 55% 60% 40%; }
    50% { border-radius: 58% 42% 30% 70% / 55% 45% 40% 60%; }
}

.blob-b {
    border-radius: 65% 35% 45% 55% / 40% 60% 50% 50%;
    margin-left: auto;
    margin-right: 12%;
    margin-top: -34px;
    background: #0f2027;
}

.blob-b.visible {
    animation: blobBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, breatheB 12s ease-in-out 0.8s infinite;
}

@keyframes breatheB {
    0%, 100% { border-radius: 65% 35% 45% 55% / 40% 60% 50% 50%; }
    50% { border-radius: 35% 65% 55% 45% / 60% 40% 50% 50%; }
}

.blob-c {
    border-radius: 50% 50% 35% 65% / 55% 45% 55% 45%;
    margin-left: 20%;
    margin-top: 55px;
}

.blob-c.visible {
    animation: blobBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, breatheC 9s ease-in-out 0.8s infinite;
}

@keyframes breatheC {
    0%, 100% { border-radius: 50% 50% 35% 65% / 55% 45% 55% 45%; }
    50% { border-radius: 45% 55% 65% 35% / 45% 55% 45% 55%; }
}

.blob-d {
    border-radius: 38% 62% 55% 45% / 60% 40% 55% 45%;
    margin-left: auto;
    margin-right: 8%;
    margin-top: -21px;
    background: #0f2027;
}

.blob-d.visible {
    animation: blobBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, breatheD 11s ease-in-out 0.8s infinite;
}

@keyframes breatheD {
    0%, 100% { border-radius: 38% 62% 55% 45% / 60% 40% 55% 45%; }
    50% { border-radius: 62% 38% 45% 55% / 40% 60% 45% 55%; }
}

.blob-e {
    border-radius: 55% 45% 40% 60% / 50% 50% 55% 45%;
    margin-left: 25%;
    margin-top: 34px;
}

.blob-e.visible {
    animation: blobBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, breatheE 13s ease-in-out 0.8s infinite;
}

@keyframes breatheE {
    0%, 100% { border-radius: 55% 45% 40% 60% / 50% 50% 55% 45%; }
    50% { border-radius: 45% 55% 60% 40% / 55% 45% 45% 55%; }
}

.blob-node h2 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #00e5c7;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
}

.blob-node p {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: #e8e2f0;
    max-width: 38ch;
    line-height: 1.72;
}

/* === Section 3: The Membrane === */
#membrane {
    min-height: 100vh;
    padding: 89px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.membrane-blob {
    position: absolute;
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
}

.membrane-back {
    width: 500px;
    height: 500px;
    background: rgba(30, 21, 53, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-60%, -55%);
    animation: breatheMembrane1 15s ease-in-out infinite;
}

.membrane-mid {
    width: 400px;
    height: 400px;
    background: rgba(15, 32, 39, 0.4);
    top: 50%;
    left: 50%;
    transform: translate(-40%, -45%);
    border-radius: 45% 55% 55% 45% / 50% 45% 55% 50%;
    animation: breatheMembrane2 11s ease-in-out infinite;
}

.membrane-front {
    position: relative;
    width: clamp(320px, 50vw, 500px);
    padding: 55px 45px;
    background: rgba(30, 21, 53, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 42% 58% 50% 50% / 50% 50% 55% 45%;
    box-shadow: 0 0 40px rgba(0, 229, 199, 0.08);
    opacity: 0;
    transform: scale(0.7);
    z-index: 3;
}

.membrane-front.visible {
    animation: blobBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes breatheMembrane1 {
    0%, 100% { border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%; transform: translate(-60%, -55%) scale(1); }
    50% { border-radius: 45% 55% 55% 45% / 45% 55% 50% 50%; transform: translate(-60%, -55%) scale(1.03); }
}

@keyframes breatheMembrane2 {
    0%, 100% { border-radius: 45% 55% 55% 45% / 50% 45% 55% 50%; transform: translate(-40%, -45%) scale(1); }
    50% { border-radius: 55% 45% 45% 55% / 45% 55% 45% 55%; transform: translate(-40%, -45%) scale(0.97); }
}

.membrane-text {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #e040a0;
    margin-bottom: 21px;
    line-height: 1.4;
}

.membrane-text.secondary {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    color: #8a7fa8;
}

/* === Section 4: The Spore === */
#spore {
    min-height: 100vh;
    padding: 89px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 34px;
    position: relative;
}

.spore-blob {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% 50% 40% 60% / 60% 40% 50% 50%;
    background: #1e1535;
    box-shadow: 0 0 30px rgba(0, 229, 199, 0.08);
    cursor: pointer;
    transition: box-shadow 0.6s ease-in-out, transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: pulseSpore 3s ease-in-out infinite;
}

.spore-blob:hover {
    box-shadow: 0 0 50px rgba(0, 229, 199, 0.2);
    transform: scale(1.1);
}

@keyframes pulseSpore {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 229, 199, 0.08); }
    50% { box-shadow: 0 0 45px rgba(0, 229, 199, 0.15); }
}

.spore-1 { border-radius: 45% 55% 50% 50% / 55% 45% 50% 50%; animation-delay: 0s; }
.spore-2 { border-radius: 55% 45% 45% 55% / 50% 50% 55% 45%; animation-delay: 0.5s; }
.spore-3 { border-radius: 50% 50% 55% 45% / 45% 55% 50% 50%; animation-delay: 1s; }
.spore-4 { border-radius: 40% 60% 50% 50% / 55% 45% 45% 55%; animation-delay: 1.5s; background: #0f2027; }
.spore-5 { border-radius: 60% 40% 45% 55% / 50% 50% 50% 50%; animation-delay: 2s; }

.spore-final {
    width: 200px;
    height: 200px;
    flex-direction: column;
    gap: 8px;
    animation: pulseSpore 3s ease-in-out infinite, rotateSlow 120s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spore-label {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #00e5c7;
    letter-spacing: 0.06em;
}

.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 13px;
    color: #f0c040;
    letter-spacing: 0.04em;
}

.spore-contact {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    color: #8a7fa8;
    text-align: center;
}

/* === Wavy Divider (organic separator) === */
.wavy-divider {
    width: 100%;
    height: 40px;
}

.wavy-divider path {
    fill: none;
    stroke: #8a7fa8;
    stroke-width: 0.5;
}

/* === Responsive === */
@media (max-width: 768px) {
    .blob-node {
        max-width: 90%;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }

    .membrane-back,
    .membrane-mid {
        display: none;
    }

    #spore {
        flex-direction: column;
    }
}
