/* ============================================
   MOHAMED MUSTAFA — PORTFOLIO CSS v2
   "Deep Analytics Dark Mode" — Corporate Tech
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Cairo:wght@400;600;700;800&display=swap');

/* ── CSS VARIABLES ── */
:root {
    --bg-primary: #0a0a0a;
    /* Deep Black */
    --bg-secondary: #121212;
    /* Rich Dark Grey */
    --bg-card: #181818;
    --bg-elevated: #222222;
    --blue: #91091e;
    /* Deep Burgundy */
    --blue-light: #b0142d;
    /* Lighter Burgundy */
    --blue-subtle: rgba(145, 9, 30, 0.15);
    --blue-glow: rgba(145, 9, 30, 0.4);
    --cyan: #dc2626;
    /* Rose Red */
    --cyan-light: #ef4444;
    --cyan-subtle: rgba(220, 38, 38, 0.15);
    --cyan-glow: rgba(220, 38, 38, 0.4);
    --accent: #7a0618;
    /* Dark Burgundy Accent */
    --accent-subtle: rgba(122, 6, 24, 0.1);
    --green: #91091e;
    --green-subtle: rgba(145, 9, 30, 0.12);
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #a3a3a3;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(145, 9, 30, 0.5);
    --gradient-blue: linear-gradient(135deg, #91091e, #dc2626);
    --gradient-card: linear-gradient(135deg, rgba(145, 9, 30, 0.08), rgba(220, 38, 38, 0.05));
    --font-primary: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --nav-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 60px rgba(145, 9, 30, 0.3);
    --t-fast: 0.2s ease;
    --t-med: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --t-slow: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #fdf2f2;
    /* Subtle Red Tint */
    --bg-card: #ffffff;
    --bg-elevated: #fee2e2;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(145, 9, 30, 0.5);
    --blue-subtle: rgba(145, 9, 30, 0.12);
    --cyan-subtle: rgba(220, 38, 38, 0.12);
}

/* ── RESET ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--blue) #0a0a0a;
}

html::-webkit-scrollbar {
    width: 5px;
}

html::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

html::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 3px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── ARABIC OVERRIDES ── */
[lang="ar"] {
    font-family: 'Cairo', sans-serif !important;
}

[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3,
[lang="ar"] .section-title,
[lang="ar"] .hero-title,
[lang="ar"] .nav-links a {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 800;
}


a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: var(--font-body);
}

/* ── GLOBAL BACKGROUND ── */
.particles-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
}

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    transition: var(--t-med);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 40px rgba(0, 0, 0, 0.5);
}

.nav-inner {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.nav-logo .logo-dot {
    width: 8px;
    height: 8px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    transition: var(--t-fast);
    letter-spacing: 0.1px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--blue-subtle);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--t-fast);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ── SECTION BASE ── */
.section-wrap {
    position: relative;
    z-index: 1;
    padding: 96px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--blue-light);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.75rem;
}

.section-eyebrow::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--blue-light);
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff, var(--blue-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.6rem;
    max-width: 600px;
    line-height: 1.7;
}

/* ── HERO ── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    overflow: hidden;
}

.hero-ambient {
    position: absolute;
    border-radius: 50%;
    filter: blur(160px);
    pointer-events: none;
}

.hero-ambient-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(145, 9, 30, 0.4), transparent 70%);
    top: -150px;
    left: -100px;
    animation: ambientFloat 10s ease-in-out infinite alternate;
}

.hero-ambient-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(180, 20, 45, 0.25), transparent 70%);
    bottom: -100px;
    right: -80px;
    animation: ambientFloat 14s ease-in-out infinite alternate-reverse;
}

@keyframes ambientFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 20px) scale(1.05);
    }
}

.hero-content {
    text-align: center;
    max-width: 820px;
    position: relative;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    background: rgba(145, 9, 30, 0.08);
    border: 1px solid rgba(145, 9, 30, 0.2);
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--blue-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    animation: fadeSlideDown 0.7s ease 0.1s both;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: var(--cyan);
    border-radius: 50%;
    animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(145, 9, 30, 0.4);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 5px rgba(145, 9, 30, 0);
    }
}

.hero-name {
    font-family: var(--font-primary);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    animation: fadeSlideUp 0.7s ease 0.25s both;
}

.hero-title {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    font-weight: 400;
    letter-spacing: -0.2px;
    animation: fadeSlideUp 0.7s ease 0.35s both;
}

.hero-title .highlight {
    color: var(--cyan-light);
    font-weight: 600;
}

.hero-typing-row {
    min-height: 2rem;
    margin-bottom: 2rem;
    animation: fadeSlideUp 0.7s ease 0.45s both;
}

.typing-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--blue-light);
    letter-spacing: 0.5px;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--blue-light);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.85;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    animation: fadeSlideUp 0.7s ease 0.55s both;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeSlideUp 0.7s ease 0.65s both;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    transition: var(--t-med);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.1px;
}

.btn-primary {
    background: var(--gradient-blue);
    color: #fff;
    box-shadow: 0 4px 20px rgba(145, 9, 30, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(145, 9, 30, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(145, 9, 30, 0.35);
    background: var(--blue-subtle);
    transform: translateY(-2px);
}

/* ── HERO SCROLL ── */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    animation: fadeSlideUp 0.7s ease 0.9s both;
}

