/* ==========================================================================
   Salma Elmaghawry Portfolio - Custom Styling CSS
   Brand: ink / sage / mist / cocoa / honey / oat / clay - calm & organised,
   not loud. See /My/design system/design-system.md for the full spec.
   ========================================================================== */

/* --- CSS Variables Configuration --- */
:root {
    /* Fonts - three faces, three jobs (see design-system.md #3) */
    --font-primary: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-arabic: 'Tajawal', 'Nunito', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);

    /* Brand tokens - fixed, do not vary by mode */
    --brand-ink: #223528;
    --brand-sage: #4C7A5B;
    --brand-mist: #B9CFBC;
    --brand-cocoa: #6E4A32;
    --brand-honey: #E3A02B;
    --brand-oat: #F6EFE4;
    --brand-clay: #E8D5B7;
    --brand-paper: #FCF9F3;
}

/* --- MINT THEME COLORS (mint background, deep sage + caramel brown accent) --- */
body {
    --bg-primary: #E3F3EA;          /* mint */
    --bg-secondary: #D2EADD;        /* deeper mint */
    --bg-card: rgba(255, 255, 255, 0.6);

    --accent-mint: #3F6B4E;         /* deep sage, legible on mint (5.2:1) */
    --accent-mint-hover: #4C7A5B;
    --accent-mint-light: rgba(76, 122, 91, 0.14);

    --accent-pink: #8B5A2B;         /* caramel brown - replaces honey as the warm pop (5.3:1) */
    --accent-pink-hover: #A06A36;
    --accent-pink-light: rgba(139, 90, 43, 0.12);

    --accent-lavender: #4E6E5A;     /* muted sage - cool neutral, third tone (4.7:1) */
    --accent-lavender-light: rgba(78, 110, 90, 0.12);

    --accent-honey: #8B5A2B;        /* same caramel brown - the one warm accent, use sparingly */
    --alert: #B5523E;

    --text-primary: #223528;        /* ink */
    --text-secondary: #3E5747;
    --text-muted: rgba(34, 53, 40, 0.62);

    --border-color: rgba(34, 53, 40, 0.12);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(34, 53, 40, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

button {
    font-family: var(--font-primary);
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    transition: all var(--transition-fast);
}

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

/* --- AMBIENT FLOATING BACKGROUND BLOBS --- */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: var(--border-radius-full);
    filter: blur(120px);
    opacity: 0.18;
    mix-blend-mode: multiply;
    animation: floatBlob 20s infinite alternate ease-in-out;
    transition: background-color var(--transition-normal);
}

.blob-mint {
    width: 500px;
    height: 500px;
    background-color: var(--accent-mint);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.blob-pink {
    width: 600px;
    height: 600px;
    background-color: var(--accent-pink);
    bottom: -15%;
    left: -10%;
    animation-delay: 4s;
}

.blob-lavender {
    width: 450px;
    height: 450px;
    /* clay, not ink - a dark blurred smudge would fight the "calm, not loud" rule */
    background-color: var(--brand-clay);
    top: 40%;
    left: 45%;
    animation-delay: 8s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.15);
    }
    66% {
        transform: translate(-40px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* --- PREMIUM STICKY NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(227, 243, 234, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--glass-border);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
    color: var(--text-primary);
}

.logo-mark {
    flex-shrink: 0;
    border-radius: 29%;
}

.logo-dot {
    color: var(--accent-pink);
    display: inline-block;
    transition: color var(--transition-normal);
}

.logo:hover .logo-dot {
    color: var(--accent-mint);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: var(--accent-mint);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-mint), var(--accent-pink));
    transition: width var(--transition-normal);
    border-radius: var(--border-radius-full);
}

.nav-link.active {
    color: var(--text-primary);
}

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

.nav-btn-mobile {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- LANGUAGE TOGGLE (EN / AR) --- */
.lang-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-md);
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

.lang-toggle:hover {
    background-color: var(--bg-primary);
    transform: scale(1.05);
    color: var(--accent-pink);
}

.btn-talk {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-pink));
    color: #FFF !important;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(76, 122, 91, 0.2);
}

.btn-talk:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 74, 50, 0.3);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    z-index: 101;
}

.burger .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: var(--border-radius-full);
    transition: all var(--transition-normal);
}

