:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --accent-color: #38bdf8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --gold: #fbbf24;
    --panel-border: rgba(148, 163, 184, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    overflow: hidden;
}

.background-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Header */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding: 2rem;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(120deg, var(--accent-color), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #94a3b8;
    max-width: 800px;
    margin-bottom: 3rem;
}

.scroll-indicator {
    margin-top: auto;
    margin-bottom: 2rem;
    color: #cbd5e1;
    animation: fade-bounce 2s infinite;
}

/* Timeline */
.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 4rem 2rem;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, 
        transparent, 
        var(--accent-color) 20%, 
        var(--accent-color) 80%, 
        transparent
    );
    transform: translateX(-50%);
    z-index: 0;
    box-shadow: 0 0 15px var(--accent-color);
}

.stage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8rem;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

.stage-content, .stage-visual {
    width: 45%;
    position: relative;
    z-index: 1;
}

/* Text Side */
.stage-text {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stage-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.stage h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.skills-list {
    list-style: none;
    margin-top: 1.5rem;
}

.skills-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
}

.skills-list li::before {
    content: '✓';
    color: var(--accent-color);
    margin-right: 10px;
    font-weight: bold;
}

/* Visual Side */
.stage-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stage-img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.2));
    transition: transform 0.5s ease;
}

.stage:hover .stage-img {
    transform: scale(1.05) rotate(2deg);
}

/* Specialized Styles for Final Stage */
.gold-text {
    color: var(--gold) !important;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.final-stage .stage-text {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.05);
}

.trophy-img {
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.4));
}

.achievement-badge {
    margin-top: 2rem;
    background: linear-gradient(45deg, var(--gold), #f59e0b);
    color: #1e293b;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    animation: pulse 2s infinite;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fade-bounce {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    
    .timeline-line {
        left: 20px;
    }
    
    .stage {
        flex-direction: column !important; /* Force column layout on mobile */
        align-items: flex-start;
        margin-left: 20px; /* Space for the line */
        padding-left: 20px;
    }
    
    .stage-content, .stage-visual {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .timeline-container {
        padding: 2rem 1rem;
    }

    .stage-visual {
        order: -1; /* Image first on mobile */
    }
}
