@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #FF78C4;
    --secondary-color: #B32B7A;
    --accent-color: #7c3aed;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --text-light: #1e293b;
    --text-dark: #f1f5f9;
    --card-bg-light: rgba(255, 255, 255, 0.8);
    --card-bg-dark: rgba(30, 41, 59, 0.7);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: var(--bg-dark);
    --text-main: var(--text-dark);
    --card-bg: var(--card-bg-dark);
    --navbar-bg: rgba(15, 23, 42, 0.9);
}

[data-theme="light"] {
    --bg-main: var(--bg-light);
    --text-main: var(--text-light);
    --card-bg: var(--card-bg-light);
    --navbar-bg: rgba(255, 255, 255, 0.9);
}

html[lang="en"] {
    direction: ltr;
}

html[lang="ar"] {
    direction: rtl;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Tajawal', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Glassmorphism Classes */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

nav.scrolled {
    padding: 0.8rem 5%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

nav .logo img {
    height: 50px;
    transition: var(--transition);
}

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

nav ul li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 120, 196, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 120, 196, 0.5);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 120, 196, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

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

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-image {
    position: relative;
    width: 450px;
    height: 450px;
}

.hero-image img {
    width: 100%;
    animation: float 6s ease-in-out infinite;
}

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

/* Sections */
section {
    padding: 100px 10%;
}

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

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

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

/* Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    padding: 2rem;
    border-radius: 24px;
    transition: var(--transition);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
}

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

/* Portfolio Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

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

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(179, 43, 122, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
    text-align: center;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

/* Contact Section */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.contact-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 120, 196, 0.2);
}

.contact-card i {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 120, 196, 0.3);
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    opacity: 0.8;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input, textarea {
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--card-bg);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

input:focus, textarea:focus {
    border-color: var(--primary-color);
}

/* Modern Theme Switcher */
.theme-switch {
    width: 60px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 0 5px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

[data-theme="dark"] .theme-switch {
    background: var(--primary-color);
}

.switch-circle {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

[data-theme="dark"] .switch-circle {
    transform: translateX(26px);
}

html[lang="en"] [data-theme="dark"] .switch-circle {
    transform: translateX(26px);
}

html[lang="ar"] [data-theme="dark"] .switch-circle {
    transform: translateX(-26px);
}

.lang-switch-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--text-main);
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

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

/* RTL Support for Arabic */
[dir="rtl"] {
    font-family: 'Tajawal', sans-serif;
}

[dir="rtl"] .hero {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-info {
    text-align: right;
}

/* Animations */
[data-aos] {
    transition-duration: 1000ms !important;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
    }
    .hero-image {
        width: 300px;
        height: 300px;
        margin-top: 50px;
    }
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
}
