/* ============================================================
   ABOUT PAGE
   Parallax iridescence + Glass Surface boxes + Blur entrance
   ============================================================ */

/* ── Iridescence Parallax Background ──
   Fixed canvas, JS applies translateY at 50% scroll speed */
.about-iri {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.about-iri__canvas {
    position: absolute;
    inset: 0;
}

.about-iri__canvas canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.about-iri__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}

/* ── Hero Section (text over iridescence) ── */
.about-hero {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about-hero__content {
    text-align: center;
    max-width: 680px;
    padding: 0 1.5rem;
}

.about-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 1rem;
    text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}

.about-hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin: 0;
    text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}

.about-hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: none;
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, opacity 0.4s;
    animation: about-bounce 2.5s ease-in-out infinite;
}

.about-hero__scroll:hover {
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}

@keyframes about-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Sections Container ── */
.about-sections {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
    padding: 4rem 1rem 32rem;
}

.about-sections::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 500px;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 40%);
    z-index: -1;
    pointer-events: none;
}

/* ── Individual Section ── */
.about-section {
    margin-bottom: 7rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

/* ── Glass Surface Box ──
   Mimics React Bits Glass Surface fallback with enhanced effects */
.glass-box {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    /* Glassmorphism */
    background: rgba(20, 15, 40, 0.6);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    /* Border glow */
    border: 1px solid rgba(139, 92, 246, 0.18);
    /* Layered shadows mimicking Glass Surface */
    box-shadow:
        0 0 2px 1px rgba(255,255,255,0.04) inset,
        0 0 10px 4px rgba(255,255,255,0.02) inset,
        0 4px 16px rgba(17, 17, 26, 0.1),
        0 8px 24px rgba(17, 17, 26, 0.08),
        0 16px 56px rgba(17, 17, 26, 0.06);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.glass-box:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow:
        0 0 2px 1px rgba(255,255,255,0.06) inset,
        0 0 12px 6px rgba(139, 92, 246, 0.05) inset,
        0 4px 16px rgba(17, 17, 26, 0.12),
        0 8px 32px rgba(124, 58, 237, 0.08),
        0 16px 64px rgba(17, 17, 26, 0.08);
    transform: translateY(-2px);
}

/* Shine/refraction stripe across the top */
.glass-box__shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.04) 20%,
        rgba(255,255,255,0.12) 40%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.12) 60%,
        rgba(255,255,255,0.04) 80%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

.glass-box__content {
    position: relative;
    z-index: 1;
    padding: 2.5rem 3rem;
}

/* ── Section text ── */
.about-section__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #d8b4fe;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

.about-section__text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.85;
    margin: 0;
}

/* ── Gradual Blur Entrance Animation ──
   Elements start blurred + translated, animate to sharp on scroll */
.glass-blur-enter {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(20px);
    transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s ease;
}

.glass-blur-enter[data-delay="1"] {
    transition-delay: 0.15s;
}

.glass-blur-enter[data-delay="2"] {
    transition-delay: 0.3s;
}

.glass-blur-enter--visible {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
}

/* ── Light Theme ── */
[data-theme="light"] .about-iri__overlay {
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.35) 100%);
}

[data-theme="light"] .glass-box {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(139, 92, 246, 0.12);
    box-shadow:
        0 0 2px 1px rgba(0,0,0,0.03) inset,
        0 0 10px 4px rgba(0,0,0,0.02) inset,
        0 4px 16px rgba(17, 17, 26, 0.04),
        0 8px 24px rgba(17, 17, 26, 0.03),
        0 16px 56px rgba(17, 17, 26, 0.02);
}

[data-theme="light"] .glass-box:hover {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow:
        0 0 2px 1px rgba(0,0,0,0.04) inset,
        0 0 12px 6px rgba(139, 92, 246, 0.03) inset,
        0 4px 16px rgba(17, 17, 26, 0.05),
        0 8px 32px rgba(124, 58, 237, 0.04),
        0 16px 64px rgba(17, 17, 26, 0.03);
}

[data-theme="light"] .glass-box__shine {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.2) 20%,
        rgba(255,255,255,0.5) 40%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0.5) 60%,
        rgba(255,255,255,0.2) 80%,
        transparent 100%
    );
}

[data-theme="light"] .about-section__title {
    color: #7c3aed;
}

[data-theme="light"] .about-section__text {
    color: #2d2640;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .about-iri {
        position: fixed;
        height: 100vh;
        transform: none !important;
    }

    .glass-blur-enter {
        opacity: 1;
        filter: none;
        transform: none;
        transition: none;
    }

    .about-hero__scroll {
        animation: none;
    }
}

/* ── Responsive ── */
@media (max-width: 1024px) and (min-width: 601px) {
    .about-sections {
        padding-bottom: 24rem;
    }
}

@media (max-width: 600px) {
    .about-iri {
        position: absolute;
        height: 700vh;
    }
    
    .about-hero__title {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }
    .about-hero__subtitle {
        font-size: 0.88rem;
    }
    .glass-box__content {
        padding: 1.5rem 1.25rem;
    }
    .about-section__title {
        font-size: 1.25rem;
    }
    .about-section__text {
        font-size: 0.88rem;
    }
    .about-sections {
        padding: 3rem 0.5rem 20rem;
    }
}

/* Ensure footer sits above the fixed iridescence */
.footer {
    position: relative;
    z-index: 3;
    margin-top: 0 !important;
    background: var(--bg-secondary);
}

body:has(.about-iri) {
    background: var(--bg-primary);
}

html {
    overflow-x: hidden;
}

/* ── Section text formatting ── */
.about-section__text p {
    margin-bottom: 1.1rem;
}

.about-section__text p:last-child {
    margin-bottom: 0;
}

.about-section__text strong {
    color: #d8b4fe;
    font-weight: 600;
}

[data-theme="light"] .about-section__text strong {
    color: #7c3aed;
}

.about-section__lead {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 1.2rem;
}

[data-theme="light"] .about-section__lead {
    color: #1a1a2e;
}