/* ===== Global Styles ===== */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --dark-color: #2d3436;
    --light-color: #f8f9fa;
    --text-color: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --black: #000000;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    text-align: left;
    direction: ltr;
}

body.dark-theme {
    --dark-color: #f8f9fa;
    --light-color: #2d3436;
    --text-color: #f8f9fa;
    --text-light: #b2bec3;
    --white: #2d3436;
    --black: #f8f9fa;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.section-title span {
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    margin: 15px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    background-color: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
}

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

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

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    right: 0;
}

.theme-toggle {
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    margin-right: 20px;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(30deg);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1) 0%, rgba(162, 155, 254, 0.1) 100%);
    z-index: 1;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--dark-color);
}

.hero-title span {
    color: var(--primary-color);
    position: relative;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 100%;
    height: 10px;
    background-color: rgba(108, 92, 231, 0.2);
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    align-items: center;
}

.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
}

.scroll-down span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    transform: rotate(45deg);
    margin: -10px;
    animation: scrollDown 2s infinite;
}

.scroll-down span:nth-child(2) {
    animation-delay: -0.2s;
}

.scroll-down span:nth-child(3) {
    animation-delay: -0.4s;
}

@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-20px, -20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(20px, 20px);
    }
}

/* ===== About Section ===== */
.about-content {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
}

.about-image {
    flex: 1;
    padding: 0 30px;
    max-width: 300px;  /* Added max-width */
    margin: 0 auto;   /* Center the image */
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.05);  /* Subtle hover effect */
}

.about-text {
    flex: 1;
    padding: 0 30px;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.info {
    display: flex;
    flex-wrap: wrap;
    margin: 30px 0;
}

.info-item {
    flex: 1;
    min-width: 200px;
    margin-bottom: 15px;
}

.info-item p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.info-item p span {
    font-weight: 600;
    color: var(--dark-color);
    margin-left: 5px;
}

/* Skills */
.skills {
    margin-top: 50px;
}

.skills-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--dark-color);
    text-align: center;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.skill-item {
    flex: 1;
    min-width: 250px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-info span {
    font-weight: 600;
    color: var(--dark-color);
}

.progress {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    position: relative;
    transition: width 1.5s ease-in-out;
}

/* ===== Services Section ===== */
.services {
    background-color: var(--light-color);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotateY(180deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== Portfolio Section ===== */
.portfolio {
    background-color: var(--white);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 20px;
    margin: 0 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.portfolio-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.8) 0%, rgba(162, 155, 254, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.portfolio-item:hover .portfolio-img::before {
    opacity: 1;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
    filter: blur(2px);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-overlay h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.5s ease 0.1s, opacity 0.5s ease 0.1s;
    opacity: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: transform 0.5s ease 0.15s, opacity 0.5s ease 0.15s;
    opacity: 0;
    max-width: 90%;
    line-height: 1.6;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    color: white;
    font-weight: 500;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.5s ease 0.2s;
}

.portfolio-item:hover .portfolio-category {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.portfolio-view-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.portfolio-view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.portfolio-view-btn:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.portfolio-view-btn:hover::before {
    opacity: 1;
}

.portfolio-view-btn:hover i {
    transform: translateX(4px);
}

.portfolio-item:hover .portfolio-view-btn {
    transform: translateY(0);
    opacity: 1;
}

/* Ensure other overlay elements have proper transitions */
.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
    opacity: 1;
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--light-color);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    margin-left: 20px;
    flex-shrink: 0;
}

.contact-text h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

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

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    margin-left: 10px;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.social-link:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--light-color);
    transition: var(--transition);
}

textarea.form-control {
    min-height: 150px;
    border-radius: 20px;
    resize: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
    padding: 80px 0 20px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    animation: gradientBG 8s ease infinite;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.footer-logo h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin: 20px 0;
    max-width: 300px;
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links h3,
.footer-newsletter h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #fff;
    position: relative;
    padding-bottom: 15px;
    font-weight: 600;
}

.footer-links h3::after,
.footer-newsletter h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links ul li {
    margin-bottom: 12px;
    position: relative;
    padding-right: 20px;
}

.footer-links ul li::before {
    content: '→';
    position: absolute;
    right: 0;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.3s ease;
    opacity: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 400;
}

.footer-links ul li:hover::before {
    opacity: 1;
    transform: translateX(-5px);
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(-5px);
}

.footer-newsletter {
    flex: 1;
    min-width: 300px;
}

.footer-newsletter h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-newsletter h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.8;
}

.newsletter-form {
    margin-top: 20px;
    position: relative;
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.newsletter-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: var(--white);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom span {
    color: var(--primary-color);
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Responsive Styles ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section {
        padding: 80px 0;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 50px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image,
    .about-text {
        padding: 0;
        margin-bottom: 40px;
    }
    
    .about-image {
        max-width: 250px;  /* Smaller max-width for mobile */
        margin: 0 auto 30px;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .contact-form {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px 30px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        margin: 15px 0;
        font-size: 1.1rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .portfolio-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-secondary {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .info {
        flex-direction: column;
    }
    
    .portfolio-filters {
        justify-content: flex-start;
    }
    
    .portfolio-container {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo,
    .footer-links,
    .footer-newsletter {
        min-width: 100%;
    }
}

/* Dark Theme Styles */
body.dark-theme .header,
body.dark-theme .service-card,
body.dark-theme .contact-form {
    background-color: #1e272e;
}

body.dark-theme .nav-link,
body.dark-theme .hero-title,
body.dark-theme .about-text h3,
body.dark-theme .skills-title,
body.dark-theme .service-card h3,
body.dark-theme .portfolio-title,
body.dark-theme .contact-text h3,
body.dark-theme .footer-logo h2,
body.dark-theme .footer-links h3,
body.dark-theme .footer-newsletter h3 {
    color: #f8f9fa;
}

body.dark-theme .hero,
body.dark-theme .services,
body.dark-theme .contact {
    background-color: #1a2226;
}

body.dark-theme .form-control {
    background-color: #2c3e50;
    color: #f8f9fa;
    border-color: #3d566e;
}

body.dark-theme .form-control::placeholder {
    color: #a8b2b9;
}

body.dark-theme .service-card,
body.dark-theme .portfolio-item,
body.dark-theme .contact-form {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-theme .filter-btn {
    color: #a8b2b9;
}

body.dark-theme .filter-btn:hover,
body.dark-theme .filter-btn.active {
    color: #f8f9fa;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

/* Print Styles */
@media print {
    .header,
    .back-to-top,
    .footer,
    .section-header,
    .filter-btn,
    .portfolio-filters {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .section {
        padding: 40px 0;
        page-break-inside: avoid;
    }
    
    .portfolio-item {
        page-break-inside: avoid;
    }
}
