/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    
    /* Background Colors - Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    
    /* Text Colors - Light Mode */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --gradient-hero: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    
    /* Glass Effect - Light Mode */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(99, 102, 241, 0.15);
    
    /* Shadows - Light Mode */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
    
    /* Typography */
    --font-primary: 'Cairo', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Scroll Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ===================================
   Typography
   =================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--primary-light);
    font-weight: 600;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

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

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition-normal);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-left: 1rem;
}

.lang-switcher:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.lang-switcher i {
    font-size: 1rem;
}

/* LTR (English) Mode Styles */
html[dir="ltr"] {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

html[dir="ltr"] .hero-skills {
    justify-content: flex-start;
}

html[dir="ltr"] .hero-stats {
    justify-content: flex-start;
}

html[dir="ltr"] .hero-buttons {
    justify-content: flex-start;
}

html[dir="ltr"] .nav-links a::after {
    right: auto;
    left: 0;
}

html[dir="ltr"] .lang-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

html[dir="ltr"] .experience-badge {
    right: auto;
    left: -15px;
}

html[dir="ltr"] .service-features li {
    text-align: left;
}

html[dir="ltr"] .contact-form {
    text-align: left;
}

html[dir="ltr"] .footer-content {
    text-align: left;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: 100px 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    pointer-events: none;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 6s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 8s ease-in-out infinite reverse;
}

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

.hero .container {
    display: block;
}

.hero-combined {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-info {
    max-width: 700px;
}

.hero-about {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hero-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.hero-image {
    display: flex;
    justify-content: center;
}

@media (max-width: 968px) {
    .hero-combined {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-info {
        max-width: 100%;
    }
    
    .hero-skills {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

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

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Code Window */
.hero-visual {
    position: relative;
}

.code-window {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--glass-border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.filename {
    margin-right: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
}

.code-content .keyword { color: #c678dd; }
.code-content .function { color: #61afef; }
.code-content .string { color: #98c379; }
.code-content .comment { color: #5c6370; }

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.scroll-indicator a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .lead {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    font-size: 0.85rem;
    transition: var(--transition-normal);
    cursor: default;
}

.skill-tag i {
    color: var(--primary-light);
}

.skill-tag:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    width: 280px;
    height: 280px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
}

.experience-badge {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: var(--bg-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

.experience-badge .years {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.experience-badge .label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ===================================
   Services Section
   =================================== */
.services {
    padding: var(--section-padding);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.service-features li i {
    color: var(--secondary);
    font-size: 0.8rem;
}

/* ===================================
   Portfolio Section
   =================================== */
.portfolio {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

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

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.portfolio-item:hover {
    transform: translateY(-8px);
}

/* New Portfolio Card Design */
.portfolio-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
}

.portfolio-card:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

.portfolio-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.25rem;
    transition: var(--transition-normal);
}

.portfolio-card:hover .portfolio-icon {
    transform: scale(1.1) rotate(5deg);
}

.portfolio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.portfolio-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.portfolio-tags .tag {
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    transition: var(--transition-fast);
}

.portfolio-card:hover .portfolio-tags .tag {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

/* Tag Colors by Technology */
.portfolio-tags .tag:nth-child(1) {
    background: rgba(12, 75, 51, 0.1);
    border-color: rgba(12, 75, 51, 0.3);
    color: #0C4B33;
}

.portfolio-tags .tag:nth-child(2) {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

.portfolio-tags .tag:nth-child(3) {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: #06b6d4;
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials {
    padding: var(--section-padding);
}

.testimonial-count {
    color: var(--primary);
    font-weight: 700;
}

.testimonials-slider {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.testimonials-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0.5rem 0;
}

@media (max-width: 1200px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

.testimonial-card {
    flex: 0 0 calc(33.333% - 1.33rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    min-width: 280px;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.testimonial-avatar {
    font-size: 2.5rem;
    color: var(--primary);
}

.testimonial-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.testimonial-country {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.testimonial-rating {
    color: var(--accent);
    font-size: 0.85rem;
}

.testimonial-rating i {
    margin-left: 2px;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
    font-style: italic;
}

.testimonial-service {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}

.testimonials-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-btn {
    width: 45px;
    height: 45px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.testimonials-dots {
    display: flex;
    gap: 8px;
}

.testimonials-dots .dot {
    width: 10px;
    height: 10px;
    background: var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-normal);
}

.testimonials-dots .dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}

.khamsat-link {
    text-align: center;
    margin-top: 3rem;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.info-card:hover {
    border-color: var(--primary);
    transform: translateX(-5px);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.info-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.info-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-details a {
    color: var(--primary-light);
    font-size: 0.95rem;
}

.info-details a:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-normal);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

/* ===================================
   Footer
   =================================== */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: block;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-right: 5px;
}

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

.social-icons a {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.social-icons a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .skills {
        justify-content: center;
    }
    
    .about-image {
        order: -1;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 100px 40px 40px;
        gap: 1.5rem;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .testimonial-card {
        flex: 0 0 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-links ul {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Smooth scrolling for anchor links */
html {
    scroll-padding-top: 80px;
}

/* Honeypot — kept out of sight without display:none, which some bots skip */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Project screenshots — real work gets a real picture instead of an icon */
.portfolio-shot {
    margin: -1.5rem -1.5rem 1.1rem;   /* matches .portfolio-card padding */
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    aspect-ratio: 1200 / 750;
    background: #f1f5f9;
}

.portfolio-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-shot img {
    transform: scale(1.04);
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 16px;
    border-radius: 22px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.25s ease;
}

.portfolio-link:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

/* Footer legal line */
.footer-legal {
    margin-top: 6px;
}

.footer-legal a {
    color: inherit;
    opacity: .75;
    font-size: .9rem;
    text-decoration: none;
}

.footer-legal a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* WhatsApp shown as its mark alone — give the glyph a tap target the
   size of a button, since there is no longer any text to click. */
.info-details a[aria-label="واتساب"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-top: 4px;
    border-radius: 50%;
    font-size: 1.35rem;
    color: #fff;
    background: #25D366;
    transition: transform .2s ease, box-shadow .2s ease;
}

.info-details a[aria-label="واتساب"]:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, .35);
}

/* ===================================
   Floating WhatsApp
   Held back until the visitor scrolls past the hero, where the contact
   buttons already are — showing it there would cover them.
   =================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 1.75rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .38);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
}

/* Hidden only while the hero is on screen, and only once the script has
   said so. Shown by default, so a script that never runs leaves a working
   button rather than an invisible one. */
.whatsapp-float.at-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
}

html[dir="ltr"] .whatsapp-float {
    left: auto;
    right: 24px;
}

.whatsapp-float:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(37, 211, 102, .5);
}

.whatsapp-float:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 18px;
        left: 18px;
        font-size: 1.6rem;
    }
    html[dir="ltr"] .whatsapp-float { left: auto; right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float { transition: opacity .2s ease; }
    .whatsapp-float.at-top { transform: none; }
    .whatsapp-float:hover { transform: none; }
}

@media print {
    .whatsapp-float { display: none !important; }
}

/* ===================================
   How I Work
   Numbered because the steps are a real sequence — a client goes through
   them in order, and the number is the answer to "where are we now".
   =================================== */
.process {
    padding: 6rem 0;
}

.process-steps {
    list-style: none;
    counter-reset: none;
    display: grid;
    gap: 1.25rem;
    max-width: 860px;
    margin: 0 auto;
    padding: 0;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: transform .25s ease, border-color .25s ease;
}

.process-step:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.process-num {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-variant-numeric: tabular-nums;
}

.process-body h3 {
    font-size: 1.15rem;
    margin-bottom: .4rem;
}

.process-body p {
    color: var(--text-gray);
    margin-bottom: .6rem;
    line-height: 1.8;
}

.process-duration {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: var(--primary);
    background: rgba(99, 102, 241, .08);
    border-radius: 20px;
    padding: .3rem .8rem;
}

/* ===================================
   FAQ — native <details>, so it opens with no script and prints expanded
   =================================== */
.faq {
    padding: 6rem 0;
}

.faq-list {
    display: grid;
    gap: .85rem;
    max-width: 860px;
    margin: 0 auto;
}

.faq-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 0 1.5rem;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.15rem 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--primary);
    transition: transform .25s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 6px;
}

.faq-item p {
    color: var(--text-gray);
    line-height: 1.9;
    padding-bottom: 1.25rem;
    margin: 0;
}

@media (max-width: 640px) {
    .process,
    .faq {
        padding: 4rem 0;
    }

    .process-step {
        padding: 1.25rem;
        gap: 1rem;
    }
}

/* Two actions can sit on a card — the live link and a case study */
.portfolio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}

.portfolio-case {
    background: rgba(99, 102, 241, .1);
    border-radius: 20px;
    padding: .35rem .9rem;
}

/* ===================================
   Tech Stack — the full list, moved out of the hero so the hero's
   buttons stay above the fold
   =================================== */
.stack-section {
    padding: 6rem 0;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stack-group {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
}

.stack-group h3 {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--glass-border);
}

.stack-group h3 i {
    color: var(--primary);
}

.stack-group ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    margin: 0;
}

.stack-group li {
    font-size: .88rem;
    color: var(--text-gray);
    background: rgba(99, 102, 241, .07);
    border-radius: 16px;
    padding: .3rem .8rem;
}

@media (max-width: 640px) {
    .stack-section { padding: 4rem 0; }
    .stack-group { padding: 1.25rem; }
}

/* ===================================
   Why work with me — the section that answers "can one person carry this"
   =================================== */
.why {
    padding: 6rem 0;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.why-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: transform .25s ease, border-color .25s ease;
}

.why-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.why-card > i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: .9rem;
    display: block;
}

.why-card h3 {
    font-size: 1.1rem;
    margin-bottom: .5rem;
}

.why-card p {
    color: var(--text-gray);
    line-height: 1.8;
    margin: 0;
}

@media (max-width: 640px) {
    .why { padding: 4rem 0; }
    .why-card { padding: 1.4rem; }
}

/* Qualification fields sit two-up on anything wider than a phone */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group select {
    width: 100%;
    padding: .85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-white);
    font-family: inherit;
    font-size: .95rem;
}

.form-group select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.form-group .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: .85em;
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* A service card that has a page of its own says so */
.service-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.service-link:hover {
    gap: .7rem;
}
