/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Unified Color Scheme */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --data-color: #8b5cf6;
    
    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --black: #000000;
    
    /* Background Colors */
    --bg-primary: rgba(0, 0, 0, 0.85);
    --bg-secondary: rgba(0, 0, 0, 0.75);
    --bg-card: rgba(0, 0, 0, 0.6);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    
    /* Transitions */
    --transition: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

@supports (scrollbar-width: thin) {
    html {
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--gray-900);
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    overflow-x: hidden;
}

/* ===== VIDEO BACKGROUND WITH PROPER MASKING ===== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}

#background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.video-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #0f172a, #1e293b, #334155);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.3) 0%, 
        rgba(30, 41, 59, 0.2) 50%, 
        rgba(51, 65, 85, 0.3) 100%);
    z-index: -2;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

@supports (backdrop-filter: blur(20px)) {
    .navbar {
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.brand-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2px;
}

.brand-title {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    gap: var(--space-6);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    color: var(--gray-300);
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(59, 130, 246, 0.1);
}

.nav-link.active::before {
    width: 80%;
}

.nav-icon {
    width: 20px;
    height: 20px;

    transition: var(--transition);
}

.nav-link:hover .nav-icon {
    opacity: 1;
    transform: scale(1.1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    position: relative;
    z-index: 1;
}

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

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-20) 0 var(--space-16) 0;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.hero-text {
    color: var(--white);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    font-size: 0.9rem;
    color: var(--gray-300);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    margin-bottom: var(--space-6);
}

.title-greeting {
    display: block;
    font-size: 1.3rem;
    color: var(--gray-400);
    font-weight: 400;
    margin-bottom: var(--space-2);
}

.title-main {
    display: block;
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: var(--space-3);
    font-family: 'JetBrains Mono', monospace;
}

.title-sub {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
}

.hero-description {
    margin-bottom: var(--space-8);
}

.hero-description p {
    font-size: 1.2rem;
    color: var(--gray-300);
    line-height: 1.7;
}

.hero-description strong {
    color: var(--primary-color);
}

.hero-stats {
    display: flex;
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.stat-item {
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

@supports (backdrop-filter: blur(10px)) {
    .stat-item {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
}

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

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-6);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* ===== HERO IMAGE ===== */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.image-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-xl);
}

