﻿/* ==========================================================================
   Premium Personal Portfolio Stylesheet
   Author: Antigravity AI
   Target: Abdelrahman Mohamed (Frontend & Flutter Developer)
   Design Concept: Modern Glassmorphism, Luxury Dark & Light Themes
   ========================================================================== */

:root {
    /* --- Ultra-Premium Dark Theme Variable Tokens (Default) --- */
    --bg-color: #0F172A;
    --bg-secondary: #111827;
    --card-bg: rgba(30, 41, 59, 0.45);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-hover-border: rgba(59, 130, 246, 0.25);
    --primary: #3B82F6;
    --primary-rgb: 59, 130, 246;
    --accent: #8B5CF6;
    --accent-rgb: 139, 92, 246;
    --text-main: #FFFFFF;
    --text-muted: #CBD5E1;
    --glass-bg: rgba(30, 41, 59, 0.55);
    --nav-bg: rgba(15, 23, 42, 0.75);
    --orb-blur: 140px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    --accent-glow: rgba(139, 92, 246, 0.15);
    --status-green: #10B981;
    --status-green-bg: rgba(16, 185, 129, 0.1);
    --btn-shadow: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] {
    /* --- Premium Light Theme Variable Tokens --- */
    --bg-color: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-hover-border: rgba(37, 99, 235, 0.25);
    --primary: #2563EB;
    --primary-rgb: 37, 99, 235;
    --accent: #7C3AED;
    --accent-rgb: 124, 58, 237;
    --text-main: #0F172A;
    --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --nav-bg: rgba(248, 250, 252, 0.85);
    --orb-blur: 160px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --accent-glow: rgba(124, 58, 237, 0.08);
    --status-green: #059669;
    --status-green-bg: rgba(5, 150, 105, 0.08);
    --btn-shadow: rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   1. Base & Reset Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 80px; /* Offset for sticky navbar */
}

/* High-fidelity Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.15);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bilingual Typography Optimization */
html[lang="en"] body {
    font-family: 'Inter', sans-serif;
}
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, 
html[lang="en"] h4, html[lang="en"] h5, html[lang="en"] h6, 
html[lang="en"] .logo {
    font-family: 'Poppins', sans-serif;
}

html[lang="ar"] body {
    font-family: 'Cairo', sans-serif;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, 
html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6, 
html[lang="ar"] .logo {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}
html[lang="ar"] * {
    letter-spacing: 0 !important;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Language Swapping Display Rules */
html[lang="ar"] .lang-en { display: none !important; }
html[lang="en"] .lang-ar { display: none !important; }

/* ==========================================================================
   2. Background Effects (Grid Overlay & Glowing Orbs)
   ========================================================================== */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -2;
    pointer-events: none;
}
[data-theme="light"] .grid-bg {
    background-image: radial-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(var(--orb-blur));
    opacity: 0.55;
    animation: floatOrb 15s infinite ease-in-out alternate;
    transition: filter 0.4s ease;
}
.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.25) 0%, transparent 70%);
    top: -150px;
    inset-inline-start: -150px;
}
.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.25) 0%, transparent 70%);
    bottom: -200px;
    inset-inline-end: -150px;
    animation-delay: -5s;
}
.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 40px) scale(1.1); }
    100% { transform: translate(-30px, 20px) scale(0.92); }
}

/* ==========================================================================
   3. Premium Glass Loader
   ========================================================================== */
.glass-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.glass-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}
.loader-content {
    text-align: center;
    width: 300px;
}
.loader-logo {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    margin-bottom: 20px;
    position: relative;
    font-family: 'Poppins', sans-serif;
}
.pulse-dot {
    color: var(--primary);
    animation: blink 1.2s infinite;
}
.loader-bar-container {
    width: 100%;
    height: 4px;
    background: var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    animation: fillLoader 2s ease-in-out forwards;
}

@keyframes fillLoader {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}
@keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* ==========================================================================
   4. Scroll Progress Indicator
   ========================================================================== */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1001;
}
.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
}

/* ==========================================================================
   5. Glassmorphism Card Style
   ========================================================================== */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.glass-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-hover-border);
    box-shadow: 0 15px 45px rgba(var(--primary-rgb), 0.08);
}