/* --- HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 60px;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-container > *,
.about-grid > *,
.contact-grid > *,
.skills-grid > *,
.projects-grid > * {
    min-width: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    color: var(--accent-mint);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    align-self: flex-start;
    margin-bottom: 24px;
    direction: ltr;
}

.hero-tag::before {
    content: '//';
    margin-right: 0.5em;
    color: var(--accent-pink);
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.15rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.highlight-mint {
    color: var(--accent-mint);
}

.highlight-pink {
    color: var(--accent-pink);
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1.15rem, 2.6vw, 1.8rem);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 2.4em;
}

.typing-text {
    border-right: 2px solid var(--accent-mint);
    padding-right: 4px;
    animation: typingBlink 0.8s infinite alternate;
}

@keyframes typingBlink {
    from { border-color: var(--accent-mint); }
    to { border-color: transparent; }
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 580px;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-pink));
    color: #FFF;
    box-shadow: 0 6px 20px rgba(76, 122, 91, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(110, 74, 50, 0.35);
}

.btn-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--bg-primary);
    transform: translateY(-3px);
    border-color: var(--accent-mint);
    color: var(--accent-mint);
}

.hero-socials {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.socials-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.socials-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.social-icon:hover {
    color: var(--accent-pink);
    transform: translateY(-3px) scale(1.05);
    border-color: var(--accent-pink);
    box-shadow: 0 4px 12px rgba(110, 74, 50, 0.15);
}

/* --- HERO VISUAL (AVATAR & GLOW) --- */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-frame-container {
    position: relative;
    width: min(380px, 86vw);
    height: min(380px, 86vw);
    max-width: 100%;
}

.glow-ring {
    position: absolute;
    inset: -10px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-pink));
    opacity: 0.15;
    filter: blur(16px);
    z-index: 1;
    animation: rotateGlow 8s linear infinite;
}

.glow-ring-pink {
    inset: -5px;
    background: linear-gradient(-45deg, var(--accent-pink), var(--accent-lavender));
    animation-direction: reverse;
    animation-duration: 12s;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.03); }
    100% { transform: rotate(360deg) scale(1); }
}

.avatar-frame {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
    background: #FFF;
    border: 6px solid #FFF;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    position: relative;
}

.fallback-icon {
    font-size: 8rem;
    animation: floatEmoji 4s infinite alternate ease-in-out;
}

@keyframes floatEmoji {
    from { transform: translateY(-10px); }
    to { transform: translateY(10px); }
}

.floating-stat {
    position: absolute;
    display: flex;
    flex-direction: column;
    padding: 8px 14px;
    border-radius: var(--border-radius-md);
    background: #FFF;
    box-shadow: var(--glass-shadow);
    white-space: nowrap;
    animation: floatBadge 6s infinite ease-in-out;
    z-index: 3;
}

.floating-stat-number {
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--accent-honey);
}

.floating-stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--brand-sage);
}

.linkedin-stat {
    top: 6%;
    left: -14%;
    animation-delay: 0s;
}

.youtube-stat {
    top: 24%;
    right: -14%;
    animation-delay: 1.5s;
}

.students-stat {
    bottom: 22%;
    left: -12%;
    animation-delay: 3s;
}

.workshops-stat {
    bottom: 4%;
    right: -10%;
    animation-delay: 4.5s;
}

@keyframes floatBadge {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

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

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: var(--border-radius-full);
    display: block;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--accent-mint);
    border-radius: var(--border-radius-full);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 18px; }
}

/* --- SECTION TAGS & TYPOGRAPHY --- */
.section-padding {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.08em;
    color: var(--accent-mint);
    margin-bottom: 12px;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    direction: ltr;
}

