@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&display=swap');

:root {
    --primary: #4a6bff;
    --primary-dark: #3550db;
    --accent: #00f3ff;
    --accent-purple: #9d4edd;
    --dark: #080914;
    --dark-card: rgba(18, 20, 38, 0.65);
    --light: #f8f9ff;
    --bg-light: #0d0f22;
    --bg-alt: #0a0c1b;
    --gray: #9ba0b8;
    --success: #00ff88;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    --glow: 0 0 20px rgba(74, 107, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.06);
}

/* Light Mode Overrides */
body:not(.dark-theme) {
    --dark: #ffffff;
    --light: #0b0d1a;
    --bg-light: #f4f6fc;
    --bg-alt: #ebedfa;
    --dark-card: rgba(255, 255, 255, 0.75);
    --gray: #646a86;
    --shadow: 0 15px 35px rgba(74, 107, 255, 0.06);
    --glow: 0 0 20px rgba(74, 107, 255, 0.1);
    --glass-border: rgba(74, 107, 255, 0.08);
}

/* Base Styles */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 80px; 
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(74, 107, 255, 0.07) 0%, transparent 35%),
        radial-gradient(circle at 90% 75%, rgba(157, 78, 221, 0.06) 0%, transparent 35%);
}

body:not(.dark-theme) {
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(74, 107, 255, 0.04) 0%, transparent 35%),
        radial-gradient(circle at 90% 75%, rgba(157, 78, 221, 0.03) 0%, transparent 35%);
}

/* Scroll Progress */
.scroll-progress { 
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 4px; 
    background: linear-gradient(90deg, var(--primary), var(--accent)); 
    z-index: 1001; 
    width: 0%; 
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

/* Typography */
h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Utilities */
.bg-alt { 
    background-color: var(--bg-alt); 
}
.column-layout { 
    grid-template-columns: 1fr !important; 
    text-align: center; 
}
.section-title { 
    font-size: 2.8rem; 
    font-weight: 800;
    margin-bottom: 3.5rem; 
    text-align: center; 
    color: var(--light); 
    position: relative;
    letter-spacing: -0.5px;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 12px auto 0 auto;
    border-radius: 10px;
}
.highlight { 
    background: linear-gradient(120deg, var(--accent), var(--primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Navigation */
header {
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000;
    background: rgba(8, 9, 20, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}
body:not(.dark-theme) header {
    background: rgba(255, 255, 255, 0.85);
}

nav {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 1.2rem 5%; 
    max-width: 1400px; 
    margin: 0 auto;
}
.logo { 
    font-size: 1.6rem; 
    font-weight: 800; 
    background: linear-gradient(90deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 2.2rem; 
    align-items: center; 
}
.nav-links a { 
    text-decoration: none; 
    color: var(--gray); 
    font-weight: 500; 
    font-size: 1rem;
    transition: 0.3s; 
    position: relative;
    padding: 4px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transition: width 0.3s ease;
}
.nav-links a:hover::after, 
.nav-links a.active::after {
    width: 100%;
}
.nav-links a:hover, 
.nav-links a.active { 
    color: var(--light); 
}

/* Mobile Menu (Hamburger) */
.hamburger { 
    display: none; 
    font-size: 1.6rem; 
    cursor: pointer; 
    color: var(--light); 
}

/* Theme Toggle */
.theme-toggle { 
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid var(--glass-border); 
    font-size: 1.2rem; 
    cursor: pointer; 
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light); 
    transition: 0.3s; 
}
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

/* Sections */
section { 
    padding: 120px 5%; 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
}
.container {
    max-width: 1200px; 
    margin: 0 auto; 
    width: 100%;
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 5rem; 
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    color: white;
    text-decoration: none; 
    border-radius: 50px;
    font-weight: 600; 
    transition: all 0.3s ease; 
    border: none;
    box-shadow: 0 4px 15px rgba(74, 107, 255, 0.3);
    cursor: pointer;
}
.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(74, 107, 255, 0.5); 
}
.btn-outline { 
    background: transparent; 
    color: var(--light); 
    border: 2px solid var(--primary);
    margin-left: 12px; 
    box-shadow: none;
}
.btn-outline:hover { 
    background: var(--primary); 
    color: white; 
}
.btn-cv {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #080914;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3);
    cursor: pointer;
    margin-left: 12px;
}
body:not(.dark-theme) .btn-cv {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    box-shadow: 0 4px 15px rgba(74, 107, 255, 0.25);
}
.btn-cv:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 243, 255, 0.55);
}
body:not(.dark-theme) .btn-cv:hover {
    box-shadow: 0 8px 25px rgba(74, 107, 255, 0.45);
}
.btn-cv i {
    font-size: 1.05rem;
    transition: transform 0.3s ease;
}
.btn-cv:hover i {
    transform: translateY(2px);
}
.btn-sm { 
    padding: 8px 20px; 
    font-size: 0.9rem; 
}

/* Images & Visuals */
.img-section {
    position: relative;
}
.img-section::before {
    content: '';
    position: absolute;
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, transparent 70%);
    z-index: -1;
}
.img-section img { 
    width: 100%; 
    border-radius: 24px; 
    box-shadow: var(--shadow); 
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}
.img-section img:hover {
    transform: scale(1.02);
}

/* Typing Effect */
.typing-container {
    margin: 1.5rem 0;
}
.typing {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gray);
    border-right: 3px solid var(--accent);
    white-space: nowrap; 
    overflow: hidden;
    width: 0; 
    animation: typing 3.5s steps(30, end) forwards, blink .75s step-end infinite;
}
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink { from, to { border-color: transparent; } 50% { border-color: var(--accent); } }

