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

/* Root Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --dark-color: #1a1a1a;
    --light-color: #ffffff;
    --gray-color: #666666;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-primary: 'Inter', sans-serif;
    --max-width: 1200px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --dark-color: #f1f5f9;
    --light-color: #0f172a;
    --gray-color: #94a3b8;
    --light-gray: #1e293b;
    --border-color: #334155;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--light-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth transitions for theme switching */
*, *::before, *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

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

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

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

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

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

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 1rem;
}

.theme-toggle:hover {
    background: var(--light-gray);
    color: var(--primary-color);
}

.theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

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

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

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

.hero-image {
    order: 2;
}

.hero-text {
    order: 1;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

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

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--gray-color);
}

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

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    border: 2px solid;
}

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

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--dark-color);
    border-color: var(--dark-color);
}

.btn-secondary:hover {
    background: var(--dark-color);
    color: var(--light-color);
    transform: translateY(-2px);
}

/* Hero Social */
.hero-social {
    display: flex;
    gap: 1rem;
}

.hero-social a {
    width: 80px;
    height: 80px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    font-size: 2rem;
    text-decoration: none;
    transition: var(--transition);
}

.hero-social a:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-2px);
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--light-gray);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
    flex: 1;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--gray-color);
    font-weight: 600;
    margin: 0;
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

[data-theme="dark"] .experience {
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

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

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

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

.timeline-dot {
    position: absolute;
    left: 21px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--light-color);
    box-shadow: 0 0 0 4px var(--border-color);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .timeline-content {
    background: rgba(15, 23, 42, 0.95);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

.timeline-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.company {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
}

.company a {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    font-size: inherit;
}

.company a:hover {
    color: inherit;
}

.duration {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.achievements {
    list-style: none;
    margin-top: 1rem;
}

.achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-color);
}

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

/* Job Skills Tags */
.job-skills {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.job-skills::-webkit-scrollbar {
    display: none;
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Technology Logos */
.tech-logos {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.tech-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 8px;
    background: transparent;
    border-radius: 8px;
    transition: var(--transition);
}

.tech-logo:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.tech-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.4) brightness(0) invert(0.6);
    transition: var(--transition);
}

.tech-logo:hover img {
    filter: grayscale(100%) opacity(0.6) brightness(0) invert(0.6);
}

/* Dark mode logo adjustments */
[data-theme="dark"] .tech-logo img {
    filter: grayscale(100%) opacity(0.4) brightness(0) invert(0.8);
}

[data-theme="dark"] .tech-logo:hover img {
    filter: grayscale(100%) opacity(0.6) brightness(0) invert(0.8);
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--light-gray);
}

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

.skill-category {
    background: var(--light-color);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    text-align: center;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name::after {
    content: attr(data-progress) '%';
    color: var(--primary-color);
    font-size: 0.9rem;
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0;
    transition: width 2s ease;
}

/* Certifications Section */
.certifications {
    padding: 100px 0;
    background: var(--light-gray);
}

.certifications-timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.cert-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.cert-timeline-content {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cert-timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.cert-timeline-header {
    margin-bottom: 1rem;
}

.cert-timeline-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.cert-issuer {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
}

.cert-duration {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.cert-description {
    color: var(--gray-color);
    line-height: 1.6;
    margin: 0;
}


/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 100%;
}

.contact-item {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    height: 220px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex: 1;
}

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

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--light-color);
    font-size: 1.5rem;
}

.contact-details h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.contact-details p {
    margin: 0;
    color: var(--gray-color);
}

.contact-details a {
    color: var(--gray-color);
    text-decoration: none;
    white-space: nowrap;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 80px;
    height: 80px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    font-size: 2rem;
    text-decoration: none;
    transition: var(--transition);
}

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

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

.footer-content p {
    margin: 0.5rem 0;
    color: var(--light-color);
}

/* Footer Dark Mode - Reverse the colors */
[data-theme="dark"] .footer {
    background: var(--light-color);
    color: var(--dark-color);
}

[data-theme="dark"] .footer-content p {
    color: var(--dark-color);
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--light-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }
    
    .theme-toggle {
        order: -1;
        margin-right: 0.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding-top: 60px;
        min-height: auto;
        padding-bottom: 2rem;
    }

    .hero-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        padding: 0.875rem 1.5rem;
    }

    .hero-social {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .hero-social a {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .experience-timeline::before {
        left: 20px;
    }

    .timeline-dot {
        left: 11px;
    }

    .certifications-timeline {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 70px;
        padding-bottom: 1rem;
    }

    .hero-container {
        padding: 0 0.75rem;
    }

    .hero-content {
        gap: 1.5rem;
    }

    .hero-image img {
        width: 280px;
        height: 280px;
        min-height: 280px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .hero-social a {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}