/* === ABOUT SECTION (isolated) === */

/*
  Two-state scroll experience:
  State 1 — .about__intro       : full-screen, sticky — pins while experience scrolls up
  State 2 — .about__experience  : two-column (sticky images | timeline) — covers the intro
*/

/* Override .section padding — about manages its own spacing */
.about.section {
    padding: 0;
}

.about {
    background: var(--color-bg-about);
    position: relative;
    scroll-snap-align: start;
    scroll-margin-top: 0;
}

/* ══════════════════════════════════════
   STATE 1 — INTRO
   Sticky: pins at top, experience scrolls over it
   ══════════════════════════════════════ */

.about__intro {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: var(--color-bg-about);
}

.about__intro-content {
    max-width: 1256px;
    padding: 0 var(--content-padding);
    text-align: center;
    position: relative;
    z-index: 1000;
    /* Stays above the stickers (z-index: 999) */
}

.about__intro-title {
    font-family: "SF Pro", "SF Pro Display", var(--font-heading);
    font-weight: 900;
    font-stretch: expanded;
    font-size: clamp(32px, 3.6vw, 52px);
    color: var(--color-text-primary);
    line-height: 1.5;
    margin: 0;
}

/* JS wraps each word in .about__word for staggered reveal */
.about__intro-title .about__word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out);
}

.about__intro-title--revealed .about__word {
    opacity: 1;
    transform: translateY(0);
}

/* Highlighted phrase — purple background bar */
.about__intro-highlight {
    padding: 0.05em 0.2em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    /* Start: invisible highlight */
    background: transparent;
    color: var(--color-text-primary);
    transition: background-color 0.6s var(--ease-out),
        color 0.6s var(--ease-out);
}

/* After reveal → highlight slides in with delay */
.about__intro-title--revealed .about__intro-highlight {
    background: var(--color-accent-highlight);
    color: var(--color-text-white);
    transition-delay: 1.2s;
}

/* Waving hand emoji animation */
.about__intro-wave {
    display: inline-block;
    transform-origin: 70% 70%;
}

.about__intro-title--revealed .about__intro-wave {
    animation: about-wave 2.5s ease-in-out 0.5s 1;
}

@keyframes about-wave {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* ══════════════════════════════════════
   STATE 1.5 — STORY
   Scroll-linked text reveal (Moritz Kindler style)
   ══════════════════════════════════════ */

.about__story-wrapper {
    position: relative;
    padding: 25vh 0;
    /* Creates enough scroll space above and below the text */
    background: var(--color-text-white);
    z-index: 2;
    /* Scroll over the intro */
}

.about__story-content {
    max-width: 1100px;
    /* Slightly narrower for better reading flow */
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.about__story-text {
    font-family: var(--font-body);
    /* Space Grotesk */
    font-weight: 500;
    font-size: clamp(32px, 5vw, 76px);
    /* Larger minimum and maximum for impact */
    line-height: 1.25;
    /* Tighter line height for large text */
    color: var(--color-text-muted-light);
    /* Very light soft gray base */
    margin: 0;
}

/* Individual words created by JS */
.story-word {
    display: inline-block;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-word.is-active {
    color: var(--color-text-primary);
    /* Dark transition */
}

/* ══════════════════════════════════════
   STATE 2 — HORIZONTAL TIMELINE EXPERIENCE
   Scrolls down to trigger a horizontal track
   ══════════════════════════════════════ */

.experience-wrapper {
    position: relative;
    /* 300vh allows 3 views of 100vh scrolling */
    height: 300vh;
    background: var(--color-bg-about);
    z-index: 2;
}

.experience-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Required to prevent horizontal scrollbars on body */
    max-width: 100%;
}

/* The actual track that moves horizontally via JS transform */
.experience-track {
    display: flex;
    height: 100%;
    /* width: 300vw since there are 3 slides */
    width: 300vw;
    will-change: transform;
}

/* Individual slide */
.experience-slide {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4xl) var(--content-padding);
    position: relative;
}

/* Specific background colors */
.experience-slide--1 {
    background-color: var(--color-exp-slide-1);
    position: relative;
    /* Invert text color for this dark slide */
    color: var(--color-text-white);
}

.experience-slide--1 .experience-slide__date,
.experience-slide--1 .experience-slide__role,
.experience-slide--1 .experience-slide__achievement strong {
    color: var(--color-text-white);
}

.experience-slide--1 .experience-slide__duration,
.experience-slide--1 .experience-slide__company,
.experience-slide--1 .experience-slide__achievement p {
    color: rgba(255, 255, 255, 0.7);
}

/* Noise overlay for MISTO slide */
.experience-slide--1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
    /* Subtler opacity for a premium look */
    mix-blend-mode: overlay;
    /* Much softer blending than multiply */
    /* High resolution photographic film grain */
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/7/76/1k_Dissolve_Noise_Texture.png");
    background-repeat: repeat;
    background-size: 250px 250px;
}

/* Ensure content sits above the noise overlay */
.experience-slide--1 .experience-slide__inner {
    position: relative;
    z-index: 2;
}

.experience-slide--2 {
    background-color: var(--color-exp-slide-2);
    color: var(--color-text-white);
}

.experience-slide--2 .experience-slide__date,
.experience-slide--2 .experience-slide__role,
.experience-slide--2 .experience-slide__achievement strong {
    color: var(--color-text-white);
}

.experience-slide--2 .experience-slide__duration,
.experience-slide--2 .experience-slide__achievement p {
    color: rgba(255, 255, 255, 0.7);
}

.experience-slide--2 .experience-slide__company {
    color: var(--color-exp-slide-2-accent);
}

.experience-slide--3 {
    background-color: var(--color-exp-slide-3);
}

