/* ========================================
   🎨 BASE STYLES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    color: #ffffff;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ========================================
   📏 SECTION PADDING - موحد ومحسن
   ======================================== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 6rem;
}

.about {
    padding: 6rem 0;
}

.skills {
    padding: 6rem 0;
}

.projects {
    padding: 6rem 0;
}

.education {
    padding: 6rem 0;
}

.contact {
    padding: 6rem 0 4rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: #00f0ff;
    border-radius: 8px;
}

/* Container Utility */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Card Base */
.glass-card {
    background: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.3s ease;
}

/* Section Titles */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.3px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 65%;
    height: 3px;
    background: linear-gradient(90deg, #00f0ff, #8a2be2);
    border-radius: 3px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(105deg, #00f0ff20, #8a2be220);
    border: 1.5px solid #00f0ff;
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    color: #ffffff;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.btn-primary:hover {
    background: #00f0ff;
    color: #0f172a;
    box-shadow: 0 0 18px #00f0ffaa;
    border-color: #00f0ff;
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid #8a2be2;
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    color: white;
    transition: 0.25s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #8a2be2;
    box-shadow: 0 0 12px #8a2be2;
    transform: scale(1.02);
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00f0ff, #8a2be2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00f0ff, #8a2be2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo::after {
    content: '';
    background: linear-gradient(135deg, #00f0ff, #8a2be2);
    height: 3px;
    width: 0;
    display: block;
    margin-top: 0.25rem;
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #00f0ff, #8a2be2);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #00f0ff;
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link.active {
    color: #00f0ff;
}

.nav-link.active::before {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: linear-gradient(135deg, #00f0ff, #8a2be2);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
/* Mobile Menu - كانت ناقصة */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu .nav-link {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

.mobile-menu .nav-link:hover {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
    padding-right: 2.5rem;
}








/* Scroll Effect */
.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero-badge {
    color: #00f0ff;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: inline-block;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #a0f0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.typed-container {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 1rem 0 1.5rem;
    min-height: 70px;
}

#typed-text {
    color: #00f0ff;
    border-right: 3px solid #00f0ff;
    padding-right: 6px;
}

.hero-desc {
    color: #9ca3af;
    max-width: 550px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.profile-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f0ff, #8a2be2);
    padding: 4px;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5), 0 0 8px rgba(138, 43, 226, 0.4);
    transition: transform 0.4s ease;
}

.profile-circle:hover {
    transform: scale(1.02);
    box-shadow: 0 0 35px #00f0ffaa;
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #0f172a;
}

/* About Section */
.about-text {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    border-left: 5px solid #00f0ff;
    border-right: 1px solid rgba(30, 41, 59, 0.5);
    color: #cbd5e1;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    padding: 1.8rem 1.2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(30, 41, 59, 0.6);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    transition: left 0.6s;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card i {
    font-size: 3rem;
    color: #00f0ff;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.4));
    transition: all 0.3s ease;
}

.skill-card:hover i {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.6));
}

.skill-card span {
    font-weight: 700;
    color: #e2e8f0;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.skill-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: #00f0ff;
    box-shadow: 0 25px 50px -15px rgba(0, 240, 255, 0.3), 0 0 0 1px rgba(0, 240, 255, 0.2);
}

/* Progress Bars */
.progress-skill {
    margin-top: 3rem;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(30, 41, 59, 0.4);
}

.progress-item {
    margin-bottom: 2rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    color: #e2e8f0;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.progress-label span:last-child {
    color: #00f0ff;
    font-weight: 700;
}

.progress-bar-bg {
    background: rgba(30, 41, 59, 0.8);
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #00f0ff, #8a2be2);
    width: 0%;
    height: 100%;
    border-radius: 10px;
    transition: width 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.project-card {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(31, 41, 55, 0.6);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00f0ff, #8a2be2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 35px 60px -20px rgba(0, 240, 255, 0.25), 0 0 0 1px rgba(0, 240, 255, 0.15);
}

.project-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.project-icon {
    font-size: 2.8rem;
    color: #00f0ff;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.4));
}

.project-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.project-desc {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Education Card */
.education-card {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    padding: 2.2rem;
    border-radius: 24px;
    border-left: 6px solid #8a2be2;
    border-right: 1px solid rgba(30, 41, 59, 0.4);
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8a2be2, transparent);
}

/* Contact Section */
.contact-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.contact-btn {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    padding: 1.2rem 2.2rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid rgba(45, 58, 94, 0.8);
    text-decoration: none;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
    transition: left 0.6s;
}

.contact-btn:hover::before {
    left: 100%;
}

.contact-btn i {
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.3);
    color: #e2e8f0;
}

.contact-btn:hover i {
    transform: scale(1.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(30, 41, 59, 0.5);
    color: #6c7a91;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(12px);
}

/* ========================================
   📱 RESPONSIVE PERFECTION - لكل الأجهزة
   ======================================== */

/* Desktop XL (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }

    .hero-name {
        font-size: 4rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 2.5rem;
    }
}

/* Desktop Large (1200px - 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 2.5rem;
    }
}

/* Desktop Medium (1025px - 1199px) */
@media (max-width: 1199px) and (min-width: 1025px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }

    .nav-links {
        gap: 2rem;
    }
}

/* Tablet Large (860px - 1024px) */
@media (max-width: 1024px) and (min-width: 861px) {
    .container {
        padding: 0 2rem;
    }

    .hero-name {
        font-size: 3rem;
    }

    .profile-circle {
        width: 260px;
        height: 260px;
    }
}

/* Tablet Portrait (481px - 860px) */
@media (max-width: 860px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-grid {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        text-align: center;
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-buttons {
        justify-content: center;
        gap: 1rem;
    }

    .hero-name {
        font-size: 2.8rem;
        line-height: 1.1;
    }

    .typed-container {
        font-size: 1.5rem;
    }

    .profile-circle {
        width: 240px;
        height: 240px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.8rem;
    }

    .contact-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .contact-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Mobile Large (361px - 480px) */
@media (max-width: 480px) {
    body {
        font-size: 0.95rem;
    }

    .container {
        padding: 0 1.2rem;
    }

    .hero {
        padding: 6rem 0 4rem;
        min-height: 85vh;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .typed-container {
        font-size: 1.3rem;
        min-height: 60px;
    }

    .profile-circle {
        width: 200px;
        height: 200px;
    }

    .about-text,
    .progress-skill,
    .education-card,
    .project-content {
        padding: 1.5rem 1rem;
    }

    .skill-card {
        padding: 1.2rem 0.8rem;
    }

    .skill-card i {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .contact-btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Mobile Small (320px - 360px) */
@media (max-width: 360px) {
    .hero-name {
        font-size: 2rem;
    }

    .profile-circle {
        width: 180px;
        height: 180px;
    }

    .container {
        padding: 0 1rem;
    }

    .contact-btn {
        padding: 0.9rem 1.2rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

/* Landscape Mobile */
@media (max-width: 860px) and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 70vh;
        padding: 4rem 0 2rem;
    }

    .hero-name {
        font-size: 2rem;
    }

    .profile-circle {
        width: 160px;
        height: 160px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .glass-card,
    .skill-card,
    .project-card {
        backdrop-filter: blur(20px);
    }
}

/* ========================================
   ✨ ANIMATIONS
   ======================================== */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

section {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    animation-fill-mode: both;
}

.glow-text {
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
    animation: float 3s ease-in-out infinite;
}

/* تقليل الرسوم المتحركة على الموبايل */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 480px) {
    section {
        animation-duration: 0.6s;
    }
}

/* Loading State for Progress Bars */
.progress-fill.loading {
    width: 0% !important;
}

/* ========================================
   📱 RESPONSIVE FIX - لجميع أحجام الشاشات
   ======================================== */

/* جعل جميع العناصر مرنة */
img,
svg,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* تحسين الشاشات الصغيرة جدًا (iPhone SE, Galaxy Fold) */
@media (max-width: 380px) {
    .container {
        padding: 0 1rem !important;
    }

    .hero-name {
        font-size: 1.8rem !important;
    }

    .hero-badge {
        font-size: 0.8rem;
    }

    .typed-container {
        font-size: 1rem !important;
    }

    .hero-desc {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1.2rem !important;
        font-size: 0.8rem !important;
    }

    .profile-circle {
        width: 150px !important;
        height: 150px !important;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 1rem !important;
    }

    .skill-card {
        padding: 1rem 0.5rem !important;
    }

    .skill-card i {
        font-size: 2rem !important;
    }

    .skill-card span {
        font-size: 0.75rem !important;
    }

    .project-content {
        padding: 1rem !important;
    }

    .project-title {
        font-size: 1.2rem !important;
    }

    .contact-btn {
        padding: 0.8rem 1rem !important;
        font-size: 0.8rem !important;
        width: 90% !important;
    }
}

/* تحسين شاشات iPhone 6/7/8 (375px) */
@media (min-width: 381px) and (max-width: 450px) {
    .container {
        padding: 0 1.2rem !important;
    }

    .hero-name {
        font-size: 2rem !important;
    }

    .profile-circle {
        width: 180px !important;
        height: 180px !important;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }
}

/* تحسين شاشات iPhone XR, 11, 12, 13, 14 (390px - 428px) */
@media (min-width: 451px) and (max-width: 500px) {
    .profile-circle {
        width: 200px !important;
        height: 200px !important;
    }

    .hero-name {
        font-size: 2.2rem !important;
    }
}

/* تحسين التابلت (iPad) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem !important;
    }

    .hero-name {
        font-size: 3rem !important;
    }

    .profile-circle {
        width: 220px !important;
        height: 220px !important;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* تحسين شاشات التابلت الكبيرة (iPad Pro) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* إصلاح مشكلة الـ Navbar على الجوال */
@media (max-width: 860px) {
    .navbar {
        padding: 0.5rem 0 !important;
    }

    .logo {
        font-size: 1.3rem !important;
    }

    .logo span {
        font-size: 0.9rem !important;
    }

    .nav-container {
        padding: 0 1rem !important;
    }

    /* تحسين ظهور القائمة المتنقلة */
    .mobile-menu {
        max-height: 80vh;
        overflow-y: auto;
    }

    .mobile-menu .nav-link {
        padding: 0.8rem 1.5rem !important;
        font-size: 1rem !important;
    }
}

/* إصلاح مشكلة الـ Hero Section في الجوال */
@media (max-width: 860px) {
    .hero {
        padding: 5rem 0 3rem !important;
        min-height: auto !important;
    }

    .hero-grid {
        gap: 1.5rem !important;
    }

    .hero-buttons {
        gap: 0.8rem !important;
    }

    .hero-desc {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
}

/* إصلاح مشكلة الكاردات في الجوال */
@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr !important;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .contact-flex {
        gap: 0.8rem !important;
    }

    .about-text {
        padding: 1.5rem !important;
    }

    .education-card {
        padding: 1.5rem !important;
    }

    .progress-skill {
        padding: 1.2rem !important;
    }
}

/* منع overflow للشاشة */
body {
    overflow-x: hidden !important;
    width: 100% !important;
}

/* تحسين عرض الصورة الدائرية في جميع الأجهزة */
.profile-circle {
    margin: 0 auto;
}

/* تحسين النصوص في الجوال */
@media (max-width: 600px) {
    .typed-container {
        min-height: 50px !important;
    }

    #typed-text {
        font-size: 1.1rem !important;
    }

    .section-title {
        font-size: 1.6rem !important;
    }

    .section-title:after {
        width: 100% !important;
    }
}

/* إصلاح مشكلة الـ footer في الجوال */
@media (max-width: 600px) {
    footer {
        padding: 1.5rem 0 !important;
        margin-top: 2rem !important;
    }

    footer p {
        font-size: 0.7rem !important;
    }
}

/* تحسين اللمس على الجوال (زيادة حجم الأزرار القابلة للنقر) */
@media (max-width: 860px) {

    .nav-link,
    .hamburger,
    .btn-primary,
    .btn-secondary,
    .contact-btn {
        cursor: pointer;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger {
        min-height: 44px;
        min-width: 44px;
    }
}