.scroll-wheel {
    width: 22px;
    height: 34px;
    border: 1.5px solid var(--text-muted);
    border-radius: 11px;
    position: relative;
}

.scroll-wheel::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5px;
    height: 6px;
    background: var(--cyan);
    border-radius: 2px;
    animation: scrollBob 2s ease-in-out infinite;
}

@keyframes scrollBob {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    80% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0;
    }
}

.scroll-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ── ABOUT ── */
.about-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 4rem;
    align-items: start;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
}

.avatar-ring {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.2rem;
    position: relative;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(var(--blue), var(--cyan), var(--blue));
    animation: spinRing 5s linear infinite;
    z-index: 0;
}

@keyframes spinRing {
    to {
        transform: rotate(360deg);
    }
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    position: relative;
    z-index: 1;
}

.about-card-name {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.about-card-role {
    font-size: 0.8rem;
    color: var(--cyan-light);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    margin-bottom: 1.2rem;
}

.about-card-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-card-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--t-fast);
    cursor: pointer;
}

.about-card-link:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--blue-subtle);
}

.about-card-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.about-text-area h3 {
    font-family: var(--font-primary);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}

.about-text-area p {
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 0.93rem;
    margin-bottom: 1.2rem;
}

.about-text-area p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.kpi-box {
    text-align: center;
    padding: 1.2rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--t-med);
}

.kpi-box:hover {
    border-color: var(--border-hover);
    background: var(--blue-subtle);
}

.kpi-val {
    font-family: var(--font-primary);
    font-size: 1.7rem;
    font-weight: 800;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.kpi-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    letter-spacing: 0.5px;
}

/* ── EXPERIENCE / TIMELINE ── */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 28px;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--blue), var(--cyan), transparent);
    opacity: 0.4;
}

.tl-item {
    display: flex;
    gap: 1.5rem;
    padding: 0 0 2.5rem 0;
    position: relative;
}

.tl-marker {
    flex-shrink: 0;
    margin-top: 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.tl-dot {
    width: 14px;
    height: 14px;
    background: var(--bg-primary);
    border: 2.5px solid var(--blue);
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--t-med);
    position: relative;
    z-index: 1;
}

.tl-item:hover .tl-dot {
    background: var(--blue);
    box-shadow: 0 0 16px var(--blue-glow);
    transform: scale(1.25);
}

.tl-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    transition: var(--t-med);
    animation: cardFloat 5s ease-in-out infinite;
}

.tl-item:hover .tl-card {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px rgba(145, 9, 30, 0.3);
    transform: translateX(8px) scale(1.02);
}

.tl-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cyan);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.tl-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.tl-org {
    font-size: 0.82rem;
    color: var(--blue-light);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.tl-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.tl-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.22rem 0.65rem;
    background: var(--blue-subtle);
    border: 1px solid rgba(145, 9, 30, 0.15);
    border-radius: 4px;
    color: var(--blue-light);
}