.experience-slide--3 .experience-slide__date,
.experience-slide--3 .experience-slide__role,
.experience-slide--3 .experience-slide__achievement strong {
    color: var(--color-text-primary);
}

.experience-slide--3 .experience-slide__duration,
.experience-slide--3 .experience-slide__achievement p {
    color: var(--color-text-secondary);
}

.experience-slide--3 .experience-slide__company {
    color: var(--color-exp-slide-3-accent);
}

/* ── Floating Logos (pure CSS levitation) ── */
.interactive-logo {
    position: absolute;
    width: 200px;
    height: auto;
    /* Position in left column area, below the date header, clear of right-side text */
    top: 35%;
    left: 12%;
    z-index: 5;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    /* Pure CSS levitation — runs on compositor, zero JS cost */
    will-change: transform;
    animation: logo-levitate 8s ease-in-out infinite;
}

/* Stagger animation start for each slide's logo */
.experience-slide--2 .interactive-logo {
    animation-delay: -2.5s;
    animation-duration: 9s;
}

.experience-slide--3 .interactive-logo {
    animation-delay: -5s;
    animation-duration: 10s;
}

/* Gentle floating — translate + rotate only (GPU composited) */
@keyframes logo-levitate {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    20% {
        transform: translate(12px, -18px) rotate(3deg);
    }

    40% {
        transform: translate(-8px, -28px) rotate(-2deg);
    }

    60% {
        transform: translate(16px, -10px) rotate(4deg);
    }

    80% {
        transform: translate(-6px, -22px) rotate(-3deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* ── Text Reveal Animation Styles ── */
.experience-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.experience-slide.slide-is-visible .experience-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays */
.experience-slide.slide-is-visible .delay-1 {
    transition-delay: 0.1s;
}

.experience-slide.slide-is-visible .delay-2 {
    transition-delay: 0.2s;
}

.experience-slide.slide-is-visible .delay-3 {
    transition-delay: 0.3s;
}

.experience-slide.slide-is-visible .delay-4 {
    transition-delay: 0.4s;
}

.experience-slide.slide-is-visible .delay-5 {
    transition-delay: 0.5s;
}

/* Slide inner content layout */
.experience-slide__inner {
    max-width: 900px;
    width: 100%;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-4xl);
}

@media (max-width: 900px) {
    .experience-slide__inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

.experience-slide__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.experience-slide__date {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-h3);
    color: var(--color-text-primary);
}

.experience-slide__duration {
    font-size: var(--text-small);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.experience-slide__content {
    display: flex;
    flex-direction: column;
}

.experience-slide__role {
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-xs);
    color: var(--color-text-primary);
}

.experience-slide__company {
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
}

.experience-slide__achievements {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.experience-slide__achievement strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--color-text-primary);
    font-weight: 700;
}

.experience-slide__achievement p {
    margin: 0;
    font-size: var(--text-body);
    color: var(--color-text-secondary);
}

/* ── Progress Indicator (Timeline dots) ── */
.experience-progress {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    max-width: 80vw;
    z-index: 10;
}

.experience-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-50%);
    border-radius: 2px;
}

.experience-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--color-text-primary);
    width: 0%;
    /* updated by JS */
    transition: width 0.1s linear;
}

.experience-progress-dots {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.experience-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-text-white);
    border: 3px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-smooth);
    padding: 0;
    pointer-events: none;
    /* Just visual for now */
}

.experience-dot.active {
    background: var(--color-text-primary);
    border-color: var(--color-text-primary);
    transform: scale(1.2);
}

.experience-dot:hover {
    transform: scale(1.2);
}

/* ── Dark background overrides for progress UI ── */
.experience-progress.is-dark-background .experience-progress-bar {
    background: rgba(255, 255, 255, 0.2);
}

.experience-progress.is-dark-background .experience-progress-fill {
    background: var(--color-text-white);
}

.experience-progress.is-dark-background .experience-dot {
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.experience-progress.is-dark-background .experience-dot.active {
    background: var(--color-text-white);
    border-color: var(--color-text-white);
}

/* ══════════════════════════════════════
   STICKER CURSOR
   ══════════════════════════════════════ */

/* Cursor follower — follows mouse with sticker image */
.sticker-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    will-change: transform;
}

.sticker-cursor__img {
    width: 400px;
    height: 400px;
    object-fit: contain;
    /* Offset so center of sticker is at cursor tip */
    margin-left: -200px;
    margin-top: -200px;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Placed stickers (stuck on the page) */
.sticker-placed {
    position: absolute;
    pointer-events: none;
    z-index: 999;
    /* Changed: High z-index to stay above the intro and experience backgrounds */
    animation: sticker-pop-in 0.4s var(--ease-out) both;
}

.sticker-placed img {
    width: 350px;
    height: 350px;
    object-fit: contain;
    /* Offset so sticker is centered on click point */
    margin-left: -175px;
    margin-top: -175px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

/* Removal transition */
.sticker-placed--removing {
    animation: sticker-pop-out 0.3s var(--ease-out) both;
}

/* ── Pop in / out ── */
@keyframes sticker-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-15deg);
    }

    60% {
        transform: scale(1.15) rotate(3deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes sticker-pop-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) rotate(10deg);
    }
}

/* ── Per-sticker idle animations ── */
@keyframes sticker-spin {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(8deg);
    }
}

@keyframes sticker-wobble {

    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

@keyframes sticker-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

@keyframes sticker-tilt {

    0%,
    100% {
        transform: rotate(0deg) translateY(0);
    }

    25% {
        transform: rotate(5deg) translateY(-3px);
    }

    75% {
        transform: rotate(-5deg) translateY(3px);
    }
}

@keyframes sticker-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}