/* CSS Variables for Easy Theme Management */
:root {
    /* Light Theme Colors */
    --primary-color: #064269;
    --primary-btn-color: #062f4b;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --background-light: #ffffff;
    --background-main: #f8f9fa;
    --background-alt: #0e0f2b;
    --background-footer: #34495e;
    --border-color: #bdc3c7;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #3498db;
    --primary-btn-color: #fff;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --dark-text: #ecf0f1;
    --light-text: #bdc3c7;
    --background-light: #2c3e50;
    --background-main: #34495e;
    --background-alt: #3a3a3a;
    --border-color: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--background-light);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-light);
}

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

.logo-link {
    color: var(--dark-text);
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: all 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: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--background-light);
    padding: 2rem 0;
}

.hero-container {
    margin-top: 10%;
    max-width: 800px;
    margin: 15% auto;
    padding: 0 20px;
}

.hero-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.hero-name {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.hero-location {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--dark-text);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.hero-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

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

.hero-link i {
    font-size: 1.2rem;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--dark-text);
    margin-bottom: 2rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: var(--background-light);
}

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

.service-card {
    background: var(--background-main);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-dark);
    border-color: var(--primary-color);
}

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

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.service-description {
    color: var(--light-text);
    line-height: 1.6;
}

/* Skills Section */
.skills {
    padding: 5rem 0;
    background: var(--background-light);
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    text-align: center;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 2rem;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--background-main);
    color: var(--dark-text);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.skill-tag i {
    font-size: 1.1rem;
}

/* Experience Section */
.experience {
    padding: 5rem 0;
    background: var(--background-main);
}

.experience-timeline {
    max-width: 100%;
    margin: 0 auto;
}

.experience-item {
    width: 100%;
    background: var(--background-main);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.experience-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px var(--shadow-light);
}

.company-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.experience-description {
    color: var(--light-text);
    line-height: 1.6;
}

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

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

.work-card {
    background: var(--background-light);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.3s ease;
    text-align: center;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-dark);
}

.work-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.work-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
    line-height: 1.4;
}

.work-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.load-more {
    text-align: center;
}

/* Blog Section */
.blog {
    padding: 5rem 0;
    background: var(--background-light);
}

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

.blog-card {
    background: var(--background-main);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-dark);
    border-color: var(--primary-color);
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.blog-date {
    color: var(--light-text);
    font-size: 0.9rem;
}

.blog-category {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

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

.blog-cta {
    text-align: center;
}

/* Fun Facts Section */
.funfacts {
    padding: 5rem 0;
    background: var(--secondary-color);
    color: white;
}

.funfacts .section-title {
    color: white;
}

.funfacts .section-title::after {
    background: var(--accent-color);
}

.funfacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.funfact-item {
    padding: 2rem;
}

.funfact-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.funfact-label {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background: var(--background-light);
}

.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-item {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.testimonial-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--dark-text);
}

.testimonial-author strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.testimonial-author span {
    color: var(--light-text);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.5rem;
}

.testimonial-nav {
    text-align: center;
    margin-top: 2rem;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: transparent;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Clients Section */
.clients {
    padding: 5rem 0;
    background: var(--background-main);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    align-items: center;
}

.client-logo {
    text-align: center;
    font-size: 4rem;
    color: var(--border-color);
    transition: all 0.3s ease;
}

.client-logo:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

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

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1.5rem;
    width: 60px;
    text-align: center;
}

.contact-details h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--light-text);
}

.contact-form {
    background: var(--background-main);
    padding: 2.5rem;
    border-radius: 15px;
}

.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;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: var(--background-light);
    color: var(--dark-text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--shadow-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--background-footer);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

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

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

    .nav-toggle {
        display: flex;
    }

    .hero-links {
        gap: 1rem;
    }

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

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

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

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

    .section-title {
        font-size: 2rem;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-greeting {
        font-size: 1.5rem;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

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

    .services-grid,
    .works-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px var(--shadow-dark);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

/* Additional Responsive Improvements */
@media (max-width: 1024px) {
    .hero-content {
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .services-grid,
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid,
    .works-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 2rem 0;
        min-height: 90vh;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        gap: 1rem;
    }
    
    .contact-content {
        gap: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .testimonial-item {
        padding: 2rem 1rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .service-card,
    .work-card,
    .blog-card {
        padding: 1.5rem;
    }

    .work-title,
    .blog-title {
        font-size: 1.1rem;
    }

    .service-title {
        font-size: 1.3rem;
    }

    .skill-tag {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .experience-item {
        padding: 1.5rem;
    }
    
    .company-name {
        font-size: 1.3rem;
    }
    
    .funfact-number {
        font-size: 2.5rem;
    }
    
    .funfact-label {
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Enhanced Hover Effects */
.service-card:hover .service-icon {
    transform: scale(1.2) rotateY(180deg);
    transition: all 0.5s ease;
}

.work-card:hover .work-icon {
    transform: scale(1.1);
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1.1);
    }
    40% {
        transform: translateY(-10px) scale(1.1);
    }
    60% {
        transform: translateY(-5px) scale(1.1);
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .testimonial-nav,
    .load-more {
        display: none;
    }
    
    .hero {
        background: white;
        color: black;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section-title {
        color: black;
    }
}