/* ===== TECH STACK FLOATING ICONS - حوالين إطار الصورة بالظبط ===== */
.tech-stack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.tech-item {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: var(--white);
    padding: 4px 8px;
    border-radius: var(--radius-md);
    font-size: 0.65rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.6);
    animation: floatFast 6s ease-in-out infinite;
    min-width: 65px;
    max-width: 85px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@supports (backdrop-filter: blur(10px)) {
    .tech-item {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.tech-item i {
    font-size: 0.75rem;
}

.tech-item span {
    font-size: 0.6rem;
    font-weight: 500;
}

/* Data Analytics Tools - Purple Theme - حوالين الإطار */
.tech-item.data-analytics {
    border-color: var(--data-color);
    background: rgba(139, 92, 246, 0.25);
}

/* Top side - الجانب العلوي */
.tech-item.data-analytics:nth-child(1) { 
    top: -8%; 
    left: 25%; 
    animation-delay: 0s; 
}

.tech-item.data-analytics:nth-child(2) { 
    top: -8%; 
    right: 25%; 
    animation-delay: 3s; 
}

/* Right side - الجانب الأيمن */
.tech-item.data-analytics:nth-child(3) { 
    top: 25%; 
    right: -18%; 
    animation-delay: 1.5s; 
}

.tech-item.data-analytics:nth-child(4) { 
    bottom: 25%; 
    right: -18%; 
    animation-delay: 4.5s; 
}

/* Programming Languages - Blue Theme - حوالين الإطار */
.tech-item.programming {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.25);
}

/* Left side - الجانب الأيسر */
.tech-item.programming:nth-child(5) { 
    top: 25%; 
    left: -18%; 
    animation-delay: 0.75s; 
}

.tech-item.programming:nth-child(6) { 
    top: 50%; 
    left: -18%; 
    animation-delay: 2.25s; 
}

.tech-item.programming:nth-child(7) { 
    bottom: 25%; 
    left: -18%; 
    animation-delay: 3.75s; 
}

/* Bottom side - الجانب السفلي */
.tech-item.programming:nth-child(8) { 
    bottom: -8%; 
    left: 25%; 
    animation-delay: 5.25s; 
}

.tech-item.programming:nth-child(9) { 
    bottom: -8%; 
    right: 25%; 
    animation-delay: 1.25s; 
}

/* Database Systems - Green Theme - حوالين الإطار */
.tech-item.database {
    border-color: var(--secondary-color);
    background: rgba(16, 185, 129, 0.25);
}

/* Top corners - الزوايا العلوية */
.tech-item.database:nth-child(10) { 
    top: 5%; 
    left: 5%; 
    animation-delay: 2s; 
}

.tech-item.database:nth-child(11) { 
    top: 5%; 
    right: 5%; 
    animation-delay: 4s; 
}

/* Bottom corners - الزوايا السفلية */
.tech-item.database:nth-child(12) { 
    bottom: 5%; 
    left: 5%; 
    animation-delay: 0.5s; 
}

.tech-item.database:nth-child(13) { 
    bottom: 5%; 
    right: 5%; 
    animation-delay: 3s; 
}

/* Web Technologies & Tools - Orange/Gray Theme - حوالين الإطار */
.tech-item.web {
    border-color: var(--accent-color);
    background: rgba(245, 158, 11, 0.25);
}

.tech-item.web:nth-child(14) { 
    top: 50%; 
    right: -18%; 
    animation-delay: 1s; 
}

.tech-item.web:nth-child(15) { 
    top: 75%; 
    right: -18%; 
    animation-delay: 4.25s; 
}

/* Development Tools - Gray Theme */
.tech-item.tools {
    border-color: var(--gray-500);
    background: rgba(107, 114, 128, 0.25);
}

.tech-item.tools:nth-child(16) { 
    top: 75%; 
    left: -18%; 
    animation-delay: 2.5s; 
}

.tech-item.tools:nth-child(17) { 
    bottom: 50%; 
    left: -18%; 
    animation-delay: 5s; 
}

.tech-item.tools:nth-child(18) { 
    top: -8%; 
    left: 50%; 
    animation-delay: 3.5s; 
}

.tech-item.tools:nth-child(19) { 
    bottom: -8%; 
    right: 50%; 
    animation-delay: 0.25s; 
}

/* حركة أسرع وأوضح */
@keyframes floatFast {
    0%, 100% { 
        transform: translateY(0px) scale(1) rotate(0deg); 
        opacity: 0.8; 
    }
    25% { 
        transform: translateY(-12px) scale(1.08) rotate(2deg); 
        opacity: 1; 
    }
    50% { 
        transform: translateY(-8px) scale(1.05) rotate(-1deg); 
        opacity: 0.95; 
    }
    75% { 
        transform: translateY(-15px) scale(1.1) rotate(3deg); 
        opacity: 1; 
    }
}

/* ===== SECTIONS ===== */
.data-skills-section,
.projects-section,
.experience-section {
    padding: var(--space-20) 0;
    background: rgba(0, 0, 0, 0.75);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

@supports (backdrop-filter: blur(15px)) {
    .data-skills-section,
    .projects-section,
    .experience-section {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
    color: var(--white);
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    font-family: 'JetBrains Mono', monospace;
    color: var(--white);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gray-400);
}

/* ===== DATA SKILLS SECTION - 4 على سطر واحد ===== */
.data-skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.skill-category {
    background: rgba(0, 0, 0, 0.6);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: var(--transition-slow);
}

@supports (backdrop-filter: blur(10px)) {
    .skill-category {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-xl);
}

.category-icon {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-4);
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
    padding: var(--space-3);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-block;
    width: 80px;
    margin: 0 auto var(--space-4);
}

.skill-category h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: var(--space-6);
    font-weight: 600;
    text-align: center;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.skill-item {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: var(--space-3);
}

.skill-name {
    color: var(--gray-300);
    font-weight: 500;
    font-size: 0.9rem;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-sm);
    transition: width 1.5s ease-out;
    width: 0;
}