/* Technical Skills */
.skills-row { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 2.5rem; 
    margin-bottom: 4rem; 
}
.skill { 
    text-align: center; 
    width: 100px; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    padding: 1.2rem 0.5rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.skill:hover { 
    transform: translateY(-8px) scale(1.05); 
    border-color: var(--accent);
    box-shadow: var(--glow);
}
.skill img {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}
.skill p { 
    margin-top: 0.8rem; 
    font-weight: 600; 
    font-size: 0.85rem; 
}
.languages-box {
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    display: inline-block;
    box-shadow: var(--shadow);
    margin-top: 1rem;
}
.languages-box h2 { 
    margin-bottom: 0.8rem; 
    font-size: 1.4rem;
    background: linear-gradient(90deg, var(--accent), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.languages-box p {
    font-size: 1rem;
    color: var(--gray);
    letter-spacing: 0.5px;
}

/* Projects */
.projects-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2.5rem; 
    width: 100%; 
}
.project-card {
    background: var(--dark-card); 
    border: 1px solid var(--glass-border);
    border-radius: 20px; 
    overflow: hidden;
    box-shadow: var(--shadow); 
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}
.project-card:hover { 
    transform: translateY(-10px); 
    border-color: rgba(0, 243, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 243, 255, 0.15); 
}
.project-img { 
    width: 100%; 
    height: 210px; 
    object-fit: cover; 
    border-bottom: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}
.project-card:hover .project-img {
    transform: scale(1.03);
}
.project-info { 
    padding: 1.8rem; 
    text-align: left; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.project-info h3 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
    color: var(--light);
}
.tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.5rem; 
    margin-bottom: 1.2rem; 
}
.tag { 
    font-size: 0.75rem; 
    font-weight: 600;
    padding: 5px 12px; 
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid var(--glass-border);
    border-radius: 20px; 
    color: var(--gray); 
}
body:not(.dark-theme) .tag {
    background: rgba(74, 107, 255, 0.05);
}
.project-info p {
    color: var(--gray);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.project-links {
    display: flex;
    gap: 1.2rem;
    margin-top: auto;
}
.project-links a { 
    color: var(--accent); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.95rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.project-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(74, 107, 255, 0.4);
}

/* Experience Timeline */
.experience-item {
    background: var(--dark-card); 
    padding: 2.2rem; 
    border-radius: 20px;
    box-shadow: var(--shadow); 
    margin-bottom: 2rem; 
    text-align: left;
    border: 1px solid var(--glass-border);
    border-left: 5px solid var(--primary);
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.experience-item:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}
.experience-header { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 1.2rem; 
    flex-wrap: wrap; 
    gap: 0.5rem;
}
.company { 
    font-weight: 800; 
    font-size: 1.3rem; 
    color: var(--light);
}
.role { 
    color: var(--accent); 
    font-weight: 600; 
    font-size: 1rem;
    margin-top: 2px;
}
.date {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}
.experience-content ul { 
    padding-left: 20px; 
    color: var(--gray); 
    font-size: 0.95rem;
}
.experience-content li {
    margin-bottom: 0.6rem;
}

/* Certifications */
.cert-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem; 
    width: 100%;
}
.cert-card {
    background: var(--dark-card); 
    padding: 1.8rem; 
    border-radius: 18px;
    font-weight: 600; 
    text-decoration: none; 
    color: var(--light);
    box-shadow: var(--shadow); 
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: center;
    justify-content: center; 
    text-align: center;
    min-height: 110px;
    position: relative;
    overflow: hidden;
}
.cert-card::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 0;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, var(--accent), var(--primary));
    transition: height 0.3s ease;
}
.cert-card:hover { 
    transform: translateY(-5px); 
    border-color: rgba(0, 243, 255, 0.3);
    color: var(--accent); 
    background: rgba(74, 107, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.1);
}
.cert-card:hover::before {
    height: 100%;
}

