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

:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --border-color: #e5e7eb;
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Dark Theme Variables */
body.dark-theme {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-accent: #374151;
    --border-color: #374151;
    --gradient-bg: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--gradient-bg);
    scroll-behavior: smooth;
    transition: all 0.3s ease;
}

/* Dark theme header adjustments */
body.dark-theme .fancy-header {
    background: rgba(17, 24, 39, 0.95) !important;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

/* Fancy Header */
.fancy-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.cv-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.cv-link:hover {
    color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: max-content;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-accent);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    padding: 100px 0 60px;
    background: var(--gradient-bg);
    position: relative;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%239C92AC" fill-opacity="0.05" fill-rule="nonzero"><circle cx="30" cy="30" r="4"/></g></g></svg>');
    opacity: 0.4;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 0.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: var(--bg-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* CV Link Styling */
.cv-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem;
    background: transparent;
    transition: all 0.3s ease;
}

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

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

/* Dark mode adjustments for CV link */
[data-theme="dark"] .cv-link {
    border-color: var(--accent-color);
}

[data-theme="dark"] .cv-link:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Contact Section */
.contact-section {
    background: var(--bg-primary);
}

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

.contact-item {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
}

.contact-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
}

.about-text > p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.highlight-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.highlight-item span {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Education Section */
.education-section {
    background: var(--bg-primary);
}

.education-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--gradient-primary);
    padding: 3rem;
    border-radius: 20px;
    color: white;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.education-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.education-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.education-content .degree {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.education-content .university {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.education-content .description {
    line-height: 1.6;
    opacity: 0.9;
}

/* Experience Section */
.experience-section {
    background: var(--bg-secondary);
}

.experience-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.experience-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.experience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.experience-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.experience-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.experience-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.experience-info .company {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.experience-info .duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.experience-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.responsibilities h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.responsibilities ul {
    list-style: none;
    padding-left: 0;
}

.responsibilities li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.responsibilities li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.tech-stack {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-accent);
    border-radius: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

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

/* Projects Section */
.projects-section {
    background: var(--bg-primary);
}

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

.project-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-tech {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

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

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Skills Section */
.skills-section {
    background: var(--bg-secondary);
}

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

.skill-category {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.skill-category h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-category p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        border-right: 1px solid var(--border-color);
        backdrop-filter: blur(20px);
        padding: 2rem;
    }
    
    .nav-menu.mobile-open {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-radius: 12px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: var(--bg-accent);
        transform: translateY(-2px);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .cv-link {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        border-radius: 12px;
        background: var(--gradient-primary);
        color: white !important;
        border: none;
        box-shadow: var(--shadow-lg);
        transform: none;
    }
    
    .cv-link:hover {
        background: var(--gradient-secondary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl);
    }
    
    .header-actions {
        position: absolute;
        top: 1rem;
        right: 4rem;
    }
    
    .theme-toggle {
        background: var(--bg-accent);
        border: 1px solid var(--border-color);
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .education-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    
    .experience-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-text {
        padding: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .experience-card {
        padding: 1.5rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .contact-item {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .nav-menu {
        gap: 0.75rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
    }
    
    .cv-link {
        font-size: 0.75rem;
    }
    
    .about-text {
        padding: 1.5rem;
    }
    
    .education-card {
        padding: 1.5rem;
    }
    
    .experience-card {
        padding: 1.25rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .contact-item {
        padding: 1.25rem;
    }
}