/* ── PROJECTS ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.proj-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--t-med);
    position: relative;
    overflow: hidden;
    cursor: default;
    display: flex;
    flex-direction: column;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.proj-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: var(--t-med);
}

.proj-card:hover::before {
    opacity: 1;
}

.proj-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(145, 9, 30, 0.25);
}

.proj-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.proj-icon {
    width: 46px;
    height: 46px;
    background: var(--blue-subtle);
    border: 1px solid rgba(145, 9, 30, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: var(--t-med);
}

.proj-card:hover .proj-icon {
    background: rgba(145, 9, 30, 0.15);
    box-shadow: 0 0 20px var(--blue-subtle);
    transform: scale(1.08);
}

.proj-num {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.proj-title {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.proj-desc {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.2rem;
    flex: 1;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.proj-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.25rem 0.65rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    transition: var(--t-fast);
}

.proj-card:hover .proj-tag {
    border-color: rgba(145, 9, 30, 0.2);
    color: var(--blue-light);
    background: var(--blue-subtle);
}

/* ── SKILLS ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.skill-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--t-med);
}

.skill-group:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.skill-group-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.skill-group-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sg-eng .skill-group-icon {
    background: var(--blue-subtle);
}

.sg-analytics .skill-group-icon {
    background: var(--cyan-subtle);
}

.sg-dev .skill-group-icon {
    background: var(--green-subtle);
}

.skill-group-name {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.skill-group-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.skill-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.skill-pct {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.skill-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sg-eng .skill-fill {
    background: var(--gradient-blue);
}

.sg-analytics .skill-fill {
    background: linear-gradient(90deg, var(--cyan), var(--cyan-light));
}

.sg-dev .skill-fill {
    background: var(--gradient-blue);
}

/* ── TECH CHIPS ── */
.tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    transition: var(--t-fast);
}

.chip:hover {
    border-color: var(--border-hover);
    color: var(--blue-light);
    background: var(--blue-subtle);
}

/* ── CERTIFICATES ── */
.certs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cert-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--t-med);
    cursor: pointer;
    position: relative;
}

.cert-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(145, 9, 30, 0.12);
}

.cert-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #fff;
}

.cert-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-item:hover .cert-img-wrap img {
    transform: scale(1.04);
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 15, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--t-med);
}

.cert-item:hover .cert-overlay {
    opacity: 1;
}

.cert-overlay-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cert-info {
    padding: 1.1rem 1.2rem;
}

.cert-name {
    font-family: var(--font-primary);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cert-issuer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cert-issuer {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cyan);
    letter-spacing: 0.5px;
}

.cert-badge-tag {
    font-size: 0.65rem;
    padding: 0.18rem 0.5rem;
    background: var(--blue-subtle);
    border: 1px solid rgba(145, 9, 30, 0.2);
    border-radius: 4px;
    color: var(--blue-light);
    font-family: var(--font-mono);
}

/* ── CERT LIGHTBOX ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: var(--t-med);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    animation: lbScale 0.3s ease;
}

@keyframes lbScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-secondary);
    transition: var(--t-fast);
}

.lightbox-close:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ── CONTACT ── */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    align-items: start;
}

.contact-aside h3 {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

.contact-aside p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.8rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clink {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--t-med);
    cursor: pointer;
}

.clink:hover {
    border-color: var(--border-hover);
    background: var(--blue-subtle);
    transform: translateX(5px);
}

.clink-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--t-med);
    flex-shrink: 0;
}

.clink:hover .clink-icon {
    background: var(--blue-subtle);
    box-shadow: 0 0 16px var(--blue-glow);
}

.clink-icon svg {
    width: 17px;
    height: 17px;
    color: var(--blue-light);
}

.clink-body {
    flex: 1;
}

.clink-label {
    font-size: 0.86rem;
    color: var(--text-primary);
    font-weight: 600;
}

.clink-val {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.clink-arrow {
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-form-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.2rem;
    box-shadow: 0 0 40px rgba(145, 9, 30, 0.05);
    animation: cardFloat 7s ease-in-out infinite;
}

.cf-title {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.cf-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.cf-field {
    position: relative;
}

.cf-field label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cf-field input,
.cf-field textarea,
.cf-field select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    outline: none;
    transition: var(--t-fast);
    appearance: none;
}

.cf-field input:focus,
.cf-field textarea:focus,
.cf-field select:focus {
    border-color: rgba(145, 9, 30, 0.5);
    box-shadow: 0 0 0 3px rgba(145, 9, 30, 0.08);
}

.cf-field textarea {
    min-height: 120px;
    resize: vertical;
}

.cf-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    width: 100%;
    background: var(--gradient-blue);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--t-med);
    box-shadow: 0 4px 20px rgba(145, 9, 30, 0.35);
}

.cf-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(145, 9, 30, 0.6);
}

.cf-msg {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-top: 0.4rem;
    min-height: 1.2rem;
    transition: var(--t-fast);
}

.cf-msg.success {
    color: var(--green);
}

.cf-msg.error {
    color: #f87171;
}

/* ── FLOATING ACTIONS ── */
.floating-actions {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
}