/* Freelance Services */
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 2.2rem; 
    width: 100%; 
}
.service-card {
    background: var(--dark-card); 
    padding: 3rem 2rem; 
    border-radius: 24px;
    border: 1px solid var(--glass-border); 
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.service-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(74, 107, 255, 0.15); 
    border-color: var(--primary); 
}
.service-icon { 
    font-size: 2.8rem; 
    color: var(--accent); 
    margin-bottom: 1.8rem; 
    transition: transform 0.3s ease;
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}
.service-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}
.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Contact */
.contact-info { 
    display: flex; 
    flex-direction: column; 
    gap: 1.8rem; 
    margin-top: 2rem; 
}
.contact-item { 
    display: flex; 
    align-items: center; 
    gap: 1.2rem; 
}
.contact-icon {
    width: 54px; 
    height: 54px; 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    color: white;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(74, 107, 255, 0.3);
}
.contact-item h3 {
    font-size: 1.1rem;
    color: var(--light);
}
.contact-item p, .contact-item a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
}
.contact-item a:hover {
    color: var(--accent);
}

form { 
    display: flex; 
    flex-direction: column; 
    gap: 1.2rem; 
    background: var(--dark-card);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}
input, textarea { 
    padding: 16px; 
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border); 
    border-radius: 12px; 
    font-family: inherit; 
    color: var(--light);
    width: 100%; 
    transition: 0.3s;
}
body:not(.dark-theme) input, body:not(.dark-theme) textarea {
    background: rgba(74, 107, 255, 0.02);
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
footer { 
    background: #04050a; 
    color: var(--gray); 
    text-align: center; 
    padding: 4rem 2rem; 
    margin-top: 6rem; 
    border-top: 1px solid var(--glass-border);
}
.social-links { 
    display: flex; 
    justify-content: center; 
    gap: 1.8rem; 
    margin-bottom: 1.8rem; 
}
.social-links a { 
    color: var(--gray); 
    font-size: 1.6rem; 
    transition: all 0.3s ease; 
}
.social-links a:hover { 
    color: var(--accent); 
    transform: translateY(-3px);
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(4, 5, 10, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center; 
    align-items: center;
    padding: 1rem;
}
.modal-content {
    background-color: #0b0e1a; 
    padding: 3rem 2.5rem;
    border-radius: 24px; 
    width: 100%; 
    max-width: 600px;
    border: 1px solid var(--glass-border);
    position: relative; 
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    color: var(--light);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
body:not(.dark-theme) .modal-content {
    background-color: #ffffff;
}
@keyframes slideUp { 
    from { transform: translateY(60px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}
.close-modal { 
    position: absolute; 
    top: 20px; 
    right: 25px; 
    font-size: 30px; 
    font-weight: bold; 
    cursor: pointer; 
    color: var(--gray);
    transition: 0.3s;
}
.close-modal:hover {
    color: var(--light);
}
.modal-header { 
    text-align: center; 
    margin-bottom: 2rem; 
}
.modal-icon-container { 
    font-size: 3.5rem; 
    color: var(--accent); 
    margin-bottom: 1rem; 
}
.modal-content h2 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}
#modalFeatures { 
    list-style: none; 
    margin: 2rem 0; 
    text-align: left; 
}
#modalFeatures li { 
    margin-bottom: 0.8rem; 
    padding-left: 25px; 
    position: relative; 
    color: var(--gray);
}
#modalFeatures li:before { 
    content: '✓'; 
    position: absolute; 
    left: 0; 
    color: var(--accent); 
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hamburger { 
        display: block; 
    }
    .container { 
        grid-template-columns: 1fr; 
        gap: 3rem; 
    }
    .nav-links {
        position: fixed; 
        top: 70px; 
        right: -100%; 
        width: 100%; 
        height: auto;
        background: rgba(8, 9, 20, 0.95); 
        backdrop-filter: blur(20px);
        flex-direction: column; 
        padding: 3rem 2rem;
        box-shadow: 0 15px 30px rgba(0,0,0,0.2); 
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        border-bottom: 1px solid var(--glass-border);
        gap: 1.8rem;
    }
    body:not(.dark-theme) .nav-links {
        background: rgba(255, 255, 255, 0.95);
    }
    .nav-links.active { 
        right: 0; 
    }
    .text-section { 
        order: 1; 
    }
    .img-section { 
        order: 0; 
        text-align: center; 
    }
    .img-section img { 
        max-width: 320px; 
    }
}