/* ==========================================================================
   6. Custom Buttons & CTA
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
    outline: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #FFFFFF;
    box-shadow: 0 4px 15px var(--btn-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.45);
}
.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid var(--card-border);
}
[data-theme="light"] .btn-outline {
    background: rgba(0, 0, 0, 0.01);
}
.btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.btn-sm {
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 8px;
}
.w-100 {
    width: 100%;
}

/* ==========================================================================
   7. Navigation (Header Navbar & Mobile Drawer)
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
}
.logo-dot {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 1.8rem;
}
.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
    padding: 4px 0;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.lang-btn, .theme-btn {
    background: var(--card-border);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.lang-btn:hover, .theme-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    transform: scale(1.05);
}
.theme-btn {
    width: 40px;
    height: 40px;
    padding: 0;
}
.theme-btn .light-icon { display: none; }
[data-theme="light"] .theme-btn .dark-icon { display: none; }
[data-theme="light"] .theme-btn .light-icon { display: block; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
    padding: 4px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}
.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -7px);
}

/* Mobile Navigation Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    inset-inline-end: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    transition: inset-inline-end 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    padding: 2rem;
    border-inline-start: 1px solid var(--card-border);
}
.mobile-menu.open {
    inset-inline-end: 0;
}
.mobile-link {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}
.mobile-link:hover {
    color: var(--text-main);
}

/* ==========================================================================
   8. Layout & Section Typography
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.section {
    padding: 80px 0;
    display: flex;
    align-items: center;
}
.hero.section {
    min-height: 100vh;
    padding-top: 130px;
}
.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}
html[lang="ar"] .section-title {
    letter-spacing: 0;
}

/* ==========================================================================
   9. Section 1: Hero / Home
   ========================================================================== */
.hero {
    position: relative;
    padding-top: 130px;
    min-height: 100vh;
    overflow: hidden;
}
.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}
.hero-text {
    max-width: 650px;
    flex: 1;
}

/* Pulse Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--status-green-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--status-green);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--status-green);
    border-radius: 50%;
    animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.greeting {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.name {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}
html[lang="ar"] .name {
    letter-spacing: 0;
    font-size: 3.4rem;
}
.typing-container {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.2rem;
    height: 40px;
    display: flex;
    align-items: center;
}
.cursor {
    animation: blink 0.8s infinite;
    color: var(--accent);
}
.headline {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}
.intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}
.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Social links list */
.social-links {
    display: flex;
    gap: 1.2rem;
}
.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--card-border);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.social-links a:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px);
}

/* Hero Visuals Profile & Rings */
.hero-visuals {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}
.hero-image-container {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    z-index: 10;
}
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--card-border);
    box-shadow: 0 0 35px rgba(var(--primary-rgb), 0.2);
    position: relative;
    z-index: 2;
}
.image-glow {
    position: absolute;
    top: -8%;
    left: -8%;
    width: 116%;
    height: 116%;
    background: conic-gradient(from 0deg, var(--primary), var(--accent), var(--primary));
    border-radius: 50%;
    filter: blur(28px);
    z-index: 1;
    animation: rotateGlow 8s linear infinite;
    opacity: 0.65;
}
.hero-ring-vector {
    position: absolute;
    top: -4%;
    left: -4%;
    width: 108%;
    height: 108%;
    z-index: 3;
    pointer-events: none;
    animation: rotateGlow 22s linear infinite reverse;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating Tech Icons */
.float-icon {
    position: absolute;
    font-size: 2.2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: floatIcon 6s infinite ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    transition: transform 0.3s;
}
.float-icon:hover {
    transform: scale(1.1);
}
.icon-net { top: 8%; left: 8%; animation-delay: 0s; color: #512BD4; }
.icon-node { top: 12%; right: 8%; animation-delay: 1.5s; color: #339933; }
.icon-csharp { bottom: 18%; left: 10%; animation-delay: 3s; color: var(--primary); }
.icon-database { bottom: 12%; right: 12%; animation-delay: 4.5s; color: #CC292B; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

/* ==========================================================================
   10. Section 2: Badges
   ========================================================================== */
.badge-section {
    padding: 40px 0;
}
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.badge-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1.8rem 2.2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.badge-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.15);
}
.badge-card:hover .badge-icon {
    transform: scale(1.15) rotate(5deg);
}
.badge-icon {
    font-size: 2.2rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.badge-icon.green {
    color: var(--status-green);
}
.badge-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--text-main) 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.glow-text {
    background: linear-gradient(135deg, var(--status-green) 40%, #A7F3D0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   11. Section 3: About
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
}
.about-content h3, .about-details h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}
.about-content p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
}
.about-strengths {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.strength-badge {
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.info-list {
    list-style: none;
}
.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.95rem;
}
.info-list li:last-child {
    border: none;
}
.info-list li strong {
    color: var(--text-muted);
    font-weight: 600;
}
.info-list li span {
    font-weight: 500;
    text-align: end;
}

/* ==========================================================================
   12. Section 4: Education
   ========================================================================== */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.edu-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.edu-card .card-duration {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 4px 12px;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 1rem;
}
.edu-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.edu-card h4 {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.edu-card .card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Courses timeline view */
.courses-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.course-item {
    display: flex;
    gap: 16px;
}
.course-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 8px;
    flex-shrink: 0;
}
.course-text h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}
.course-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   13. Section 5: Experience
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--card-border);
    inset-inline-start: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3.5rem;
    padding-inline-start: 60px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 15px var(--primary);
    inset-inline-start: 12px;
}

