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

html {
    scroll-behavior: smooth;
}

body {
    background: #1a0a14;
    background-image: linear-gradient(180deg, #1a0a14 0%, #4a0e2a 50%, #3a1a2a 100%);
    background-attachment: fixed;
    color: #d4b0c4;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    min-height: 100vh;
}

/* === NAVIGATION PIPS === */
#nav-pips {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
}

.pip {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pip.active {
    background: #e63d8a;
    box-shadow: 0 0 12px rgba(230, 61, 138, 0.6);
    transform: scale(1.3);
}

/* === BACKGROUND GLOWS === */
#bg-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.glow {
    position: absolute;
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

.glow-1 {
    width: 50vw;
    height: 50vw;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(230, 61, 138, 0.12) 0%, transparent 70%);
    animation-delay: 0s;
}

.glow-2 {
    width: 40vw;
    height: 40vw;
    top: 40%;
    right: -5%;
    background: radial-gradient(circle, rgba(74, 14, 42, 0.3) 0%, transparent 70%);
    animation-delay: 3s;
}

.glow-3 {
    width: 60vw;
    height: 60vw;
    bottom: -20%;
    left: 20%;
    background: radial-gradient(circle, rgba(230, 61, 138, 0.08) 0%, transparent 70%);
    animation-delay: 5s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* === PARTICLES === */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    animation: drift linear infinite;
}

@keyframes drift {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}

/* === SECTIONS === */
.section {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* === GLASSMORPHIC CARDS === */
.glass-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(26, 10, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.glass-card:hover {
    transform: rotateX(-2deg) rotateY(3deg) translateZ(12px);
    box-shadow: 0 16px 48px rgba(26, 10, 20, 0.6);
    border-color: rgba(240, 198, 216, 0.2);
    backdrop-filter: blur(24px) saturate(1.4);
}

/* === HERO VORTEX === */
#hero {
    display: flex;
    align-items: center;
    padding-left: 15%;
    height: 100vh;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.5rem, 18vw, 18rem);
    line-height: 0.85;
    letter-spacing: 0.08em;
    color: #f0c6d8;
    text-shadow: 0 0 40px rgba(240, 198, 216, 0.3);
    display: flex;
    flex-direction: column;
}

.hero-title span {
    display: block;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: heroEntry 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-title span:nth-child(1) { animation-delay: 0.05s; margin-left: 0; }
.hero-title span:nth-child(2) { animation-delay: 0.1s; margin-left: 0.5vw; }
.hero-title span:nth-child(3) { animation-delay: 0.15s; margin-left: 1vw; }
.hero-title span:nth-child(4) { animation-delay: 0.2s; margin-left: 1.5vw; }
.hero-title span:nth-child(5) { animation-delay: 0.25s; margin-left: 1vw; }
.hero-title span:nth-child(6) { animation-delay: 0.3s; margin-left: 0.5vw; }
.hero-title span:nth-child(7) { animation-delay: 0.35s; margin-left: 0; }
.hero-title span:nth-child(8) { animation-delay: 0.4s; margin-left: -0.5vw; }

@keyframes heroEntry {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a5a6e;
    margin-top: 2rem;
    opacity: 0;
    animation: heroEntry 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 30%;
    width: 60vw;
    height: 60vw;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(230, 61, 138, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* === PHILOSOPHY FLOAT === */
#philosophy {
    position: relative;
    padding: 10vh 8%;
    display: flex;
    align-items: center;
    min-height: 100vh;
}

.card-left {
    width: 55%;
    padding: 3rem;
    transform: rotate(-1.5deg);
    position: relative;
    z-index: 2;
}

.card-left p {
    margin-bottom: 1.2rem;
    color: #d4b0c4;
}

.card-right {
    width: 40%;
    padding: 2.5rem;
    transform: rotate(2deg);
    position: absolute;
    right: 8%;
    top: 55%;
    z-index: 3;
}

.pull-quote {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 0.92;
    letter-spacing: 0.08em;
    color: #f0c6d8;
    text-shadow: 0 0 40px rgba(240, 198, 216, 0.3);
}

/* === SIGNAL GRID === */
#signal-grid {
    padding: 10vh 8% 10vh 12%;
    display: flex;
    align-items: center;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 0.8fr 1.2fr;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.grid-cell {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.grid-cell.empty {
    background: none;
    border: none;
    box-shadow: none;
}

.cell-span-2 {
    grid-row: span 2;
}

.grid-char {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 8rem;
    color: #f0c6d8;
    text-shadow: 0 0 40px rgba(240, 198, 216, 0.3);
    line-height: 1;
}

.grid-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a5a6e;
}

/* === TIMELINE DRIFT === */
#timeline {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 10vh 5%;
}

.timeline-path {
    width: 100%;
    height: 400px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

#timeline-curve {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease-out;
}

#timeline.visible #timeline-curve {
    stroke-dashoffset: 0;
}

.timeline-markers {
    position: relative;
    width: 100%;
    height: 400px;
}

.marker {
    position: absolute;
    padding: 1rem 1.5rem;
    text-align: center;
    transform: translateX(-50%) translateY(-50%);
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.marker.visible {
    opacity: 1;
}

.marker-year {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: #f0c6d8;
    letter-spacing: 0.08em;
}

.marker-text {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a5a6e;
    margin-top: 0.3rem;
}

/* === TERMINAL FADE === */
#terminal {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh 5%;
}

.terminal-card {
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    transition: opacity 1s ease, filter 1s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.terminal-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    letter-spacing: 0.05em;
    color: #c9a0b4;
    margin-bottom: 0.8rem;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid transparent;
}

.terminal-line.typing {
    animation: typeOut 1.5s steps(40) forwards;
    border-right-color: #e63d8a;
}

.terminal-line.done {
    width: 100%;
    border-right-color: transparent;
}

@keyframes typeOut {
    from { width: 0; }
    to { width: 100%; }
}

.cursor {
    font-family: 'Share Tech Mono', monospace;
    color: #ffffff;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.card-left.reveal.visible {
    transform: rotate(-1.5deg);
}

.card-right.reveal.visible {
    transform: rotate(2deg);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #hero {
        padding-left: 8%;
    }

    #philosophy {
        flex-direction: column;
        padding: 10vh 5%;
    }

    .card-left {
        width: 90%;
        transform: rotate(-1deg);
    }

    .card-right {
        position: relative;
        width: 85%;
        right: auto;
        top: auto;
        margin-top: -3rem;
        margin-left: auto;
    }

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

    #nav-pips {
        left: 12px;
    }
}
