/* Base Styles */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #4d44db;
    --dark-color: #2f2e41;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --white-color: #ffffff;
    --black-color: #000000;
    --transition: all 0.3s ease;

    /* Theme variables */
    --bg-color: #ffffff;
    --text-color: #2f2e41;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f8f9fa;
    --card-bg: #1e1e1e;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --dark-color: #f8f9fa;
    --light-color: #1e1e1e;
    --gray-color: #b0b0b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
    color: var(--gray-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-transform: capitalize;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-color);
    border: 1px solid var(--dark-color);
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: var(--dark-color);
    color: var(--white-color);
    transform: translateY(-3px);
}

.section-padding {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    color: var(--text-color);
}

.section-title span {
    color: var(--primary-color);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-color);
}

.text-stroke {
    -webkit-text-stroke: 1px var(--dark-color);
    color: transparent;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader .loader {
    position: relative;
    width: 60px;
    height: 60px;
}

.preloader .loader-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.preloader .loader-circle:nth-child(2) {
    border-top-color: var(--secondary-color);
    animation-delay: 0.2s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    transform: translate(-50%, -50%);
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 999;
    transition: transform 0.1s ease;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(108, 99, 255, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 998;
    transition: transform 0.4s ease, width 0.3s ease, height 0.3s ease;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1000;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s ease;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 20px;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 999;
    transition: var(--transition);
    background-color: var(--bg-color);
    /* Animation properties */
    opacity: 1;
    transform: translateY(0);
}

.header.sticky {
    background-color: var(--bg-color);
    box-shadow: 0 5px 20px var(--shadow-color);
    padding: 15px 0;
}

/* Logo Animation */
.logo[data-animation="fadeInDown"] {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Navigation Animation */
.main-nav[data-animation="fadeInDown"] {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

/* Menu Toggle Animation */
.menu-toggle[data-animation="fadeInDown"] {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

/* Override initial animation states */
[data-animation="fadeInDown"] {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
}

.logo a span {
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    position: relative;
    padding: 5px 0;
    font-weight: 500;
}

.main-nav ul li a.active {
    color: var(--primary-color);
}

.main-nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover:after,
.main-nav ul li a.active:after {
    width: 100%;
}

.menu-toggle {
    width: 30px;
    height: 20px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1000;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--dark-color);
    transition: var(--transition);
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999;
    transition: var(--transition);
    box-shadow: -5px 0 20px var(--shadow-color);
    padding: 80px 30px;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul li {
    margin-bottom: 20px;
}

.mobile-menu ul li a {
    font-size: 18px;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    color: var(--text-color);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--light-color);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-top: 50px;
}

.hero-content {
    flex: 1;
    padding-right: 30px;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image .image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px var(--shadow-color);
}

.hero-image .image-wrapper:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(108, 99, 255, 0.2);
}

.hero-image img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-title {
    font-size: 60px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.hero-title .title-line {
    display: block;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--gray-color);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    align-items: center;
}

.hero-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-shape svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.hero-shape path {
    fill: var(--bg-color);
}

/* About Section */
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.about-image {
    flex: 1;
    opacity: 1;
    /* Ensure opacity is set to 1 */
    visibility: visible;
    /* Make sure it's visible */
    position: relative;
    /* Add position relative for proper stacking */
}

.about-image .image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px var(--shadow-color);
    transform: translateZ(0);
    /* Force hardware acceleration */
}

.about-image img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 1;
    /* Ensure image is fully visible */
    transition: opacity 0.5s ease;
    /* Smooth transition if needed */
}

/* Animation Fix */
[data-animation="fadeInLeft"].about-image {
    opacity: 1 !important;
    /* Override any animation opacity issues */
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.about-text p {
    margin-bottom: 30px;
}

.skills {
    margin-bottom: 30px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-info span {
    font-weight: 500;
    color: var(--text-color);
}

.skill-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    width: 0;
    transition: width 1.5s ease;
}

.skill-chart {
    width: 100%;
    height: 300px;
    margin-top: 30px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 30px var(--shadow-color);
    transition: var(--transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-item:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
}

.service-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Portfolio Section */
.portfolio-filter {
    margin-bottom: 30px;
}

.portfolio-filter ul {
display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.portfolio-filter ul li {
    padding: 8px 20px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    background-color: transparent;
    color: var(--text-color);
}

.portfolio-filter ul li.active,
.portfolio-filter ul li:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    transition: all 0.3s ease;
    opacity: 1;
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transform-style: preserve-3d;
}

.portfolio-item-inner {
    position: relative;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(108, 99, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    padding: 20px;
    text-align: center;
    color: var(--white-color);
}

.portfolio-overlay h3 {
    font-size: 22px;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: var(--transition);
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.1s;
}

.portfolio-link {
    width: 50px;
    height: 50px;
    background-color: var(--white-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.2s;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p,
.portfolio-item:hover .portfolio-link {
    transform: translateY(0);
}

/* Portfolio Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    padding: 30px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.modal-image img {
    border-radius: 10px;
    width: 100%;
    height: auto;
}

.modal-text h3 {
    font-size: 28px;
    color: var(--text-color);
}

.modal-category {
    display: inline-block;
    background-color: rgba(108, 99, 255, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 50px;
    margin-bottom: 15px;
    font-size: 14px;
}

.modal-tech h4 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.modal-tech ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-tech ul li {
    background-color: rgba(108, 99, 255, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 14px;
}

/* Contact Section */
.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.contact-info-item {
    display: flex;
    margin-bottom: 30px;
}

.contact-info-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 20px;
}

.contact-info-text h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.contact-info-text p {
    color: var(--gray-color);
}

.contact-social {
    display: flex;
    margin-top: 30px;
}

.contact-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    color: var(--primary-color);
    transition: var(--transition);
}

.contact-social a:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-error {
    position: absolute;
    bottom: -18px;
    left: 0;
    color: #ff4757;
    font-size: 12px;
    display: none;
}

.form-group.error .form-error {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ff4757;
}

.form-submit {
    text-align: right;
}

.form-success {
    text-align: center;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 30px var(--shadow-color);
}

.form-success i {
    font-size: 60px;
    color: #4BB543;
    margin-bottom: 20px;
}

.form-success h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.form-success p {
    color: var(--gray-color);
}

/* Footer */
/* Footer Dark Theme Fix */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 50px 0 20px;
    /* Ensure theme colors are properly applied */
    --dark-color: #2f2e41;
    --white-color: #ffffff;
    --gray-color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .footer {
    --dark-color: #121212;
    --white-color: #f8f9fa;
    --gray-color: #b0b0b0;
    background-color: var(--dark-color);
}

.footer-content {
    text-align: center;
    color: var(--white-color);
}

.footer-logo a {
    color: var(--white-color) !important;
}

.footer-logo a span {
    color: var(--primary-color) !important;
}

.footer-text p {
    color: var(--gray-color) !important;
}

.footer-social a {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--white-color) !important;
    transition: all 0.3s ease !important;
}

.footer-social a:hover {
    background-color: var(--primary-color) !important;
    color: var(--white-color) !important;
}
/* ------------------- */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 50px 0 20px;
    opacity: 1 !important;
    /* Force opacity */
    visibility: visible !important;
    /* Force visibility */
}

.footer-content {
    text-align: center;
    opacity: 1 !important;
    /* Override any animations */
}

.footer-logo a {
    color: var(--white-color);
    font-size: 28px;
    font-weight: 700;
    display: inline-block;
    /* Ensure proper layout */
}

.footer-text p {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1 !important;
    /* Force text visibility */
}

.footer-social {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    opacity: 1 !important;
}

/* Animation Override */
[data-animation].footer-content,
[data-animation].footer-logo,
[data-animation].footer-text,
[data-animation].footer-social {
    opacity: 1 !important;
    transform: none !important;
}

.footer-logo a span {
    color: var(--primary-color);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    color: var(--white-color);
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Animations */
[data-animation] {
    transition: all 0.8s ease;
    will-change: transform, opacity;
}

[data-animation="fadeInUp"] {
    transform: translateY(20px);
}

[data-animation="fadeInDown"] {
    transform: translateY(-20px);
}

[data-animation="fadeInLeft"] {
    transform: translateX(-20px);
}

/* [data-animation="fadeInRight"] {
    transform: translateX(20px);
} */

[data-animation].animate {
    opacity: 1;
    transform: translate(0, 0);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 48px;
    }
}

@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 50px;
        text-align: center;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-content {
        flex-direction: column;
    }

    .contact-info {
        margin-bottom: 50px;
    }

    .modal-body {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }

    .section-title {
        font-size: 36px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .btn {
        padding: 10px 20px;
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .testimonial-nav {
        position: static;
        transform: none;
        margin-top: 30px;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 30px;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 15px;
    }

    .portfolio-filter ul li {
        padding: 5px 15px;
        font-size: 14px;
        margin-bottom: 10px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
    }
}