/* Variables */
:root {
    --bg: #0f172a;
    --panel: #0b1220;
    --muted: #94a3b8;
    --muted-2: #c7d2fe;
    --accent-500: #a855f7;
    --accent-600: #6366f1;
    --accent-700: #4338ca;
    --card-glow: rgba(99, 102, 241, 0.25);
    --glass: rgba(99, 102, 241, 0.1);
    --radius-lg: 16px;
    --fw-bold: 700;
    --container: 1100px;
}

/* Base */
body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top left, #0b1120, #0f172a 60%);
    color: var(--muted-2);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Smooth Fade */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }

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

/* Header */
.header {
    text-align: center;
    padding: 80px 20px 60px;
    background: linear-gradient(to bottom right, #1e1b4b, #312e81);
    border-bottom: 1px solid var(--glass);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}


.header h1 {
    font-size: 3.2rem;
    font-weight: var(--fw-bold);
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 0 15px var(--accent-600);
}

.header p {
    font-size: 1.2rem;
    color: var(--muted);
    margin-top: 10px;
}

/* Escape Button */
.escape {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 15px var(--accent-600);
    transition: all 0.25s ease;
    z-index: 1000;
    text-decoration: none;
}

.escape:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: scale(1.15) rotate(6deg);
    box-shadow: 0 0 25px var(--accent-500);
}

/* Timeline */
.content {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px 20px;
}

.content::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% + 7px);
    width: 4px;
    background: linear-gradient(to bottom, var(--accent-700), var(--accent-600), var(--accent-500));
    transform: translateX(-50%);
    border-radius: 4px;
    filter: drop-shadow(0 0 6px var(--accent-600));
}

/* Story Cards */
.story {
    position: relative;
    width: 45%;
    background: rgba(11, 18, 32, 0.85);
    border-radius: var(--radius-lg);
    padding: 25px 24px;
    margin: 50px 0;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5), 0 0 12px var(--card-glow);
    backdrop-filter: blur(6px);
    transition: all 0.35s ease;
}

.story:hover {
    background: linear-gradient(145deg, rgba(79,70,229,0.15), rgba(144,19,175,0.15));
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 10px 35px rgba(99,102,241,0.4);
}

.story:nth-child(odd) { left: 0; }
.story:nth-child(even) { left: 55%; }

/* Dots */
.story::before {
    content: "";
    position: absolute;
    top: 30px;
    width: 18px;
    height: 18px;
    background: var(--accent-600);
    border-radius: 50%;
    border: 3px solid #0f172a;
    box-shadow: 0 0 12px var(--accent-500);
}

.story:nth-child(odd)::before { right: -10px; }
.story:nth-child(even)::before { left: -10px; }

/* Text */
.story h2 {
    color: var(--accent-600);
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 12px;
    text-shadow: 0 0 6px rgba(99, 102, 241, 0.3);
}

.story p {
    color: var(--muted);
    font-size: 1rem;
}

/* Highlight */
.highlight {
    background: linear-gradient(90deg, rgba(99,102,241,0.2), rgba(144,19,175,0.25));
    padding: 3px 6px;
    border-radius: 5px;
    color: var(--accent-500);
    font-weight: 600;
    box-shadow: 0 0 8px rgba(99,102,241,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .content::before {
        left: 8px;
    }

    .story {
        width: 100%;
        left: 0 !important;
        padding-left: 40px;
    }

    .story::before {
        left: 10px;
    }

    .header h1 {
        font-size: 2.4rem;
    }
}
