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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

/* CSS Variables for Theming */
:root {
    --primary-color: #3f70d3;
    --secondary-color: #1d4ed8;
    --accent-color: #7c3aed;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --bg-color: #ffffff;
    --surface-color: #f8fafc;
    --card-color: #ffffff;
    --text-color: #385699;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #293752;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #059669 0%, #0891b2 100%);
}

[data-theme="dark"] {
    --primary-color: #60a5fa;
    --secondary-color: #3b82f6;
    --accent-color: #a78bfa;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --card-color: #334155;
    --text-color: #1b88f5;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --border-light: #64748b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

[data-theme="purple"] {
    --primary-color: #8b5cf6;
    --secondary-color: #7c3aed;
    --accent-color: #c084fc;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-color: #faf5ff;
    --surface-color: #f3e8ff;
    --card-color: #ffffff;
    --text-color: #4c1d95;
    --text-secondary: #6d28d9;
    --text-muted: #9333ea;
    --border-color: #d8b4fe;
    --border-light: #e9d5ff;
    --shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.15);
    --shadow-lg: 0 20px 25px -5px rgba(139, 92, 246, 0.15);
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background-color: rgba(17, 24, 39, 0.95);
}

[data-theme="dark"] .nav-link {
    color: var(--text-color);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

[data-theme="dark"] .nav-link.active {
    color: var(--primary-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-weight: 700;
}

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

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

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--surface-color) 100%);
    padding-top: 80px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--surface-color);
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

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

.hero-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background-color: var(--surface-color);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px dashed var(--border-color);
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.image-placeholder i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.image-placeholder p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: var(--surface-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.philosophy {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.philosophy h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.philosophy ul {
    list-style: none;
}

.philosophy li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

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

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

.skill-category {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.skill {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Projects Section */
.projects {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.project-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn.active,
.category-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.project-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* Certifications Section */
.certifications {
    padding: 5rem 0;
    background-color: var(--surface-color);
}

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

.cert-card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
}

.cert-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cert-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.cert-card ul {
    list-style: none;
    text-align: left;
}

.cert-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.cert-card li::before {
    content: '🏆';
    position: absolute;
    left: 0;
}

/* GitHub Stats Section */
.github-stats {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.github-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.github-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.github-info p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.github-link:hover {
    color: var(--secondary-color);
}

.github-embed {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--surface-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.contact-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(10px);
}

.contact-link i {
    font-size: 1.5rem;
}

.contact-form {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: var(--bg-color);
    text-align: center;
    padding: 2rem 0;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-light {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
}

.theme-dark {
    background: linear-gradient(135deg, #111827, #374151);
}

.theme-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .github-content {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .project-categories {
        justify-content: center;
    }
    
    .theme-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        top: auto;
        transform: none;
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    /* Ensure the animation completes with the final state */
    opacity: 1;
    transform: translateY(0);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Experience Page Styles */
.career-timeline {
    margin: 4rem 0;
}

.timeline-entry {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
    border-left: 2px solid var(--accent-color);
}

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

.timeline-date {
    font-size: 0.9rem;
    color: var(--muted-text);
    margin-bottom: 0.5rem;
}

.timeline-role {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.timeline-company {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.timeline-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Coffee Mastery Section Styles */
.coffee-mastery {
    padding: 4rem 0;
    background-color: var(--card-bg);
}

.coffee-mastery-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.coffee-mastery-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

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

.expertise-card {
    background: var(--card-bg-alt);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expertise-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.expertise-card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.expertise-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--heading-color);
}

.expertise-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color);
}

.certifications-showcase {
    margin-top: 1rem;
}

.certifications-showcase h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--heading-color);
    text-align: center;
}

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.cert-badge {
    background: var(--card-bg-alt);
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.cert-badge:hover {
    transform: translateY(-3px);
}

.cert-badge i {
    color: var(--accent-color);
}

.cert-badge span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.cert-badge.highlight {
    background: linear-gradient(135deg, var(--accent-color-light), var(--accent-color));
}

.cert-badge.highlight i,
.cert-badge.highlight span {
    color: rgb(6, 5, 7);
}