:root {
    /* Dark Mode (Default) */
    --bg-color: #0b0f19;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-main: 'Outfit', sans-serif;
    --radius-lg: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --header-bg: rgba(11, 15, 25, 0.8);
    --blob-1: rgba(99, 102, 241, 0.15);
    --blob-2: rgba(168, 85, 247, 0.1);
    --timeline-bg: rgba(168, 85, 247, 0.1);
    --timeline-text: #d8b4fe;
    --card-hover-border: rgba(99, 102, 241, 0.3);
    --title-gradient: linear-gradient(135deg, #fff, #94a3b8);
}

[data-theme="light"] {
    /* Light Mode (10 AM Blue Sky) */
    --bg-color: #e0f2fe;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(255, 255, 255, 0.9);
    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.4);
    --secondary: #0ea5e9;
    --text-main: #0f172a;
    --text-muted: #334155;
    
    --header-bg: rgba(224, 242, 254, 0.85);
    --blob-1: rgba(14, 165, 233, 0.2);
    --blob-2: rgba(250, 204, 21, 0.25); /* morning sun */
    --timeline-bg: rgba(2, 132, 199, 0.15);
    --timeline-text: #0284c7;
    --card-hover-border: rgba(2, 132, 199, 0.5);
    --title-gradient: linear-gradient(135deg, #0f172a, #334155);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background blob animation */
.blob-bg {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--blob-1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s infinite ease-in-out alternate;
    pointer-events: none;
}
.blob-bg::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--blob-2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: center;
    z-index: 100;
    transition: var(--transition);
}

header.scrolled {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 5%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 2rem;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}
.theme-toggle:hover {
    background: var(--primary);
    color: #fff;
    transform: rotate(15deg);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}
.nav-links a:hover {
    color: var(--primary);
}

/* Typography & Utils */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

h1, h2, h3 {
    font-weight: 600;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--card-hover-border);
}

.mt-4 {
    margin-top: 2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero .highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h2 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.hero .location {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--primary-glow);
}

/* Skills Grid */
.skills-section {
    padding: 6rem 0;
}

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

.skill-card h3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.3rem;
}

.skill-card ul {
    list-style: none;
    color: var(--text-muted);
}

.skill-card ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.skill-card ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--secondary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tags span {
    background: var(--timeline-bg);
    border: 1px solid var(--card-hover-border);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.language-bars .lang {
    margin-bottom: 1rem;
}
.language-bars span {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
}
.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    position: relative;
}

/* Timeline / Experience */
.timeline-section {
    padding: 6rem 0;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--card-border);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

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

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-content h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 1rem;
}

.timeline-content h4 span {
    color: var(--secondary);
}

.timeline-content .date {
    display: inline-block;
    background: var(--timeline-bg);
    color: var(--timeline-text);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    color: var(--text-muted);
}
.timeline-content ul li {
    margin-bottom: 0.6rem;
    padding-left: 1.2rem;
    position: relative;
}
.timeline-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Education & Certifications */
.edu-cert-section {
    padding: 6rem 0;
}

.edu-cert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .edu-cert-grid {
        grid-template-columns: 1fr;
    }
}

.edu-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}
.edu-card h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-weight: 500;
}
.edu-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}
.edu-card .date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.cert-card {
    height: 100%;
}
.cert-card h3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.cert-list {
    list-style: none;
    color: var(--text-muted);
}

.cert-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

/* Projects Section */
.projects-section {
    padding: 6rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-header {
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.category-badge {
    display: inline-block;
    background: var(--timeline-bg);
    color: var(--timeline-text);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-card .description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.key-contributions {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes tags to the bottom if cards vary in size */
}

.key-contributions li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.key-contributions li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.project-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.project-links .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.project-links .btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.align-icon {
    color: #ef4444;
}

/* Animations - Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-load {
    animation: fadeUp 1s cubic-bezier(0.5, 0, 0, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base Responsive */
@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
    }
    .nav-links {
        display: none; /* Mobile menu could be added here for further expansion */
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .timeline {
        padding-left: 20px;
    }
}