.float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(22, 22, 26, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--t-med);
    position: relative;
    cursor: pointer;
    padding: 0;
}

.float-btn span {
    position: absolute;
    right: 65px;
    background: var(--blue);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: var(--t-fast);
}


.float-btn:hover span {
    opacity: 1;
    transform: translateX(0);
}


.float-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--blue);
    color: #fff;
}

.float-btn svg {
    width: 20px;
    height: 20px;
}


/* ── FOOTER ── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--t-fast);
}

.footer-links a:hover {
    color: var(--blue-light);
    border-color: var(--border-hover);
    background: var(--blue-subtle);
}

.footer-links a svg {
    width: 16px;
    height: 16px;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.footer-copy span {
    color: var(--blue-light);
}

/* ── SCROLL REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-l {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-l.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-r {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-r.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── KEYFRAMES ── */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        transition: right 0.4s ease;
        border-left: 1px solid var(--border);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.7rem 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cf-row {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .certs-gallery {
        grid-template-columns: 1fr;
    }

    .about-kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .float-actions {
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .section-wrap {
        padding: 60px 1rem;
    }

    .hero-name {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .about-kpis {
        gap: 0.6rem;
    }

    .kpi-val {
        font-size: 1.3rem;
    }

    .float-btn span {
        display: none;
    }

    .float-btn {
        padding: 0.65rem;
    }
}

/* ── CUSTOM CURSOR & THEME TOGGLE ── */
.theme-toggle:hover,
.lang-toggle:hover {
    background: var(--blue-subtle) !important;
}

.lang-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    padding: 0.4rem;
    border-radius: 50%;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--t-fast);
}

/* ── MOUSE GLOW ── */
.mouse-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(145, 9, 30, 0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

[data-theme="light"] .mouse-glow {
    background: radial-gradient(circle, rgba(145, 9, 30, 0.05), transparent 70%);
}


/* ── READING PROGRESS ── */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-blue);
    z-index: 9999;
    pointer-events: none;
    transition: width 0.1s;
}



/* ── TECH MARQUEE ── */
.marquee-section {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 2rem;
    padding: 3rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: skewY(-2deg);
    margin: 4rem 0;
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    min-width: 100%;
    animation: scroll-left 25s linear infinite;
}

.marquee-content span {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-muted);
}

.marquee-content span.dot {
    color: var(--blue);
    -webkit-text-stroke: 0;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100% - 2rem));
    }
}

[dir="rtl"] .marquee-content {
    animation: scroll-right 25s linear infinite;
}

@keyframes scroll-right {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(100% + 2rem));
    }
}

/* ── SPOTLIGHT CARDS ── */
.proj-card::after,
.skill-group::after,
.cert-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(145, 9, 30, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.proj-card:hover::after,
.skill-group:hover::after,
.cert-item:hover::after {
    opacity: 1;
}

/* Fix inner elements staying above the spotlight glow */
.proj-card>*,
.skill-group>*,
.cert-item>* {
    position: relative;
    z-index: 1;
}


/* ── DATA FLOW BACKGROUND (EXPERIENCE) ── */
.data-flow-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

.df-node {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 20px var(--blue-glow);
    animation: flowPulse 3s infinite alternate;
}

.df-node.n1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.df-node.n2 {
    top: 40%;
    left: 85%;
    animation-delay: 1s;
}

.df-node.n3 {
    top: 75%;
    left: 15%;
    animation-delay: 2s;
}

.df-node.n4 {
    top: 85%;
    left: 90%;
    animation-delay: 0.5s;
}

.df-line {
    position: absolute;
    background: #91091e;
    height: 1px;
    transform-origin: left center;
    opacity: 0.3;
}

.df-line::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 10px;
    height: 5px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px #fff;
    animation: moveData 4s infinite linear;
}

.df-line.l1 {
    top: 16%;
    left: 11%;
    width: 75%;
    transform: rotate(18deg);
}

.df-line.l1::after {
    animation-delay: 0s;
}

.df-line.l2 {
    top: 41%;
    left: 85%;
    width: 70%;
    transform: rotate(155deg);
}

.df-line.l2::after {
    animation-delay: 1.5s;
}

.df-line.l3 {
    top: 76%;
    left: 16%;
    width: 75%;
    transform: rotate(7deg);
}

.df-line.l3::after {
    animation-delay: 0.5s;
}

@keyframes flowPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.4);
        opacity: 1;
        box-shadow: 0 0 40px var(--blue-glow);
    }
}

@keyframes moveData {
    0% {
        left: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}