.timeline-content {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.12);
}
.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 4px 12px;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 1rem;
}
.timeline-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.timeline-company {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.timeline-summary {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.timeline-tasks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.timeline-tasks li {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.timeline-tasks li i {
    color: var(--primary);
    margin-top: 4px;
    font-size: 1rem;
}

/* ==========================================================================
   14. Section 6: Skills
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.skills-bars-col h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
}
.skill-progress-item {
    margin-bottom: 1.8rem;
}
.skill-progress-item:last-child {
    margin-bottom: 0;
}
.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}
.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--card-border);
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.skills-cards-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.skills-category-card {
    padding: 1.5rem 1.8rem !important;
}
.skills-category-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}
.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(var(--primary-rgb), 0.04);
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.chip:hover {
    color: var(--text-main);
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.15);
}
}

/* ==========================================================================
   15. Section 7: Projects
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 860px;
    margin-inline: auto;
}
.project-card {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.project-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.mock-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--accent-rgb), 0.1));
}
.project-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    pointer-events: none;
}
.project-card:hover .project-img {
    transform: scale(1.08);
}

.project-info-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
}
.tag {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 30px;
}
.project-info-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.project-info-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.8rem;
    flex-1: 1;
}
.project-links {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* ==========================================================================
   16. Section 8: Testimonials
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 30px;
}
.testimonial-card .stars {
    color: #FBBF24;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}
.testimonial-card .quote {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.8rem;
    position: relative;
    line-height: 1.6;
}
.testimonial-card .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}
.user-info h4 {
    font-size: 1rem;
    font-weight: 700;
}
.user-info .title {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================================================
   17. Section 9: Services
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 30px;
}
.service-card {
    text-align: center;
    padding: 3rem 2rem !important;
}
.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.8rem auto;
    transition: transform 0.3s ease, background 0.3s ease;
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(6deg);
    background: var(--primary);
    color: #FFFFFF;
}
.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   18. Section 10: Contact
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.info-item-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1.5rem 1.8rem !important;
}
.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-text h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}
.info-text p, .info-text a {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.3s;
}
.info-text a:hover {
    color: var(--primary);
}
.social-flex {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.social-flex a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.social-flex a:hover {
    background: var(--primary);
    color: #FFFFFF;
    transform: scale(1.1);
}

/* Glass Form Fields */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.form-group {
    position: relative;
    width: 100%;
}
.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}
[data-theme="light"] .form-group input, [data-theme="light"] .form-group textarea {
    background: rgba(0, 0, 0, 0.01);
}
.form-group input:focus, .form-group textarea:focus {
    background: rgba(var(--primary-rgb), 0.02);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.1);
}

/* Floating labels */
.form-group label {
    position: absolute;
    inset-inline-start: 1.3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s ease;
}
.form-group textarea ~ label {
    top: 1.8rem;
    transform: none;
}
.form-group input:focus ~ label, .form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label, .form-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    inset-inline-start: 1rem;
    transform: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-color);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--card-border);
}

/* ==========================================================================
   19. Section 11: Footer
   ========================================================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--card-border);
    padding: 60px 0 0 0;
    margin-top: 100px;
}
.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.6;
    max-width: 320px;
}
.footer-links-group h4, .footer-socials-group h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s;
}
.footer-nav a:hover {
    color: var(--primary);
}
.footer-socials {
    display: flex;
    gap: 12px;
}
.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.footer-socials a:hover {
    background: var(--primary);
    color: #FFFFFF;
    transform: translateY(-4px);
}
.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding: 30px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-bottom p {
    margin-bottom: 8px;
}
.footer-bottom p:last-child {
    margin-bottom: 0;
}
.text-center {
    text-align: center;
}

/* ==========================================================================
   20. Glass Form Toast Notification Alert
   ========================================================================== */