.section-tag::before {
    content: '//';
    margin-right: 0.5em;
    color: var(--accent-pink);
    font-weight: 700;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.section-header.center .section-desc {
    margin: 0 auto;
}

/* --- ABOUT SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.about-title {
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-paragraph {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.education-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    margin-top: 32px;
}

.edu-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    background-color: var(--accent-mint-light);
    color: var(--accent-mint);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edu-details {
    display: flex;
    flex-direction: column;
}

.edu-time {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-honey);
    margin-bottom: 4px;
}

.edu-degree {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.edu-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.about-stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat-card {
    padding: 30px 24px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-pink);
    box-shadow: 0 12px 35px rgba(110, 74, 50, 0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.stat-icon.pink-bg { background-color: var(--accent-pink-light); color: var(--accent-pink); }
.stat-icon.mint-bg { background-color: var(--accent-mint-light); color: var(--accent-mint); }
.stat-icon.lavender-bg { background-color: var(--accent-lavender-light); color: var(--accent-lavender); }

.stat-number {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent-honey);
    margin-bottom: 4px;
}

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

/* --- SKILLS SECTION --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.skill-category-card {
    padding: 28px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

.skill-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.category-header i {
    width: 24px;
    height: 24px;
}

.category-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
}

.pink-accent { color: var(--accent-pink); }
.mint-accent { color: var(--accent-mint); }
.lavender-accent { color: var(--accent-lavender); }

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.skill-badge {
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    flex-shrink: 0;
    white-space: nowrap;
}

.skill-badge.pink {
    background-color: var(--accent-pink-light);
    color: var(--accent-pink-hover);
}

.skill-badge.mint {
    background-color: var(--accent-mint-light);
    color: var(--accent-mint-hover);
}

.skill-badge.lavender {
    background-color: var(--accent-lavender-light);
    color: var(--accent-lavender);
}

/* --- EXPERIENCE TIMELINE SECTION --- */
.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 40px;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-mint), var(--accent-pink));
    border-radius: var(--border-radius-full);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 29px;
    top: 6px;
    width: 25px;
    height: 25px;
    border-radius: var(--border-radius-full);
    border: 4px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
    z-index: 5;
}

.dot-mint { background-color: var(--accent-mint); }
.dot-pink { background-color: var(--accent-pink); }

.timeline-card {
    padding: 32px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

.timeline-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.work-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.work-type {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-pink);
}

.role-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.company-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.role-desc {
    font-size: 1.02rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.role-bullets {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.role-bullets li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    list-style-type: square;
}

/* --- PROJECTS SECTION --- */
.projects-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
}

.filter-btn:hover {
    color: var(--accent-mint);
    border-color: var(--accent-mint);
}

.filter-btn.active {
    background-color: var(--accent-mint);
    color: #FFF;
    border-color: var(--accent-mint);
    box-shadow: 0 4px 15px rgba(76, 122, 91, 0.2);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Keep project order left-to-right (first project on the left) in Arabic too */
[dir="rtl"] .projects-grid {
    direction: ltr;
}

[dir="rtl"] .project-card {
    direction: rtl;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-pink);
    box-shadow: 0 20px 40px rgba(110, 74, 50, 0.12);
}

