:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #2563eb;
    /* Professional Blue */
    --hover-color: #1d4ed8;
    --border-color: #e5e5e5;
    --card-bg: #f9fafb;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Default to dark if system prefers, can be overridden by data-theme="light" */
        --bg-color: #0d1117;
        --text-primary: #e6edf3;
        --text-secondary: #8b949e;
        --accent-color: #4493f8;
        --hover-color: #58a6ff;
        --border-color: #30363d;
        --card-bg: #161b22;
    }
}

[data-theme="dark"] {
    --bg-color: #0d1117;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #4493f8;
    --hover-color: #58a6ff;
    --border-color: #30363d;
    --card-bg: #161b22;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #2563eb;
    --hover-color: #1d4ed8;
    --border-color: #e5e5e5;
    --card-bg: #f9fafb;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent-color);
}

/* Header */
.header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
}

.greeting {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.name {
    font-size: 3rem;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Section Common */
.section {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Experience Timeline */
/* Experience Timeline - Modern Cards */
.timeline {
    position: relative;
        padding-left: 2rem;
        border-left: none;
        margin-left: 0;
    }
    
    /* The vertical line */
    .timeline::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--border-color);
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
    background: var(--card-bg);
        padding: 1.5rem;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-color);
}

/* Arrow pointing to line */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
        top: 2rem;
    width: 12px;
    height: 12px;
    background: var(--card-bg);
        border-left: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-50%) rotate(45deg);
        transition: border-color 0.2s, background-color 0.2s;
        z-index: 1;
    }
    
    .timeline-item:hover::before {
        border-left-color: var(--accent-color);
        border-bottom-color: var(--accent-color);
    }
    
    /* Dot on the line */
    .timeline-item::after {
        content: '';
        position: absolute;
        left: -2rem;
        /* Matches padding-left of timeline */
        top: 2rem;
        width: 10px;
        height: 10px;
        background: var(--accent-color);
    border-radius: 50%;
    border: 2px solid var(--bg-color);
        box-shadow: 0 0 0 2px var(--accent-color);
        transform: translate(-50%, -50%);
        z-index: 2;
        transition: transform 0.2s;
    }
    
    .timeline-item:hover::after {
        transform: translate(-50%, -50%) scale(1.2);
}

.timeline-header {
    display: flex;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
        position: relative;
        /* For absolute positioning of date if needed */
    }
    
    .company-logo {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        object-fit: contain;
        background: white;
        padding: 4px;
        border: 1px solid var(--border-color);
        flex-shrink: 0;
    }
    
    .header-content {
        flex: 1;
        display: flex;
        flex-direction: column;
}

.role {
    font-size: 1.1rem;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 0.2rem;
        padding-right: 100px;
        /* Space for date if absolute */
}

.company {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    }
    
    .date {
        display: inline-block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--accent-color);
        background: rgba(37, 99, 235, 0.1);
        padding: 4px 8px;
        border-radius: 4px;
    
        /* Position date top-right like in preview */
        position: absolute;
        right: 0;
        top: 0;
    }
    
    [data-theme="dark"] .date {
        background: rgba(68, 147, 248, 0.15);
}

/* Adjust date for mobile */
@media (max-width: 600px) {
    .date {
        position: relative;
            margin-top: 0.5rem;
            width: fit-content;
            right: auto;
            top: auto;
        }
        
        .role {
            padding-right: 0;
        }
}

.timeline-details {
    margin-top: 1rem;
    list-style: none;
    color: var(--text-secondary);
}

.timeline-details li {
    margin-bottom: 0.5rem;
    position: relative;
        padding-left: 1.2rem;
        font-size: 0.95rem;
}

.timeline-details li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Grid Layout (Projects & Awards) */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--accent-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.project-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    /* optional: background: white; padding: 2px; border-radius: 4px; */
}

.card h3 {
    margin: 0;
    /* Handled by card-header gap and margin-bottom */
    font-size: 1.1rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

.subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.compact-list {
    list-style: none;
    font-size: 0.95rem;
}

.compact-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.compact-list strong {
    color: var(--text-primary);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-group h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.25rem;
}

.skill-group p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer-section {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
}

.text-center {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
    .navbar {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .navbar.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 1.5rem;
    }

    .name {
        font-size: 2.25rem;
    }

    .hero {
        padding-top: 4rem;
    }
}