.toast-card {
    position: fixed;
    bottom: 30px;
    inset-inline-end: -400px;
    width: 350px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 1.5rem !important;
    z-index: 1010;
    border-inline-start: 4px solid var(--status-green);
    transition: inset-inline-end 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-card.show {
    inset-inline-end: 30px;
}
.toast-icon {
    font-size: 2rem;
    color: var(--status-green);
}
.toast-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.toast-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   21. Animations & Reveal Classes (Intersection Observer)
   ========================================================================== */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up {
    transform: translateY(40px);
}
.fade-left {
    transform: translateX(40px);
}
.fade-right {
    transform: translateX(-40px);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* ==========================================================================
   Certificates Gallery
   ========================================================================== */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 30px;
    margin-top: 2.5rem;
}
.cert-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
    border-radius: 20px;
}
.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.15);
}
.cert-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}
.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cert-card:hover .cert-img {
    transform: scale(1.08);
}
.cert-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--primary-rgb), 0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: pointer;
}
.cert-card:hover .cert-img-overlay {
    opacity: 1;
}
.cert-zoom-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    transition: transform 0.3s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.cert-zoom-btn:hover {
    transform: scale(1.1);
}
.cert-info {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.cert-issuer {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}
.cert-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 0.8rem;
    flex-grow: 1;
}
html[lang="ar"] .cert-info h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.15rem;
}
.cert-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ==========================================================================
   Image Lightbox Modal Overlay
   ========================================================================== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10005;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease;
    align-items: center;
    justify-content: center;
}
.lightbox-modal.open {
    display: flex;
    opacity: 1;
}
.lightbox-content-wrapper {
    position: relative;
    max-width: 85%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomLightbox 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox-content {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
    margin-top: 1.5rem;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    background: var(--glass-bg);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
}
html[lang="ar"] .lightbox-caption {
    font-family: 'Cairo', sans-serif;
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-main);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    z-index: 10010;
    outline: none;
    padding: 0;
    font-family: Arial, sans-serif;
}
.lightbox-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

@keyframes zoomLightbox {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   22. Absolute Responsive Media Queries (Mobile First)
   ========================================================================== */

/* Tablet Portrait & Small Screen adjustments */
@media (max-width: 991px) {
    .section {
        padding: 60px 0;
        min-height: auto;
    }
    .hero {
        padding-top: 110px;
        min-height: auto;
    }
    .hero-container {
        flex-direction: column-reverse;
        gap: 40px;
        text-align: center;
    }
    .hero-text {
        max-width: 100%;
    }
    .hero-btns {
        justify-content: center;
    }
    .social-links {
        justify-content: center;
    }
    .about-grid, .education-grid, .skills-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .about-details {
        order: -1;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .footer-brand p {
        margin: 1rem auto 0 auto;
    }
    .footer-socials {
        justify-content: center;
    }
    .hero-visuals {
        width: 340px;
        height: 340px;
    }
    .hero-image-container {
        width: 240px;
        height: 240px;
    }
    .float-icon {
        width: 52px;
        height: 52px;
        font-size: 1.8rem;
    }
    .icon-net { top: 6%; left: 6%; }
    .icon-node { top: 10%; right: 6%; }
    .icon-csharp { bottom: 16%; left: 8%; }
    .icon-database { bottom: 10%; right: 8%; }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 580px;
    }
}

/* Mobile Screen & Navigation Menu switch */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide desktop links */
    }
    .hamburger {
        display: flex; /* Show Hamburger */
    }
    .name {
        font-size: 2.8rem;
    }
    html[lang="ar"] .name {
        font-size: 2.6rem;
    }
    .typing-container {
        font-size: 1.6rem;
        justify-content: center;
    }
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .badge-card {
        padding: 1.2rem 1rem;
        gap: 12px;
    }
    .badge-icon {
        font-size: 1.8rem;
    }
    .badge-number {
        font-size: 1.8rem;
    }
    .badge-text {
        font-size: 0.75rem;
    }
    .skills-cards-col {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .glass-card {
        padding: 1.5rem;
    }
    .toast-card {
        width: calc(100vw - 40px);
        inset-inline-end: -100vw;
    }
    .toast-card.show {
        inset-inline-end: 20px;
    }
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 32px;
    }
    .lightbox-content-wrapper {
        max-width: 95%;
        max-height: 90%;
    }
    .lightbox-caption {
        font-size: 0.95rem;
        padding: 0.6rem 1.5rem;
        margin-top: 1rem;
    }
}

/* Very Small Mobile Screen adjustments */
@media (max-width: 480px) {
    .nav-container {
        padding: 12px 16px;
    }
    .nav-controls {
        gap: 0.6rem;
    }
    .logo {
        font-size: 1.5rem;
    }
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    .theme-btn {
        width: 36px;
        height: 36px;
    }
    .badge-grid {
        grid-template-columns: 1fr;
    }
    .badge-card {
        padding: 1rem 1.2rem;
    }
    .hero-visuals {
        width: 280px;
        height: 280px;
    }
    .hero-image-container {
        width: 180px;
        height: 180px;
    }
    .float-icon {
        width: 42px;
        height: 42px;
        font-size: 1.4rem;
    }
    .icon-net { top: 4%; left: 4%; }
    .icon-node { top: 8%; right: 4%; }
    .icon-csharp { bottom: 12%; left: 6%; }
    .icon-database { bottom: 8%; right: 6%; }
    .info-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .info-list li span {
        text-align: start;
    }
    .hero-btns {
        flex-direction: column;
        width: 100%;
    }
    .hero-btns .btn {
        width: 100%;
    }
}