.project-image-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mint-gradient { background: linear-gradient(135deg, #4C7A5B, #6FA382); }
.pink-gradient { background: linear-gradient(135deg, #6E4A32, #8A6248); }
.lavender-gradient { background: linear-gradient(135deg, #223528, #4C7A5B); }
.cyan-gradient { background: linear-gradient(135deg, #4C7A5B, #B9CFBC); }

.project-icon {
    font-size: 3rem;
    color: #FFF;
}

.project-icon i {
    width: 48px;
    height: 48px;
}

.proj-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--brand-ink);
}

.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

/* "Live on Google Play" status pill above a published app's title */
.project-status {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    background-color: var(--accent-mint-light);
    color: var(--accent-mint);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.project-tags .tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    padding: 4px 10px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.proj-link {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-honey);
}

.proj-link:hover {
    color: var(--text-primary);
}

/* --- YOUTUBE EDUCATIONAL SECTION --- */
.youtube-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 48px;
    align-items: center;
}

.youtube-intro-card {
    padding: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

.yt-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.yt-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.yt-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.yt-stat-item {
    display: flex;
    flex-direction: column;
}

.yt-number {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-pink);
}

.yt-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.btn-yt {
    background-color: #FF0000;
    color: #FFF !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
}

.btn-yt:hover {
    background-color: #CC0000;
    transform: translateY(-2px);
}

.video-preview-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.video-card {
    display: flex;
    gap: 24px;
    padding: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    align-items: center;
    transition: all var(--transition-normal);
}

.video-card:hover {
    transform: translateX(5px);
    border-color: var(--accent-mint);
}

.video-thumbnail-placeholder {
    width: 180px;
    height: 110px;
    border-radius: var(--border-radius-md);
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
}

.play-overlay {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-full);
    background-color: rgba(255, 255, 255, 0.9);
    color: #FF0000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.video-card:hover .play-overlay {
    transform: scale(1.1);
}

.play-overlay i {
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

.video-info {
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Arabic content (shorts titles, modal title) uses the brand's Arabic face */
.video-title,
.video-modal-title,
[dir="auto"] {
    font-family: var(--font-arabic);
}

.video-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    padding: 36px 30px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-mint);
    box-shadow: 0 16px 40px rgba(76, 122, 91, 0.1);
}

.service-icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-icon-box i {
    width: 26px;
    height: 26px;
}

.service-icon-box.pink-bg { background-color: var(--accent-pink-light); color: var(--accent-pink); }
.service-icon-box.mint-bg { background-color: var(--accent-mint-light); color: var(--accent-mint); }
.service-icon-box.lavender-bg { background-color: var(--accent-lavender-light); color: var(--accent-lavender); }

.service-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- VOLUNTEERING & CERTIFICATIONS SECTION --- */
.impact-tabs-container {
    max-width: 900px;
    margin: 0 auto;
}

.tabs-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.tab-btn.active {
    background-color: var(--accent-pink);
    color: #FFF;
    border-color: var(--accent-pink);
    box-shadow: 0 4px 15px rgba(110, 74, 50, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInTab var(--transition-normal);
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.volunteering-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.volunteer-card {
    padding: 30px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
}

.volunteer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.volunteer-org {
    display: flex;
    gap: 16px;
    align-items: center;
}

.org-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.org-icon.mint-bg { background-color: var(--accent-mint-light); color: var(--accent-mint); }
.org-icon.pink-bg { background-color: var(--accent-pink-light); color: var(--accent-pink); }

.volunteer-org h4 {
    font-size: 1.1rem;
    font-weight: 800;
}

.volunteer-org .company {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.volunteer-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.volunteer-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.volunteer-achievement {
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
}

.volunteer-achievement i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.volunteer-achievement span {
    font-size: 0.9rem;
    font-weight: 600;
}

.cert-thumbnail {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-mint);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    align-self: flex-start;
}

.cert-thumbnail:hover {
    color: var(--accent-pink);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cert-item-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

.cert-icon-box {
    width: 44px;
    height: 44px;
    background-color: var(--accent-mint-light);
    color: var(--accent-mint);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cert-info h4 {
    font-size: 1.05rem;
    font-weight: 800;
}

.cert-issuer {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cert-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: start;
}

.contact-sub-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-method-card {
    display: flex;
    gap: 20px;
    align-items: center;
}

.method-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-icon.pink-bg { background-color: var(--accent-pink-light); color: var(--accent-pink); }
.method-icon.mint-bg { background-color: var(--accent-mint-light); color: var(--accent-mint); }
.method-icon.lavender-bg { background-color: var(--accent-lavender-light); color: var(--accent-lavender); }

.method-details {
    display: flex;
    flex-direction: column;
}

.method-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-honey);
    text-transform: uppercase;
}

.method-link {
    font-size: 1.05rem;
    font-weight: 700;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.method-link:hover {
    color: var(--accent-mint);
}

.contact-form-card {
    padding: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container i {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-container input,
.textarea-container textarea {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border-radius: var(--border-radius-md);
    background-color: var(--bg-primary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
}

.textarea-container textarea {
    padding-left: 16px;
}

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

.input-container input:focus,
.textarea-container textarea:focus {
    outline: none;
    border-color: var(--accent-mint);
    box-shadow: 0 0 0 3px rgba(76, 122, 91, 0.15);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-pink));
    color: #FFF;
    border-radius: var(--border-radius-md);
    padding: 14px 28px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(76, 122, 91, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 74, 50, 0.35);
}

.btn-submit i {
    width: 18px;
    height: 18px;
}

.form-status {
    margin-top: 16px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
}

.form-status.success {
    color: var(--accent-mint);
}

.form-status.error {
    color: var(--alert);
}

/* --- FOOTER --- */
.footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 20px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-slogan {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 320px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    font-weight: 700;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-mint);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    background-color: var(--bg-primary);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.footer-socials a:hover {
    color: var(--accent-pink);
    transform: translateY(-3px);
    border-color: var(--accent-pink);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- CERTIFICATE LIGHTBOX MODAL --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(34, 53, 40, 0.95);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 3rem;
    color: #FFF;
    background: none;
    border: none;
    line-height: 1;
}

.lightbox-image {
    max-width: 90%;
    max-height: 80%;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 20px;
    color: #FFF;
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- ANIMATIONS & SCROLL REVEALS --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay modifiers for stagger triggers */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- RESPONSIVE MEDIA QUERIES --- */

/* Laptop / large tablet — nav links overflow before 1024px */
@media (max-width: 1100px) {
    .nav-menu {
        gap: 20px;
    }

    .btn-talk {
        display: none;
    }

    .burger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100dvh - var(--header-height));
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 48px 24px 32px;
        overflow-y: auto;
        gap: 28px;
        z-index: 99;
        transition: left var(--transition-normal);
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.25rem;
    }

    .nav-btn-mobile {
        display: block;
        padding: 12px 32px;
        background: linear-gradient(135deg, var(--accent-mint), var(--accent-pink));
        color: #FFF;
        font-weight: 700;
        border-radius: var(--border-radius-md);
        font-size: 1.1rem;
    }

    .burger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .burger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .burger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Tablet Screens (1024px and down) */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-tag {
        align-self: center;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
        width: 100%;
    }

    .hero-visual {
        order: -1;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .youtube-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-section .section-header {
        align-items: flex-start;
    }

    .section-padding {
        padding: 80px 0;
    }
}

/* Mobile Screens (768px and down) */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    :root {
        --header-height: 68px;
    }

    .container,
    .nav-container,
    .hero-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-padding {
        padding: 64px 0;
    }

    .section-header {
        margin-bottom: 36px;
    }

    .hero-section {
        padding-top: calc(var(--header-height) + 24px);
        min-height: auto;
        padding-bottom: 80px;
    }

    .avatar-frame-container {
        width: min(280px, 78vw);
        height: min(280px, 78vw);
    }

    .fallback-icon {
        font-size: 6rem;
    }

    .floating-stat {
        padding: 6px 10px;
    }

    .floating-stat-number {
        font-size: 1.05rem;
    }

    .floating-stat-label {
        font-size: 0.62rem;
    }

    .linkedin-stat,
    .students-stat {
        left: -6%;
    }

    .youtube-stat,
    .workshops-stat {
        right: -6%;
    }

    .youtube-stat {
        top: 44%;
    }

    .scroll-indicator {
        display: none;
    }

    .blob-mint,
    .blob-pink,
    .blob-lavender {
        width: 280px;
        height: 280px;
        filter: blur(80px);
    }

    .education-card {
        flex-direction: column;
        gap: 14px;
        padding: 20px;
    }

    .about-stats-container {
        gap: 14px;
    }

    .stat-card {
        padding: 22px 16px;
    }

    .skill-category-card {
        padding: 22px 18px;
    }

    .skill-list li {
        gap: 8px;
        align-items: flex-start;
    }

    .skill-name {
        min-width: 0;
    }

    .timeline-container::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
        margin-bottom: 32px;
    }

    .timeline-dot {
        left: 9px;
    }

    .timeline-card {
        padding: 22px 18px;
    }

    .timeline-card:hover {
        transform: none;
    }

    .volunteering-grid {
        grid-template-columns: 1fr;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-card,
    .youtube-intro-card {
        padding: 22px 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .input-container input,
    .textarea-container textarea {
        font-size: 16px;
    }

    .footer-container {
        flex-direction: column;
        gap: 28px;
        text-align: center;
        align-items: center;
    }

    .footer-slogan {
        margin-left: auto;
        margin-right: auto;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .lightbox {
        padding: 16px;
    }

    .lightbox-close {
        top: 12px;
        right: 16px;
        font-size: 2.2rem;
    }

    .video-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .video-modal-inner {
        max-height: min(92dvh, 92vh);
        max-width: 100%;
    }

    .video-iframe-wrapper {
        padding-top: 0;
        height: min(70dvh, 560px);
    }
}

/* Small phones (480px and down) */
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-stats-container {
        grid-template-columns: 1fr;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .video-card {
        flex-direction: column;
        align-items: stretch;
    }

    .video-thumbnail-placeholder {
        width: 100%;
        height: 160px;
    }

    .yt-stats {
        gap: 16px;
        justify-content: space-between;
    }

    .yt-number {
        font-size: 1.2rem;
    }

    .contact-method-card {
        align-items: flex-start;
        gap: 14px;
    }

    .project-links {
        flex-wrap: wrap;
    }

    .activity-item {
        height: 180px;
    }
}

@media (max-width: 360px) {
    .hero-tag {
        font-size: 0.78rem;
    }

    .logo {
        font-size: 1.05rem;
        gap: 8px;
    }

    .nav-container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ==========================================================================
   REAL ASSETS — Profile Photo, Project Screenshots, Video Integration
   ========================================================================== */


/* --- Profile Photo inside Avatar Frame --- */
.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    border-radius: calc(var(--border-radius-lg) - 6px);
    display: block;
}

/* --- Project Card with Real Screenshot Cover --- */
.project-img-cover {
    position: relative;
    overflow: hidden;
    padding: 0;
    height: auto;
    aspect-ratio: 16 / 10;
    background: var(--bg-card);
}

.project-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-cover-img {
    transform: scale(1.06);
}

/* --- Scrollable screenshot gallery inside a project cover ---
   --per-view sets how many slides show at once; script.js reads it. */
.project-gallery {
    --per-view: 2;
    --gallery-gap: 0px;
}

.gallery-track {
    width: 100%;
    display: flex;
    gap: var(--gallery-gap);
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gallery-gap)) / var(--per-view));
    min-width: 0;
    height: 100%;
    object-fit: cover;
    object-position: center 80%;
    scroll-snap-align: start;
    display: block;
}

/* Raw phone screenshots (no mockup frame): framed as rounded screens on a tinted stage */
.gallery-screens {
    --per-view: 3;
    --gallery-gap: 12px;
    background: var(--accent-mint-light);
}

.gallery-screens .gallery-track {
    padding: 16px 16px 30px;
    scroll-padding: 0 16px;
}

.gallery-screens .gallery-slide {
    object-position: top;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(34, 53, 40, 0.15);
}

@media (max-width: 480px) {
    .gallery-screens {
        --per-view: 2;
        aspect-ratio: 1 / 1;
    }
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 53, 40, 0.6);
    color: #fff;
    backdrop-filter: blur(6px);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gallery-nav svg {
    width: 18px;
    height: 18px;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.project-gallery:hover .gallery-nav,
.gallery-nav:focus-visible {
    opacity: 1;
}

.gallery-nav:disabled {
    opacity: 0 !important;
    pointer-events: none;
}

@media (hover: none) {
    .gallery-nav { display: none; }
}

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 6px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(34, 53, 40, 0.3);
    cursor: pointer;
    transition: background 0.25s ease, width 0.25s ease;
}

.gallery-dot.active {
    width: 20px;
    border-radius: 4px;
    background: var(--accent-mint);
}

/* Badge sits on top of real image */
.project-img-cover .proj-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(34, 53, 40, 0.75);
    color: #fff;
    backdrop-filter: blur(8px);
}

/* --- YouTube Section: 4-Column Grid for Video Cards --- */
.video-preview-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

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

@media (max-width: 480px) {
    .video-preview-cards {
        grid-template-columns: 1fr;
    }
}

/* --- Video Card: Clickable with Real YT Thumbnail --- */
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.video-card:focus {
    outline: 2px solid var(--accent-mint);
    outline-offset: 2px;
}

/* Thumbnail wrapper with real image */
.video-thumbnail-yt {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #0f0f0f;
}

.yt-thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .yt-thumb-img {
    transform: scale(1.05);
}

/* Play button overlay */
.video-thumbnail-yt .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease;
    z-index: 2;
}

.video-card:hover .video-thumbnail-yt .play-overlay {
    background: rgba(0, 0, 0, 0.45);
}

.video-thumbnail-yt .play-overlay i {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-pink);
    padding: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.video-card:hover .video-thumbnail-yt .play-overlay i {
    transform: scale(1.12);
    background: #fff;
}

/* Shorts badge */
.shorts-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 3;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-lavender));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--border-radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Video info below thumbnail */
.video-card .video-info {
    padding: 14px 16px 16px;
    flex: 1;
}

.video-card .video-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card .video-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   VIDEO LIGHTBOX MODAL (YouTube Shorts player)
   ========================================================================== */

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.3s ease;
}

.video-modal.active {
    display: flex;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

.video-modal-inner {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #0f0f0f;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Modal close button */
.video-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.video-modal-close:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

/* Modal title bar */
.video-modal-title {
    padding: 14px 48px 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-primary);
    letter-spacing: 0.01em;
}

/* Portrait iframe (Shorts 9:16 ratio) */
.video-iframe-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* 9:16 aspect ratio for Shorts */
}

.video-iframe-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* "Watch on YouTube" link button */
.video-modal-yt-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: #FF0000;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    text-decoration: none;
    transition: background 0.2s ease;
}

