:root {
    /* Dark mode (default) */
    --bg-primary: #0d0d0f;
    --bg-secondary: #161619;
    --bg-tertiary: #1e1e22;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a8;
    --accent: #8c5efc;
    --accent-hover: #9f77ff;
    --shadow: rgba(0, 0, 0, 0.2);
    --timeline-bg: rgba(23, 23, 26, 0.8);
    --card-bg: rgba(30, 30, 34, 0.8);
    --card-border: rgba(140, 94, 252, 0.2);
    --nav-bg: rgba(13, 13, 15, 0.8);
    --toggle-bg: rgba(30, 30, 34, 0.8);
    --toggle-active: #8c5efc;
}

[data-theme="light"] {
    --bg-primary: #f9f9fb;
    --bg-secondary: #f0f0f4;
    --bg-tertiary: #e5e5e9;
    --text-primary: #111111;
    --text-secondary: #666666;
    --accent: #6c3ce9;
    --accent-hover: #5428cc;
    --shadow: rgba(0, 0, 0, 0.1);
    --timeline-bg: rgba(245, 245, 250, 0.8);
    --card-bg: rgba(250, 250, 255, 0.8);
    --card-border: rgba(108, 60, 233, 0.2);
    --nav-bg: rgba(249, 249, 251, 0.8);
    --toggle-bg: rgba(220, 220, 225, 0.8);
    --toggle-active: #6c3ce9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

.theme-toggle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 5px;
}

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

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    max-width: 800px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Animated Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.2;
    pointer-events: none;
}

/* Content Toggle Switch */
.content-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    padding-top: 50px;
}

.content-toggle {
    position: relative;
    background-color: var(--toggle-bg);
    border-radius: 50px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toggle-option {
    position: relative;
    padding: 12px 24px;
    border-radius: 44px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-option.active {
    color: white;
}

.toggle-slider {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: linear-gradient(45deg, var(--toggle-active), var(--accent-hover));
    border-radius: 44px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(140, 94, 252, 0.3);
}

.toggle-slider.career {
    transform: translateX(100%);
}

/* Timeline Section */
.timeline-section {
    padding: 50px 0 100px;
    position: relative;
}

.timeline-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--accent);
    transform: translateX(-50%);
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd)::before {
    content: '';
    position: absolute;
    top: 40px;
    right: 30px;
    width: 20px;
    height: 20px;
    background-color: var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 30px;
    width: 20px;
    height: 20px;
    background-color: var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px var(--shadow);
}

.timeline-item:nth-child(odd) .timeline-content {
    border-radius: 20px 0 20px 20px;
}

.timeline-item:nth-child(even) .timeline-content {
    border-radius: 0 20px 20px 20px;
}

.timeline-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.timeline-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.timeline-content .date {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--accent);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.timeline-content .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.timeline-content .tag {
    padding: 5px 12px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.85rem;
}

.timeline-content .skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.timeline-content .skill {
    padding: 6px 14px;
    background: linear-gradient(45deg, var(--accent), var(--accent-hover));
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.timeline-icon i {
    color: white;
    font-size: 1.5rem;
}

/* Project Links Styling */
.project-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.project-link:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.project-link i {
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 80px 0 40px;
    border-top: 1px solid var(--card-border);
}

footer h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

footer > .container > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: var(--card-bg);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
}

.social-links a:hover {
    color: var(--accent);
    background-color: var(--bg-tertiary);
    transform: translateX(5px);
}

.social-links a i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
}

.footer-bottom p {
    color: var(--text-secondary);
    margin: 0;
}

/* Hide/Show content based on toggle */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(0) translateX(20px); }
    75% { transform: translateY(20px) translateX(10px); }
    100% { transform: translateY(0) translateX(0); }
}

@keyframes pulse {
    0% { opacity: 0.2; }
    100% { opacity: 0.8; }
}

/* Responsive */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .timeline::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px;
        padding-right: 20px;
    }

    .timeline-item::before {
        left: 20px !important;
        right: auto !important;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        border-radius: 20px;
    }
}

@media (max-width: 767px) {
    .navbar {
        height: 60px;
    }

    .logo a {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .content-toggle {
        flex-direction: column;
        gap: 4px;
        padding: 4px;
    }

    .toggle-option {
        width: 100%;
        text-align: center;
    }

    .toggle-slider {
        width: calc(100% - 8px);
        height: 44px;
    }

    .toggle-slider.career {
        transform: translateY(100%);
    }

    .project-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-link {
        width: 100%;
        justify-content: center;
    }
}