/* ==========================================================================

/* ==========================================================================
   PROFESSIONAL PRINT STYLESHEET
   Page Layout:
     Page 1 — Hero + Badges
     Page 2 — About + Skills
     Page 3 — Certificates
     Page 4 — Experience + Education
     Page 5 — Projects
     Page 6 — Testimonials + Contact
   ========================================================================== */
@media print {

    /* ── Page Setup ── */
    @page {
        size: A4 portrait;
        margin: 15mm 14mm 15mm 14mm;
    }

    /* ── Global reset for print ── */
    *, *::before, *::after {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        animation: none !important;
        transition: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html, body {
        background: #ffffff !important;
        color: #111111 !important;
        font-size: 10.5pt;
        line-height: 1.5;
        width: 100%;
        overflow: visible !important;
    }

    /* Fix gradient clip text — not supported in print */
    .name, .section-title, .badge-number, .glow-text {
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: #111111 !important;
        color: #111111 !important;
    }

    /* ── Hide all UI-only elements ── */
    #loader, .glass-loader, .grid-bg, .bg-orbs, .orb,
    #navbar, .glass-nav, .mobile-menu, .hamburger,
    .scroll-progress-container, .scroll-progress-bar,
    .nav-links, .nav-controls, .lang-btn, .theme-btn,
    .hero-ring-vector, .image-glow, .float-icon, .cursor, .pulse,
    .hero-btns, .social-links, .project-links,
    .cert-img-overlay, .project-img-overlay,
    .contact-form, form, .btn, #back-to-top,
    .mobile-link, .testimonials-nav, .testimonials-dots {
        display: none !important;
    }

    /* ── Layout base ── */
    main   { display: block !important; padding: 0 !important; margin: 0 !important; }
    .container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }

    /* ── Show all reveal-animated elements ── */
    .reveal, .fade-up, .fade-right, .fade-left, .fade-in {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       PAGE BREAK RULES
       Merge small sections with their neighbours
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

    /* PAGE 1 — Hero (no break before first page) */
    section#home.hero.section {
        page-break-before: avoid !important;
        break-before: avoid !important;
        padding-top: 8pt !important;
        min-height: unset !important;
        display: block !important;
    }

    /* Badge section flows directly after Hero — NO break */
    section.badge-section {
        page-break-before: avoid !important;
        break-before: avoid !important;
        padding: 10pt 0 0 0 !important;
        min-height: unset !important;
        display: block !important;
    }

    /* PAGE 2 — About (new page) */
    section#about.about.section {
        page-break-before: always !important;
        break-before: page !important;
        padding: 20pt 0 8pt !important;
        min-height: unset !important;
        display: block !important;
    }

    /* Skills flows after About — NO break */
    section#skills.skills.section {
        page-break-before: avoid !important;
        break-before: avoid !important;
        padding: 8pt 0 !important;
        min-height: unset !important;
        display: block !important;
    }

    /* PAGE 3 — Certificates (new page) */
    section#certificates.certificates.section {
        page-break-before: always !important;
        break-before: page !important;
        padding: 20pt 0 8pt !important;
        min-height: unset !important;
        display: block !important;
    }

    /* PAGE 4 — Experience (new page) */
    section#experience.experience.section {
        page-break-before: always !important;
        break-before: page !important;
        padding: 20pt 0 8pt !important;
        min-height: unset !important;
        display: block !important;
    }

    /* Education flows after Experience — NO break */
    section#education.education.section {
        page-break-before: avoid !important;
        break-before: avoid !important;
        padding: 8pt 0 !important;
        min-height: unset !important;
        display: block !important;
    }

    /* PAGE 5 — Projects (new page) */
    section#projects.projects.section {
        page-break-before: always !important;
        break-before: page !important;
        padding: 20pt 0 8pt !important;
        min-height: unset !important;
        display: block !important;
    }

    /* PAGE 6 — Testimonials (new page) */
    section#testimonials.testimonials.section {
        page-break-before: always !important;
        break-before: page !important;
        padding: 20pt 0 8pt !important;
        min-height: unset !important;
        display: block !important;
    }

    /* Contact flows after Testimonials — NO break */
    section#contact.contact.section {
        page-break-before: avoid !important;
        break-before: avoid !important;
        padding: 8pt 0 !important;
        min-height: unset !important;
        display: block !important;
    }

    /* Any other sections — default to new page */
    section.section {
        padding: 20pt 0 8pt !important;
        min-height: unset !important;
        display: block !important;
        border: none !important;
    }

    /* Avoid page breaks inside cards */
    .glass-card, .badge-card, .cert-card, .project-card,
    .edu-card, .timeline-item, .service-card, .testimonial-card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        border: 1px solid #dddddd !important;
        border-radius: 6pt !important;
        background: #f8f8f8 !important;
        padding: 10pt !important;
        margin-bottom: 8pt !important;
    }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       SECTION TITLES
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    .section-title {
        font-size: 16pt !important;
        font-weight: 800 !important;
        color: #111111 !important;
        margin-bottom: 10pt !important;
        text-align: right !important;
        border-bottom: 2.5pt solid #3B82F6 !important;
        padding-bottom: 5pt !important;
        letter-spacing: 0 !important;
    }
    html[lang="en"] .section-title { text-align: left !important; }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       PAGE 1 — HERO + BADGES
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

    /* Print header bar above hero */
    section#home.hero.section::before {
        content: "Seif Eldin ELMuselmani  ·  Backend Software Engineer  ·  eldenseif645@gmail.com  ·  +20 122 381 7860";
        display: block !important;
        font-size: 8pt !important;
        color: #555555 !important;
        background: #f0f4ff !important;
        border-bottom: 1.5pt solid #3B82F6 !important;
        padding: 5pt 8pt !important;
        margin-bottom: 12pt !important;
        text-align: center !important;
        font-weight: 600 !important;
        border-radius: 4pt !important;
        letter-spacing: 0.3pt !important;
    }

    .hero-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 18pt !important;
    }
    .hero-text { flex: 1 !important; max-width: 100% !important; }
    .hero-visuals {
        width: 110pt !important;
        height: 110pt !important;
        flex-shrink: 0 !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .hero-image-container { width: 100pt !important; height: 100pt !important; }
    .hero-image {
        width: 100pt !important;
        height: 100pt !important;
        border-radius: 50% !important;
        border: 2pt solid #999999 !important;
        object-fit: cover !important;
        display: block !important;
    }
    .name { font-size: 20pt !important; font-weight: 900 !important; margin-bottom: 3pt !important; line-height: 1.2 !important; }
    .greeting { font-size: 10pt !important; color: #3B82F6 !important; font-weight: 600 !important; margin-bottom: 2pt !important; }
    .headline { font-size: 9pt !important; color: #333333 !important; font-weight: 600 !important; margin-bottom: 6pt !important; }
    .intro { font-size: 9pt !important; color: #555555 !important; margin-bottom: 8pt !important; }
    .status-badge {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4pt !important;
        border: 1pt solid #aaaaaa !important;
        background: #f0fff8 !important;
        color: #059669 !important;
        font-size: 8pt !important;
        padding: 3pt 9pt !important;
        border-radius: 20pt !important;
        font-weight: 700 !important;
        margin-bottom: 8pt !important;
    }
    .typing-container { font-size: 12pt !important; color: #555555 !important; height: auto !important; font-weight: 700 !important; margin-bottom: 6pt !important; }

    /* Badges grid — compact row */
    .badge-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6pt !important;
        margin-top: 6pt !important;
    }
    .badge-card {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 4pt !important;
        padding: 8pt 6pt !important;
    }
    .badge-number { font-size: 14pt !important; font-weight: 800 !important; color: #111111 !important; }
    .badge-icon { font-size: 14pt !important; color: #3B82F6 !important; }
    .badge-text { font-size: 7.5pt !important; color: #555555 !important; font-weight: 600 !important; }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       PAGE 2 — ABOUT + SKILLS
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    .about-grid {
        display: grid !important;
        grid-template-columns: 1.4fr 1fr !important;
        gap: 10pt !important;
    }
    .about-content h3, .about-details h3 { font-size: 11pt !important; color: #111111 !important; font-weight: 700 !important; margin-bottom: 6pt !important; }
    .about-content p, .about-details p { font-size: 8.5pt !important; color: #444444 !important; margin-bottom: 5pt !important; }
    .strength-badge {
        display: inline-block !important;
        background: #eef2ff !important;
        color: #3730a3 !important;
        border: 1pt solid #c7d2fe !important;
        border-radius: 20pt !important;
        padding: 2pt 7pt !important;
        font-size: 7.5pt !important;
        font-weight: 600 !important;
        margin: 1.5pt !important;
    }
    .info-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
    .info-list li {
        display: flex !important;
        gap: 6pt !important;
        padding: 4pt 0 !important;
        border-bottom: 1pt solid #eeeeee !important;
        font-size: 8.5pt !important;
        color: #444444 !important;
    }
    .info-list li strong { color: #111111 !important; min-width: 70pt !important; font-weight: 700 !important; }

    /* Skills section compact */
    .skills-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10pt !important;
        margin-top: 6pt !important;
    }
    .skills-bars-col h3, .skills-cards-col h3 { font-size: 10pt !important; color: #111111 !important; font-weight: 700 !important; margin-bottom: 8pt !important; }
    .skill-progress-item { margin-bottom: 7pt !important; }
    .skill-info { display: flex !important; justify-content: space-between !important; margin-bottom: 2pt !important; }
    .skill-name { font-size: 8pt !important; color: #333333 !important; font-weight: 600 !important; }
    .skill-percent { font-size: 8pt !important; color: #3B82F6 !important; font-weight: 700 !important; }
    .progress-bar-bg { background: #e2e8f0 !important; border-radius: 4pt !important; height: 7pt !important; width: 100% !important; overflow: hidden !important; }
    .progress-bar-fill { height: 7pt !important; background: linear-gradient(90deg, #3B82F6, #8B5CF6) !important; border-radius: 4pt !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .progress-bar-fill[data-progress="95%"] { width: 95% !important; }
    .progress-bar-fill[data-progress="92%"] { width: 92% !important; }
    .progress-bar-fill[data-progress="90%"] { width: 90% !important; }
    .progress-bar-fill[data-progress="88%"] { width: 88% !important; }
    .progress-bar-fill[data-progress="85%"] { width: 85% !important; }
    .progress-bar-fill[data-progress="80%"] { width: 80% !important; }
    .progress-bar-fill[data-progress="75%"] { width: 75% !important; }
    .skills-category-card h4 { font-size: 9pt !important; color: #111111 !important; font-weight: 700 !important; margin-bottom: 6pt !important; }
    .chip {
        display: inline-block !important;
        background: #f1f5f9 !important;
        color: #334155 !important;
        border: 1pt solid #cbd5e1 !important;
        border-radius: 20pt !important;
        padding: 1.5pt 7pt !important;
        font-size: 7.5pt !important;
        font-weight: 600 !important;
        margin: 1.5pt !important;
    }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       PAGE 3 — CERTIFICATES
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    .certificates-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 9pt !important;
    }
    .cert-img-wrapper { margin-bottom: 6pt !important; }
    .cert-img {
        width: 100% !important;
        height: 90pt !important;
        object-fit: cover !important;
        border-radius: 5pt !important;
        border: 1pt solid #cccccc !important;
        display: block !important;
    }
    .cert-info { padding: 0 !important; }
    .cert-issuer {
        font-size: 7.5pt !important;
        color: #3B82F6 !important;
        font-weight: 700 !important;
        display: block !important;
        margin-bottom: 3pt !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3pt !important;
    }
    .cert-card h3 { font-size: 8.5pt !important; color: #111111 !important; font-weight: 700 !important; margin-bottom: 3pt !important; }
    .cert-date { font-size: 7.5pt !important; color: #777777 !important; }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       PAGE 4 — EXPERIENCE + EDUCATION
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    .timeline { position: relative !important; padding: 0 !important; }
    .timeline::before { display: none !important; }
    .timeline-dot { display: none !important; }
    .timeline-item {
        display: block !important;
        padding-inline-start: 0 !important;
        margin-bottom: 8pt !important;
    }
    .timeline-content { padding: 8pt 10pt !important; }
    .timeline-date { font-size: 7.5pt !important; color: #3B82F6 !important; font-weight: 700 !important; display: block !important; margin-bottom: 2pt !important; text-transform: uppercase !important; letter-spacing: 0.3pt !important; }
    .timeline-content h3 { font-size: 10pt !important; color: #111111 !important; font-weight: 700 !important; margin-bottom: 1pt !important; }
    .timeline-company { font-size: 8.5pt !important; color: #555555 !important; font-weight: 600 !important; margin-bottom: 4pt !important; display: block !important; }
    .timeline-summary { font-size: 8pt !important; color: #444444 !important; }

    /* Divider between experience and education */
    section#education.education.section .section-title {
        margin-top: 4pt !important;
    }

    .education-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10pt !important;
    }
    .card-icon { font-size: 16pt !important; color: #3B82F6 !important; margin-bottom: 5pt !important; }
    .card-duration { font-size: 7.5pt !important; color: #777777 !important; display: block !important; margin-bottom: 3pt !important; }
    .edu-card h3 { font-size: 10pt !important; color: #111111 !important; font-weight: 700 !important; margin-bottom: 2pt !important; }
    .edu-card h4 { font-size: 8.5pt !important; color: #555555 !important; font-weight: 600 !important; margin-bottom: 6pt !important; }
    .card-desc { font-size: 8.5pt !important; color: #444444 !important; }
    .highlight-val { color: #3B82F6 !important; font-weight: 700 !important; }
    .courses-list { margin-top: 6pt !important; }
    .course-item {
        display: flex !important;
        gap: 6pt !important;
        align-items: flex-start !important;
        padding: 4pt 0 !important;
        border-bottom: 1pt solid #eeeeee !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .course-bullet { width: 6pt !important; height: 6pt !important; min-width: 6pt !important; border-radius: 50% !important; background: #3B82F6 !important; margin-top: 3pt !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .course-text h4 { font-size: 8.5pt !important; font-weight: 700 !important; color: #111111 !important; margin-bottom: 1pt !important; }
    .course-text p { font-size: 7.5pt !important; color: #555555 !important; }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       PAGE 5 — PROJECTS
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    .projects-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 9pt !important;
    }
    .project-img-wrapper { margin-bottom: 6pt !important; overflow: hidden !important; }
    .project-img {
        width: 100% !important;
        height: 80pt !important;
        object-fit: cover !important;
        border-radius: 5pt !important;
        border: 1pt solid #cccccc !important;
        display: block !important;
    }
    .project-tags { margin-bottom: 4pt !important; }
    .tag {
        display: inline-block !important;
        background: #eef2ff !important;
        color: #3730a3 !important;
        border: 1pt solid #c7d2fe !important;
        border-radius: 4pt !important;
        padding: 1pt 5pt !important;
        font-size: 6.5pt !important;
        font-weight: 700 !important;
        margin: 1pt !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .project-card h3 { font-size: 9.5pt !important; color: #111111 !important; font-weight: 700 !important; margin-bottom: 4pt !important; }
    .project-card p { font-size: 8pt !important; color: #444444 !important; }

    /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       PAGE 6 — TESTIMONIALS + CONTACT
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    .testimonials-wrapper { overflow: visible !important; }
    .testimonials-track {
        display: flex !important;
        flex-direction: column !important;
        gap: 8pt !important;
        transform: none !important;
        overflow: visible !important;
    }
    .testimonial-card {
        display: block !important;
        min-width: unset !important;
        width: 100% !important;
        padding: 8pt !important;
    }
    .testimonial-card p { font-size: 8.5pt !important; color: #444444 !important; font-style: italic !important; }
    .testimonial-author { font-size: 8pt !important; color: #111111 !important; font-weight: 700 !important; margin-top: 5pt !important; }
    .stars { color: #F59E0B !important; font-size: 9pt !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    .contact-grid { display: block !important; }
    .contact-info { margin-top: 8pt !important; }
    .contact-info-item {
        display: flex !important;
        align-items: center !important;
        gap: 8pt !important;
        padding: 5pt 0 !important;
        border-bottom: 1pt solid #eeeeee !important;
        font-size: 8.5pt !important;
        color: #333333 !important;
    }
    .contact-info-item i { color: #3B82F6 !important; font-size: 10pt !important; width: 14pt !important; text-align: center !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .contact-info-item a { color: #333333 !important; }

    /* ── Print footer on every page ── */
    @page {
        @bottom-center {
            content: "Seif Eldin ELMuselmani — Portfolio Print";
            font-size: 7pt;
            color: #999999;
        }
        @bottom-right {
            content: counter(page) " / " counter(pages);
            font-size: 7pt;
            color: #999999;
        }
    }

    /* ── External links — show URL ── */
    a[href^="http"]::after, a[href^="mailto"]::after {
        content: " (" attr(href) ")";
        font-size: 6.5pt;
        color: #888888;
        word-break: break-all;
    }
    .nav-link::after, .btn::after, .mobile-link::after,
    .logo::after, .social-links a::after, .project-links a::after {
        content: none !important;
    }
}

/* ==========================================================================
   FEATURE: Custom Cursor
   ========================================================================== */
@media (pointer: fine) {
    body { cursor: none !important; }
    a, button, [role="button"], label, input, select, textarea, .cert-img-wrapper {
        cursor: none !important;
    }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, opacity 0.3s ease;
    mix-blend-mode: normal;
    will-change: transform;
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(var(--primary-rgb), 0.45);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.12s ease, width 0.25s ease, height 0.25s ease,
                border-color 0.25s ease, opacity 0.3s ease;
    will-change: transform;
}

/* Cursor hover state — expand ring and fill dot */
.cursor-hover .custom-cursor {
    width: 16px;
    height: 16px;
    background: var(--accent);
}
.cursor-hover .cursor-follower {
    width: 56px;
    height: 56px;
    border-color: rgba(var(--accent-rgb), 0.35);
}

/* Cursor click state */
.cursor-click .custom-cursor {
    width: 8px;
    height: 8px;
    background: #ffffff;
}
.cursor-click .cursor-follower {
    width: 28px;
    height: 28px;
}

/* Hide custom cursor on touch/mobile devices */
@media (pointer: coarse) {
    .custom-cursor, .cursor-follower { display: none !important; }
}

/* Hide during print */
@media print {
    .custom-cursor, .cursor-follower { display: none !important; }
}

/* ==========================================================================
   FEATURE: Scroll-to-Top Button
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    inset-inline-end: 28px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    border: none;
    outline: none;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.55);
    transform: translateY(-4px);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* Pulse ring on the button */
.back-to-top::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: inherit;
    opacity: 0.35;
    animation: btnPulse 2.5s infinite;
}

@keyframes btnPulse {
    0%   { transform: scale(1);    opacity: 0.35; }
    60%  { transform: scale(1.45); opacity: 0;    }
    100% { transform: scale(1.45); opacity: 0;    }
}

/* Hide during print */
@media print {
    .back-to-top { display: none !important; }
}