.video-modal-yt-link:hover {
    background: #cc0000;
}

.video-modal-yt-link i {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   BRAND ICONS (inline SVG injected via data-brand)
   Lucide dropped brand logos, so these render our own. They inherit
   currentColor and are sized to match each context.
   ========================================================================== */
.brand-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.brand-svg svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

/* Context-specific sizing */
.method-icon .brand-svg svg { width: 22px; height: 22px; }
.proj-link .brand-svg svg { width: 16px; height: 16px; }
.project-status .brand-svg svg { width: 13px; height: 13px; }
.btn .brand-svg svg { width: 18px; height: 18px; }
.footer-socials .brand-svg svg { width: 18px; height: 18px; }
.video-modal-yt-link .brand-svg svg { width: 20px; height: 20px; }

/* ==========================================================================
   EDUCATIONAL CONTENT — Banner + Auto-playing Shorts Row
   ========================================================================== */
.yt-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.yt-banner-text {
    flex: 1;
    min-width: 280px;
}

.yt-banner .yt-stats {
    margin-bottom: 0;
}

.yt-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.yt-banner .btn-yt {
    justify-content: center;
}

.btn-fb {
    background-color: #1877F2;
}

.btn-fb:hover {
    background-color: #0F63D6;
}

/* Row of vertical Shorts players */
.shorts-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: start;
}

