@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Reset & Base --- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #1F2937;
    color: #CBD5E0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: color 0.2s;
}

/* --- Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(31, 41, 55, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #CBD5E0;
    display: none; /* Hidden on mobile to save space */
}

.nav-link {
    color: #94A3B9;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: #55D5CB;
}

@media (min-width: 768px) {
    .nav-brand { display: block; }
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    color: #CBD5E0;
    margin-bottom: 0.5rem;
}

.hero p {
    color: #94A3B9;
    font-size: 1.1rem;
}

/* --- Experience Timeline Container --- */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 5rem 1.5rem;
    position: relative;
}

/* The vertical line */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 2rem; /* Position line */
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .timeline-container::before {
        left: 50%; /* Center line on desktop */
        transform: translateX(-50%);
    }
}

/* --- Timeline Item --- */
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .timeline-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    /* Alternating Layout */
    .timeline-item:nth-child(odd) {
        flex-direction: row-reverse;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        text-align: right; 
    }

    /* Fix bullet points alignment when text-align is right */
    .timeline-item:nth-child(even) .tech-stack {
        justify-content: flex-end;
    }
}

/* The Dot on the line */
.timeline-dot {
    position: absolute;
    left: 2rem;
    top: 0;
    width: 16px;
    height: 16px;
    background: #55D5CB;
    border-radius: 50%;
    border: 3px solid #1F2937;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 0 3px rgba(85, 213, 203, 0.2);
}

@media (min-width: 768px) {
    .timeline-dot {
        left: 50%;
    }
}

/* Date Label */
.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #55D5CB;
    margin-bottom: 0.5rem;
    padding-left: 3rem; /* Space for line on mobile */
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .timeline-date {
        width: 50%;
        padding-left: 0;
        margin-bottom: 0;
        padding: 0 2rem;
        margin-top: -2px; /* Align with dot */
    }
    
    .timeline-item:nth-child(odd) .timeline-date {
        text-align: right;
    }
    
    .timeline-item:nth-child(even) .timeline-date {
        text-align: left;
    }
}

/* Card Content */
.timeline-content {
    background: #2D3748;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-left: 3rem; /* Space for line on mobile */
    transition: transform 0.3s ease, border-color 0.3s ease;
    width: calc(100% - 3rem);
}

.timeline-content:hover {
    transform: translateY(-3px);
    border-color: rgba(85, 213, 203, 0.3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

@media (min-width: 768px) {
    .timeline-content {
        width: 45%;
        margin-left: 0;
    }
}

.role-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #CBD5E0;
    margin: 0 0 0.25rem 0;
}

.company-name {
    font-size: 1rem;
    color: #55D5CB;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.company-svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.role-desc {
    color: #94A3B9;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Tech Badges */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.tech-badge {
    font-size: 0.75rem;
    color: #55D5CB;
    background: rgba(85, 213, 203, 0.1);
    padding: 4px 10px;
    border-radius: 99px;
    font-weight: 500;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #64748B;
    font-size: 0.9rem;
}