.skill-level {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: var(--transition-slow);
}

.project-card.featured {
    border-color: var(--data-color);
    background: rgba(139, 92, 246, 0.1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(59, 130, 246, 0.4);
}

.project-image {
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: var(--space-6);
}

.project-content h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: var(--space-3);
    font-weight: 600;
}

.project-content p {
    color: var(--gray-300);
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.project-tech span {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary-color);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--white);
}

.projects-footer {
    text-align: center;
}

/* ===== EXPERIENCE SECTION ===== */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

.experience-card {
    background: var(--bg-card);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-align: center;
    transition: var(--transition-slow);
}

.experience-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-lg);
}

.experience-icon {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
    padding: var(--space-3);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-block;
    width: 70px;
    margin: 0 auto var(--space-4);
}

.experience-card h3 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.experience-company {
    color: var(--primary-color) !important;
    font-weight: 500;
    margin-bottom: var(--space-3) !important;
}

.experience-card p {
    color: var(--gray-300);
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding: var(--space-8) 0;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: var(--gray-400);
    margin-bottom: var(--space-2);
}

.footer-content p:last-child {
    margin-bottom: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .image-container {
        width: 320px;
        height: 320px;
    }
    
    .title-main {
        font-size: 3.5rem;
    }
    
    .data-skills-grid,
    .projects-grid,
    .experience-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .data-skills-section,
    .projects-section,
    .experience-section {
        padding: var(--space-16) 0;
    }
    
    /* خفي الأيقونات قليلاً على التابلت */
    .tech-item {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 70px;
        padding: 0 var(--space-3);
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .brand-title {
        font-size: 0.75rem;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.1rem;
    }
    
    .hero-description p {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-item {
        padding: var(--space-3);
    }
    
    .image-container {
        width: 220px;
        height: 220px;
    }
    
    /* أخفي الأيقونات تماماً على الشاشات الصغيرة جداً */
    .tech-item {
        display: none;
    }
    
    .skill-category,
    .experience-card {
        padding: var(--space-6);
    }
    
    .project-content {
        padding: var(--space-4);
    }
    
    /* تحسين النصوص على الموبايل */
    .hero-title {
        margin-bottom: var(--space-4);
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 320px) {
    .title-main {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1rem;
    }
    
    .hero-description p {
        font-size: 0.9rem;
    }
    
    .nav-container {
        height: 65px;
        padding: 0 var(--space-2);
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-title {
        font-size: 0.65rem;
    }
    
    .image-container {
        width: 180px;
        height: 180px;
    }
    
    .hero-stats {
        gap: var(--space-2);
    }
    
    .stat-item {
        padding: var(--space-2);
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* ===== ANIMATIONS & TRANSITIONS ===== */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .tech-item {
        animation: none !important;
    }
    
    .status-dot {
        animation: none !important;
    }
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
.nav-link:focus,
.btn:focus,
.project-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

.nav-link:focus-visible,
.btn:focus-visible,
.project-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .mobile-menu-btn,
    .tech-stack,
    .video-background {
        display: none !important;
    }
    
    .hero-section,
    .data-skills-section,
    .projects-section,
    .experience-section {
        background: white !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .hero-content {
        grid-template-columns: 1fr !important;
    }
    
    .data-skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn {
        border: 1px solid black !important;
        color: black !important;
        background: white !important;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-900);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

::-webkit-scrollbar-corner {
    background: var(--gray-900);
}

/* Firefox scrollbar styling - moved to top level */

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--primary-color);
    color: var(--white);
    text-shadow: none;
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
    text-shadow: none;
}

/* ===== HIGH CONTRAST MODE SUPPORT ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --secondary-color: #008844;
        --bg-primary: rgba(0, 0, 0, 0.95);
        --bg-secondary: rgba(0, 0, 0, 0.9);
        --bg-card: rgba(0, 0, 0, 0.8);
    }
    
    .tech-item,
    .skill-category,
    .project-card,
    .experience-card {
        border-width: 2px;
    }
    
    .nav-link,
    .btn {
        border-width: 2px;
    }
}

/* ===== DARK MODE VARIABLES ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: rgba(0, 0, 0, 0.9);
        --bg-secondary: rgba(0, 0, 0, 0.8);
        --bg-card: rgba(0, 0, 0, 0.7);
    }
}

/* ===== UTILITY CLASSES ===== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 9999;
}

.skip-link:focus {
    top: 6px;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.tech-item,
.skill-category,
.project-card,
.experience-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

.profile-img {
    will-change: transform;
    transform: translateZ(0);
}

/* ===== END OF STYLESHEET ===== */

@media (max-width: 480px) {
    .nav-container {
        height: 70px;
        padding: 0 var(--space-3);
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .brand-title {
        font-size: 0.75rem;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.1rem;
    }
    
    .hero-description p {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-item {
        padding: var(--space-3);
    }
    
    .image-container {
        width: 220px;
        height: 220px;
    }
    
    /* أخفي الأيقونات تماماً على الشاشات الصغيرة جداً */
    .tech-item {
        display: none;
    }
    
    .skill-category,
    .experience-card {
        padding: var(--space-6);
    }
    
    .project-content {
        padding: var(--space-4);
    }
    
    /* تحسين النصوص على الموبايل */
    .hero-title {
        margin-bottom: var(--space-4);
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 320px) {
    .title-main {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1rem;
    }
    
    .hero-description p {
        font-size: 0.9rem;
    }
    
    .nav-container {
        height: 65px;
        padding: 0 var(--space-2);
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-title {
        font-size: 0.65rem;
    }
    
    .image-container {
        width: 180px;
        height: 180px;
    }
    
    .hero-stats {
        gap: var(--space-2);
    }
    
    .stat-item {
        padding: var(--space-2);
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* ===== ANIMATIONS & TRANSITIONS ===== */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .tech-item {
        animation: none !important;
    }
    
    .status-dot {
        animation: none !important;
    }
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
.nav-link:focus,
.btn:focus,
.project-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

.nav-link:focus-visible,
.btn:focus-visible,
.project-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .mobile-menu-btn,
    .tech-stack,
    .video-background {
        display: none !important;
    }
    
    .hero-section,
    .data-skills-section,
    .projects-section,
    .experience-section {
        background: white !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .hero-content {
        grid-template-columns: 1fr !important;
    }
    
    .data-skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn {
        border: 1px solid black !important;
        color: black !important;
        background: white !important;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-900);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

::-webkit-scrollbar-corner {
    background: var(--gray-900);
}

/* Firefox scrollbar styling - moved to top level */

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--primary-color);
    color: var(--white);
    text-shadow: none;
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
    text-shadow: none;
}

/* ===== HIGH CONTRAST MODE SUPPORT ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --secondary-color: #008844;
        --bg-primary: rgba(0, 0, 0, 0.95);
        --bg-secondary: rgba(0, 0, 0, 0.9);
        --bg-card: rgba(0, 0, 0, 0.8);
    }
    
    .tech-item,
    .skill-category,
    .project-card,
    .experience-card {
        border-width: 2px;
    }
    
    .nav-link,
    .btn {
        border-width: 2px;
    }
}

/* ===== DARK MODE VARIABLES (Already implemented but ensuring completeness) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: rgba(0, 0, 0, 0.9);
        --bg-secondary: rgba(0, 0, 0, 0.8);
        --bg-card: rgba(0, 0, 0, 0.7);
    }
}

/* ===== UTILITY CLASSES ===== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 9999;
}

.skip-link:focus {
    top: 6px;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.tech-item,
.skill-category,
.project-card,
.experience-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

.profile-img {
    will-change: transform;
    transform: translateZ(0);
}

/* ===== END OF STYLESHEET ===== */grid {
        grid-template-columns: repeat(2, 1fr);
    }


@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--space-4);
        height: 75px;
    }
    
    .brand-name {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: var(--space-8) 0;
        transition: left 0.3s ease;
    }

    @supports (backdrop-filter: blur(20px)) {
        .nav-menu {
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
        }
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .container {
        padding: 0 var(--space-4);
    }
    
    .hero-section {
        padding: var(--space-16) 0 var(--space-12) 0;
    }
    
    .title-main {
        font-size: 3rem;
    }
    
    .title-sub {
        font-size: 1.3rem;
    }
    
    .hero-stats {
        gap: var(--space-4);
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .btn {
        min-width: 150px;
        justify-content: center;
    }
    
    .image-container {
        width: 280px;
        height: 280px;
    }
    
    .tech-item {
        font-size: 0.5rem;
        padding: 3px 6px;
        min-width: 50px;
        max-width: 65px;
    }
    
    .tech-item i {
        font-size: 0.6rem;
    }
    
    .tech-item span {
        font-size: 0.45rem;
    }
    .data-skills-grid,
    .projects-grid,
    .experience-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .data-skills-section,
    .projects-section,
    .experience-section {
        padding: var(--space-16) 0;
    }
    
    /* خفي الأيقونات قليلاً على التابلت */
    .tech-item {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 70px;
        padding: 0 var(--space-3);
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .brand-title {
        font-size: 0.75rem;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.1rem;
    }
    
    .hero-description p {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-item {
        padding: var(--space-3);
    }
    
    .image-container {
        width: 220px;
        height: 220px;
    }
    
    /* أخفي الأيقونات تماماً على الشاشات الصغيرة جداً */
    .tech-item {
        display: none;
    }
    
    .skill-category,
    .experience-card {
        padding: var(--space-6);
    }
    
    .project-content {
        padding: var(--space-4);
    }
    
    /* تحسين النصوص على الموبايل */
    .hero-title {
        margin-bottom: var(--space-4);
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 320px) {
    .title-main {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1rem;
    }
    
    .hero-description p {
        font-size: 0.9rem;
    }
    
    .nav-container {
        height: 65px;
        padding: 0 var(--space-2);
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-title {
        font-size: 0.65rem;
    }
    
    .image-container {
        width: 180px;
        height: 180px;
    }
    
    .hero-stats {
        gap: var(--space-2);
    }
    
    .stat-item {
        padding: var(--space-2);
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .tech-item {
        animation: none !important;
    }
    
    .status-dot {
        animation: none !important;
    }
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
.nav-link:focus,
.btn:focus,
.project-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

.nav-link:focus-visible,
.btn:focus-visible,
.project-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-900);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

::-webkit-scrollbar-corner {
    background: var(--gray-900);
}

/* Firefox scrollbar styling - moved to top level */

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--primary-color);
    color: var(--white);
    text-shadow: none;
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
    text-shadow: none;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.tech-item,
.skill-category,
.project-card,
.experience-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

.profile-img {
    will-change: transform;
    transform: translateZ(0);
}

/* ===== END OF STYLESHEET ===== */

/* ===== إصلاحات الموبايل ===== */
@media (max-width: 768px) {
    /* إصلاح الهيدر */
    .navbar {
        height: 70px;
        padding: 0;
    }
    
    .nav-container {
        height: 70px;
        padding: 0 var(--space-4);
        justify-content: space-between;
    }
    
    /* إصلاح اسمك */
    .brand-name {
        font-size: 1.4rem;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    .brand-title {
        font-size: 0.75rem;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    /* إخفاء الخط الأزرق المعلق */
    .nav-link::before {
        display: none;
    }
    
    /* توسيط الأزرار */
    .hero-actions {
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    .btn {
        min-width: 140px;
        text-align: center;
        justify-content: center;
    }
    
    /* إصلاح الأيقونات في الهيدر */
    .nav-icon {
        width: 18px;
        height: 18px;
        opacity: 1;
        filter: brightness(1);
    }
    
    /* إصلاح القائمة المنسدلة */
    .nav-menu {
        background: rgba(0, 0, 0, 0.95);
    }

    @supports (backdrop-filter: blur(20px)) {
        .nav-menu {
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
        }
    }
    
    .nav-link {
        padding: var(--space-3) var(--space-4);
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* اسمك في الموبايل الصغير */
    .brand-name {
        font-size: 1.2rem;
    }
    
    .brand-title {
        font-size: 0.65rem;
    }
    
    /* الأزرار في الموبايل الصغير */
    .btn {
        min-width: 120px;
        font-size: 0.9rem;
        padding: var(--space-2) var(--space-4);
    }
    
    .hero-actions {
        gap: var(--space-3);
    }
}
/* ===== إصلاح الصورة المقطوعة من الهيدر ===== */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 120px; /* مسافة أكبر من الهيدر */
    }
    
    .hero-image {
        margin-top: var(--space-8); /* الصورة تنزل أكتر */
    }
    
    .image-container {
        margin-top: var(--space-4); /* مسافة إضافية */
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-image {
        margin-top: var(--space-6);
    }
}
/* ===== رفع الأزرار أكتر في الموبايل ===== */
@media (max-width: 768px) {
   .hero-actions {
       margin-top: var(--space-2);
       margin-bottom: var(--space-2);
   }
}

@media (max-width: 480px) {
   .hero-actions {
       margin-top: var(--space-2);
       margin-bottom: var(--space-2);
   }
}
/* ===== FEATURED CERTIFICATES SECTION ===== */
.certificates-section-home {
    padding: var(--space-20) 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    position: relative;
}

.certificates-section-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.certificates-grid-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    margin-bottom: var(--space-16);
    position: relative;
    z-index: 1;
}

/* ===== CERTIFICATE CARDS ===== */
.certificate-card-home {
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: var(--transition-slow);
    position: relative;
}

@supports (backdrop-filter: blur(10px)) {
    .certificate-card-home {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.certificate-card-home.featured {
    border-color: var(--accent-color);
    background: rgba(245, 158, 11, 0.05);
}

.certificate-card-home:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border-color: rgba(16, 185, 129, 0.4);
}

.certificate-card-home.featured:hover {
    border-color: var(--accent-color);
    box-shadow: 0 25px 50px rgba(245, 158, 11, 0.25);
}

/* ===== CERTIFICATE BADGE ===== */
.certificate-badge-home {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 2;
}

.certificate-badge-home .badge-text {
    background: var(--secondary-color);
    color: var(--white);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.certificate-badge-home.latest .badge-text {
    background: linear-gradient(135deg, var(--accent-color), #f59e0b);
}

/* ===== CERTIFICATE IMAGE ===== */
.certificate-image-home {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.certificate-image-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: var(--transition-slow);
}

.certificate-card-home:hover .certificate-image-home img {
    transform: scale(1.1);
}

.certificate-overlay-home {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.9) 0%, 
        rgba(245, 158, 11, 0.9) 100%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-card-home:hover .certificate-overlay-home {
    opacity: 1;
}

.overlay-content-home {
    text-align: center;
    color: var(--white);
    transform: translateY(20px);
    transition: var(--transition);
}

.certificate-card-home:hover .overlay-content-home {
    transform: translateY(0);
}

.overlay-content-home i {
    font-size: 3rem;
    margin-bottom: var(--space-3);
    display: block;
    animation: bounceIn 0.6s ease-out;
}

.overlay-content-home span {
    display: block;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

/* ===== CERTIFICATE CONTENT ===== */
.certificate-content-home {
    padding: var(--space-6);
}

.certificate-provider-home {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(16, 185, 129, 0.1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: inline-block;
    margin-bottom: var(--space-3);
}

.certificate-content-home h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: var(--space-3);
    font-weight: 600;
    line-height: 1.3;
}

.certificate-content-home p {
    color: var(--gray-300);
    margin-bottom: var(--space-5);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== CERTIFICATE SKILLS ===== */
.certificate-skills-home {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.certificate-skills-home span {
    background: rgba(16, 185, 129, 0.15);
    color: var(--secondary-color);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.25);
    transition: var(--transition);
}

.certificate-skills-home span:hover {
    background: rgba(16, 185, 129, 0.25);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== CERTIFICATE LINK ===== */
.certificate-link-home {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: var(--space-3) var(--space-5);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    background: rgba(16, 185, 129, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.certificate-link-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.certificate-link-home:hover::before {
    left: 0;
}

.certificate-link-home:hover {
    color: var(--white);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.certificate-link-home::after {
    content: '→';
    margin-left: var(--space-1);
    transition: var(--transition);
}

.certificate-link-home:hover::after {
    transform: translateX(3px);
}

/* ===== CERTIFICATES FOOTER ===== */
.certificates-footer-home {
    text-align: center;
    margin-top: var(--space-8);
}

.certificates-footer-home .btn {
    position: relative;
    overflow: hidden;
}

.certificates-footer-home .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

.certificates-footer-home .btn:hover::before {
    left: 100%;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .certificates-grid-home {
        grid-template-columns: repeatrepeat(3, 1fr);
        gap: var(--space-6);
    }
    
    .certificate-image-home {
        height: 230px;
    }
}

@media (max-width: 768px) {
    .certificates-section-home {
        padding: var(--space-16) 0;
        repeat(auto-fit, minmax(280px, 1fr))

    }
    
    .certificates-grid-home {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .certificate-image-home {
        height: 220px;
    }
    
    .certificate-content-home {
        padding: var(--space-5);
    }
    
    .certificate-content-home h3 {
        font-size: 1.2rem;
    }
    
    .certificate-skills-home {
        gap: var(--space-1);
    }
    
    .certificate-skills-home span {
        font-size: 0.75rem;
        padding: var(--space-1) var(--space-2);
    }
}

@media (max-width: 480px) {
    .certificates-section-home {
        padding: var(--space-12) 0;
        grid-template-columns: 1fr
    }
    
    .certificate-image-home {
        height: 200px;
    }
    
    .certificate-content-home {
        padding: var(--space-4);
    }
    
    .certificate-content-home h3 {
        font-size: 1.1rem;
    }
    
    .certificate-link-home {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .certificate-card-home,
    .certificate-image-home img,
    .certificate-overlay-home,
    .certificate-link-home {
        transition: none !important;
        animation: none !important;
    }
    
    .certificate-card-home:hover {
        transform: none !important;
    }
}

/* ===== FOCUS STATES ===== */
.certificate-link-home:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.certificate-card-home:focus-within {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ===== LOADING ANIMATION ===== */
@keyframes certificateSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.certificate-card-home {
    animation: certificateSlideUp 0.6s ease-out;
}

.certificate-card-home:nth-child(1) { animation-delay: 0.1s; }
.certificate-card-home:nth-child(2) { animation-delay: 0.2s; }
.certificate-card-home:nth-child(3) { animation-delay: 0.3s; }

/* ===== PRINT STYLES ===== */
@media print {
    .certificates-section-home {
        background: white !important;
        color: black !important;
    }
    
    .certificate-card-home {
        border: 1px solid #ddd !important;
        background: #f9f9f9 !important;
        break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .certificate-content-home h3,
    .certificate-provider-home {
        color: black !important;
    }
    
    .certificate-content-home p {
        color: #333 !important;
    }
    
    .certificate-overlay-home,
    .certificate-badge-home {
        display: none !important;
    }
}