:root {
    /* Light Mode Theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f7;    --text-primary: #1a1a1a;
    --text-secondary: #325773;    
    --accent: #2d5c88;
    --accent-gradient: linear-gradient(135deg, #2d5c88, #3a7ab3);
    --hero-gradient: linear-gradient(150deg, #ffffff 0%, #f8fafd 45%, #f5f9fc 100%);
    --accent-dark: #1a1a1a;
    --border: rgba(0, 0, 0, 0.08);
    --card-bg: rgba(255, 255, 255, 1);
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;    --text-primary: #ffffff;
    --text-secondary: #a8c5e0;    
    --accent: #90caf9;
    --accent-gradient: linear-gradient(135deg, #90caf9, #64b5f6);
    --hero-gradient: linear-gradient(150deg, #1a1a1a 0%, #1c2026 45%, #1a1e24 100%);
    --accent-dark: #42a5f5;
    --border: rgba(255, 255, 255, 0.15);
    --card-bg: rgba(30, 30, 30, 0.95);
}

[data-theme="dark"] .hero {
    position: relative;
}

[data-theme="dark"] .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at top right,
        rgba(144, 202, 249, 0.12) 0%,
        rgba(144, 202, 249, 0.05) 35%,
        transparent 70%
    );
    pointer-events: none;
}

/* Theme Toggle Styles */
.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    margin: -0.5rem 0;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent);
}

.theme-toggle svg {
    width: 1.2rem;
    height: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Smooth transitions for theme switching */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

header,
.experience-item,
.skill-category,
.contact-button {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding-top: 5rem;/* Add padding to account for fixed header */
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

nav ul {
    display: flex;
    gap: 3rem;
    list-style: none;
    align-items: center;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Dark mode specific header styles */
[data-theme="dark"] header {
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .logo {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(144, 202, 249, 0.2);
}

[data-theme="dark"] nav ul li a {
    color: var(--text-primary);
}

[data-theme="dark"] nav ul li a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
    background: var(--hero-gradient);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.hero-text p {
    color: #2b2b2b;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.profile-image {
    width: 300px;
    height: 350px;  /* Increased height to prevent cropping */
    border-radius: 1rem;
    object-fit: cover;
    object-position: center 20%;  /* Adjust to prevent head cropping */    border: 2px solid var(--border);
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.profile-image:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: transparent;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2),
        0 0 0 2px var(--accent);
}

[data-theme="dark"] .profile-image {
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(144, 202, 249, 0.1);
}

[data-theme="dark"] .profile-image:hover {
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 10px 20px rgba(0, 0, 0, 0.4),
        0 0 0 2px var(--accent);
}

.hero-unicorn {
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.unicorn-image {
    width: 120px;
    height: 120px;
    transition: transform 0.5s ease;
    animation: float 3s ease-in-out infinite;
}

.unicorn-image:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Sections */
section {
    padding: 4rem 2rem;
}

section:nth-child(even) {
    background-color: var(--bg-secondary);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
    margin: 0 auto 3rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Experience */
.experience-grid {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.experience-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s ease;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.1);
    border-color: var(--accent);
}

.experience-item h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.experience-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.period {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Skills */
.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
    color: var(--accent);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Skill subcategories */
.skill-subcategory {
    margin-bottom: 1.5rem;
}

.skill-subcategory h4 {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.skill-list li {
    background: rgba(59, 130, 246, 0.05);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-list li:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Dark mode specific styles */
[data-theme="dark"] .experience-item,
[data-theme="dark"] .skill-category {
    background: var(--bg-secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .skill-list li {
    background: rgba(144, 202, 249, 0.1);
    border: 1px solid rgba(144, 202, 249, 0.2);
}

[data-theme="dark"] .skill-list li:hover {
    background: rgba(144, 202, 249, 0.15);
    box-shadow: 0 4px 12px rgba(144, 202, 249, 0.2);
}

[data-theme="dark"] .theme-toggle {
    color: var(--text-primary);
}

[data-theme="dark"] .theme-toggle:hover {
    color: var(--accent);
}

/* Dark mode hero text override */
[data-theme="dark"] .hero-text p {
    color: #b4b4b4;
}

/* Contact */
.contact-section {
    background-color: var(--bg-secondary);
    text-align: center;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-button {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.contact-button:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-button:hover .contact-icon {
    transform: scale(1.1);
}

/* Dark mode specific styles for contact buttons */
[data-theme="dark"] .contact-button {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .contact-button:hover {
    background-color: var(--accent);
    border-color: var(--accent);
}

[data-theme="dark"] .hero::before {
    background: radial-gradient(
        circle at top right,
        rgba(144, 202, 249, 0.08) 0%,
        rgba(144, 202, 249, 0.03) 25%,
        transparent 50%
    );
}

/* Scroll Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

.scale-up {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-up.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax effect */
.parallax {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .hero-content {
        gap: 2rem;
    }

    section {
        padding: 3rem 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .hero {
        padding: 4rem 1.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
        display: flex;
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

    .hero-text h2 {
        font-size: 1.25rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .profile-image {
        width: 250px;
        height: 300px;
    }

    .nav-container {
        padding: 1rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    .experience-item {
        padding: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .skill-list {
        gap: 0.75rem;
    }

    .contact-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    nav ul {
        gap: 1rem;
    }

    nav ul li a {
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .profile-image {
        width: 200px;
        height: 250px;
    }

    .experience-item h3 {
        font-size: 1.25rem;
    }

    .skill-list li {
        font-size: 0.85rem;
    }
}

/* Mobile Navigation */
@media screen and (max-width: 640px) {
    .nav-container {
        position: relative;
    }

    nav {
        position: fixed;
        top: 4rem;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        padding: 1rem;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 0.5rem;
        color: var(--text-primary);
        cursor: pointer;
    }

    .mobile-menu-toggle svg {
        width: 24px;
        height: 24px;
    }
}