.short-player {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.short-player:hover {
    transform: translateY(-8px);
    border-color: var(--accent-mint);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

/* 9:16 vertical frame that holds the thumbnail then the live iframe */
.short-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background-color: #0f0f0f;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.short-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 2;
    animation: shortFadeIn 0.6s ease forwards;
}

@keyframes shortFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Soft pulsing overlay while the thumbnail waits to become a live player */
.short-frame:not(.is-playing)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.05), rgba(0,0,0,0.45));
    z-index: 1;
}

/* Local-file fallback: thumbnail with a play button that opens YouTube */
.short-frame.is-link {
    cursor: pointer;
}

.short-frame.is-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 30px no-repeat;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 2;
    transition: transform 0.25s ease;
}

.short-frame.is-link:hover::before {
    transform: translate(-50%, -50%) scale(1.1);
}

.short-caption {
    padding: 14px 16px 18px;
    position: relative;
}

.short-caption .shorts-badge {
    position: static;
    display: inline-block;
    margin-bottom: 8px;
}

.short-caption .video-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Staggered entrance for the row */
.shorts-row .short-player:nth-child(1) { transition-delay: 0s; }
.shorts-row .short-player:nth-child(2) { transition-delay: 0.12s; }
.shorts-row .short-player:nth-child(3) { transition-delay: 0.24s; }
.shorts-row .short-player:nth-child(4) { transition-delay: 0.36s; }

