:root {
    /* Color Palette - Light Mode */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Gradients */
    --hero-gradient: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);

    /* Spacing */
    --container-max-width: 900px;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transition */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

body.dark-mode {
    /* Color Palette - Dark Mode */
    --primary-color: #60a5fa;
    --primary-hover: #93c5fd;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);

    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* Layout */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.section {
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Stagger animations */
.section:nth-child(2) {
    animation-delay: 0.1s;
}

.section:nth-child(3) {
    animation-delay: 0.2s;
}

.section:nth-child(4) {
    animation-delay: 0.3s;
}

.section:nth-child(5) {
    animation-delay: 0.4s;
}

.section:nth-child(6) {
    animation-delay: 0.5s;
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 50;
}

#dark-mode-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

#dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

#dark-mode-toggle .icon {
    font-size: 1.25rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 3rem;
    background: var(--hero-gradient);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.hero-content .avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--card-bg);
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.hero-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    background: var(--card-bg);
    padding: 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-btn img {
    width: 24px;
    height: 24px;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

body.dark-mode .social-btn img {
    filter: invert(1);
}

/* Common Components */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Location Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-card .icon {
    font-size: 1.5rem;
}

/* Timeline (Education) */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 1rem;
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.timeline-content p {
    color: var(--text-secondary);
}

/* Work Timeline Specific */
.work-timeline {
    border-left: 2px dashed var(--border-color);
}

.work-timeline .timeline-item::before {
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
}

.work-timeline .timeline-item.current::before {
    background: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

body.dark-mode .work-timeline .timeline-item.current::before {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

/* Skills Grid */
.skills-category {
    margin-bottom: 2rem;
}

.skills-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    font-weight: 700;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.skill-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Tags Cloud (Inspiration) */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: transparent;
    border: 1px dashed var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.resume-link {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.resume-link:hover {
    background: var(--primary-hover);
    color: white;
    box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-name {
        font-size: 2rem;
    }

    .timeline {
        margin-left: 0.5rem;
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -2.1rem;
    }
}