:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #262626;
    --text-primary: #ffffff;
    --text-secondary: #ababab;
    --accent-primary: #ff004f;
    --accent-secondary: #ff4081;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    --gradient-3: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
.light-theme {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --accent-primary: #e74c3c;
    --accent-secondary: #f39c12;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: var(--transition);
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #ff6b6b, #4ecdc4);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.light-theme .animated-bg {
    background: linear-gradient(-45deg, #e3f2fd, #f3e5f5, #fff3e0, #e8f5e8);
    background-size: 400% 400%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particle Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Float animation for service cards */
.float-animation {
    animation: float 6s ease-in-out infinite;
}
.float-animation:nth-child(2) {
    animation-delay: 2s;
}
.float-animation:nth-child(3) {
    animation-delay: 4s;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--accent-primary);
    color: white;
}

/* Header */
#header {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.light-theme nav {
    background: rgba(255, 255, 255, 0.9);
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
}

.logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--accent-primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Hero Section */
.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.typed-text {
    border-right: 2px solid var(--accent-primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: var(--accent-primary); }
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 0, 79, 0.3);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Section Dividers */
.section-divider {
    height: 100px;
    overflow: hidden;
    position: relative;
}

.section-divider svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
}

/* Section Styling */
.section {
    padding: 80px 5%;
    position: relative;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

/* About Section */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.profile-image {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.profile-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.profile-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

.profile-image:hover img {
    transform: scale(1.05);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Skills Tabs */
.tabs {
    margin: 2rem 0;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.tab-btn.active,
.tab-btn:hover {
    border-color: var(--accent-primary);
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 10px;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--accent-primary);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Section */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-item {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-right: 1rem;
    width: 30px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 0, 79, 0.3);
}

.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 79, 0.1);
}

.form-group textarea {
    resize: vertical;
    height: 120px;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Mobile Responsive */
.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

.mobile-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    z-index: 1001;
    transition: width 0.3s ease;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-card);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .section {
        padding: 60px 3%;
    }

    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }

    .theme-toggle {
        top: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.8rem 5%;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        text-align: center;
        z-index: 999;
    }

    .light-theme nav ul {
        background: rgba(255, 255, 255, 0.98);
    }

    nav ul.show {
        display: flex;
    }

    nav ul li a {
        font-size: 1.5rem;
        font-weight: 600;
    }

    .mobile-menu {
        display: flex;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo img {
        width: 35px;
        height: 35px;
    }

    .hero-content {
        padding: 0 1rem;
        margin-top: 80px;
    }

    .hero-content h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
        min-width: 200px;
    }

    .section {
        padding: 50px 4%;
    }

    .about-container,
    .contact-container {
        gap: 2rem;
    }

    .profile-image {
        max-width: 280px;
    }

    .about-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .tab-buttons {
        justify-content: center;
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }

    .contact-item {
        font-size: 0.9rem;
    }

    .social-links {
        justify-content: center;
    }

    .theme-toggle {
        top: 75px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .particles {
        display: none; /* Hide particles on mobile for better performance */
    }

    /* Adjust section dividers for mobile */
    .section-divider {
        height: 50px;
    }

    .section-divider svg {
        height: 50px;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.5rem 3%;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo img {
        width: 30px;
        height: 30px;
    }

    .hero-content {
        padding: 0 0.5rem;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 8vw, 2rem);
        line-height: 1.2;
    }

    .section {
        padding: 40px 3%;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 2rem;
    }

    .service-card {
        padding: 1.2rem;
    }

    .contact-info,
    .contact-form {
        padding: 1.2rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        min-width: 180px;
    }

    .theme-toggle {
        top: 65px;
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    footer {
        padding: 1.5rem;
        font-size: 0.9rem;
    }
}

/* Fix for very small screens */
@media (max-width: 320px) {
    .hero-content h1 {
        font-size: 1.3rem;
    }

    .section {
        padding: 30px 2%;
    }

    .cta-buttons .btn {
        min-width: 150px;
        font-size: 0.8rem;
    }
}