/* Responsive: 2-up on tablet, horizontal swipe row on phones */
@media (max-width: 992px) {
    .shorts-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .shorts-row {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        margin-inline: -16px;
        padding-inline: 16px;
    }
    .short-player {
        flex: 0 0 min(240px, 72%);
        scroll-snap-align: center;
    }
    .yt-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .yt-actions,
    .yt-banner .btn-yt {
        width: 100%;
    }
}

/* ==========================================================================
   IMPACT SECTION — Stacked blocks (tabs removed) + Activities Marquee
   ========================================================================== */
.impact-subheading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 8px 0 24px;
}

.impact-subheading svg {
    width: 22px;
    height: 22px;
    color: var(--accent-pink);
}

.impact-subheading.center {
    justify-content: center;
}

/* Space between the two stacked blocks now that tabs are gone */
#tab-certifications {
    margin-top: 56px;
}

/* --- Activities & Moments Marquee --- */
.activities-block {
    margin-top: 72px;
    text-align: center;
}

.activities-caption {
    color: var(--text-secondary);
    margin: -12px 0 32px;
    font-size: 0.98rem;
}

.activities-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 16px;
    padding: 8px 0;
    /* Fade the edges so photos glide in/out softly */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.activities-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: activitiesScroll 68s linear infinite;
    will-change: transform;
}

