:root {
    /* Light Mode Colors */
    --background-color-light: #f4f6f9;
    --text-color-light: #2c3e50;
    --accent-color-light: #3498db;
    --secondary-text-light: #7f8c8d;
    --border-color-light: #e1e6eb;
    --card-background-light: #ffffff;
    --shadow-light-light: rgba(0, 0, 0, 0.08);

    /* Dark Mode Colors */
    --background-color-dark: #121212;
    --text-color-dark: #e0e0e0;
    --accent-color-dark: #4fc3f7;
    --secondary-text-dark: #b0b0b0;
    --border-color-dark: #333;
    --card-background-dark: #1e1e1e;
    --shadow-light-dark: rgba(255, 255, 255, 0.1);

    /* Default to Light Mode */
    --background-color: var(--background-color-light);
    --text-color: var(--text-color-light);
    --accent-color: var(--accent-color-light);
    --secondary-text: var(--secondary-text-light);
    --border-color: var(--border-color-light);
    --card-background: var(--card-background-light);
    --shadow-light: var(--shadow-light-light);
}

/* Dark Mode Styles */
body.dark-mode {
    --background-color: var(--background-color-dark);
    --text-color: var(--text-color-dark);
    --accent-color: var(--accent-color-dark);
    --secondary-text: var(--secondary-text-dark);
    --border-color: var(--border-color-dark);
    --card-background: var(--card-background-dark);
    --shadow-light: var(--shadow-light-dark);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, var(--background-color) 0%, color-mix(in srgb, var(--background-color) 95%, var(--accent-color)) 100%);
    color: var(--text-color);
    scroll-behavior: smooth;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-switch-input {
    display: none;
}

.theme-switch-label {
    cursor: pointer;
    background-color: var(--border-color);
    border-radius: 50%;
    padding: 10px;
    display: inline-block;
}

.theme-switch-icon {
    font-size: 1.2rem;
}

.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.sticky-nav {
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background-color: color-mix(in srgb, var(--card-background) 80%, transparent);
    z-index: 100;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: transform 0.3s ease;
}

.sticky-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
}

.sticky-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sticky-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}

.sticky-nav a:hover::after {
    width: 100%;
    left: 0;
}

.sticky-nav a:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 6px var(--shadow-light);
}

.header-text h1 {
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--accent-color);
}

.tagline {
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.bio {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: var(--secondary-text);
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 300;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    color: var(--accent-color);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

p {
    line-height: 1.7;
    font-weight: 300;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 30px;
    padding-left: 20px;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-light);
    padding: 15px;
}

.timeline-item.reveal {
    opacity: 1;
    transform: scale(1);
}

.timeline-logo {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    flex-shrink: 0;
}

.timeline-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-light);
}

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

.project-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    transition: all 0.4s ease;
    will-change: transform, box-shadow;
}

.project-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.project-card h3 {
    margin-bottom: 10px;
    color: var(--accent-color);
}

.project-links {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

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

.project-links a:hover {
    color: #2e6da4;
}

.skills-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.skill-category h3 {
    margin-bottom: 15px;
    text-align: center;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.skill-tag {
    background-color: var(--border-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.contact {
    text-align: center;
    margin-top: 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.contact-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

#typed-tagline {
    min-height: 1.5em;  
    display: inline-block;
    border-right: 2px solid var(--text-color);
    animation: blink-caret 0.7s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--text-color); }
}

@keyframes subtleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }

    .skills-categories {
        grid-template-columns: 1fr;
    }

    .sticky-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
    }
}