/* Pause on hover so people can look */
.activities-marquee:hover .activities-track {
    animation-play-state: paused;
}

@keyframes activitiesScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.activity-item {
    flex: 0 0 auto;
    height: 300px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    background: var(--bg-card);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.activity-item img {
    height: 100%;
    width: auto;
    max-width: none;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.activity-item:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--accent-pink);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.28);
    z-index: 2;
}

.activity-item:hover img {
    transform: scale(1.08);
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
    .activities-track {
        animation: none;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .activity-item {
        height: 220px;
    }
    .activities-track {
        gap: 14px;
    }
    .impact-subheading {
        font-size: 1.15rem;
    }
}

/* ==========================================================================
   RTL LAYOUT SUPPORT (Arabic)
   Most flex/grid layouts mirror automatically once [dir="rtl"] is set on
   <html> (row/grid tracks are direction-aware per the CSS spec). The rules
   below only cover the handful of components that use *physical*
   left/right/padding values, which do not flip on their own, plus the
   Arabic typeface swap for text set in the mono/primary font stacks.
   ========================================================================== */

/* Arabic typeface (Nunito/JetBrains Mono don't carry Arabic glyphs) */
[dir="rtl"] body {
    font-family: var(--font-arabic);
}

[dir="rtl"] button,
[dir="rtl"] .hero-tag,
[dir="rtl"] .floating-stat-label,
[dir="rtl"] .skill-badge[data-i18n],
[dir="rtl"] .project-status,
[dir="rtl"] .section-tag,
[dir="rtl"] .card-meta,
[dir="rtl"] .input-container input,
[dir="rtl"] .textarea-container textarea {
    font-family: var(--font-arabic);
}

/* Experience timeline: rail + dot move to the right, card padding flips */
[dir="rtl"] .timeline-container::before {
    left: auto;
    right: 40px;
}

[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 80px;
}

[dir="rtl"] .timeline-dot {
    left: auto;
    right: 29px;
}

[dir="rtl"] .role-bullets {
    padding-left: 0;
    padding-right: 20px;
}

@media (max-width: 1100px) {
    [dir="rtl"] .timeline-container::before {
        left: auto;
        right: 20px;
    }

    [dir="rtl"] .timeline-item {
        padding-left: 0;
        padding-right: 50px;
    }

    [dir="rtl"] .timeline-dot {
        left: auto;
        right: 9px;
    }
}

/* Contact form: leading icon + input padding move to the right */
[dir="rtl"] .input-container i {
    left: auto;
    right: 16px;
}

[dir="rtl"] .input-container input,
[dir="rtl"] .textarea-container textarea {
    padding: 12px 48px 12px 16px;
}

[dir="rtl"] .textarea-container textarea {
    padding-right: 16px;
}

/* Keep "10K+" reading left-to-right inside the Arabic layout */
[dir="rtl"] .floating-stat-number {
    direction: ltr;
    text-align: right;
}

/* Directional icons: point the other way in RTL */
[dir="rtl"] .btn-primary svg {
    transform: scaleX(-1);
}

[dir="rtl"] #btn-send-icon {
    transform: scaleX(-1);
}

/* Mobile nav overlay slides in from the right instead of the left */
@media (max-width: 1100px) {
    [dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
    }

    [dir="rtl"] .nav-menu.active {
        left: auto;
        right: 0;
    }
}
