/* =========================================================================
   CSS Variables & Theme Definitions
   ========================================================================= */
:root {
    /* Fonts */
    --font-heading: 'Times New Roman', Times, serif;
    --font-body: 'Times New Roman', Times, serif;

    /* Animation settings */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark Mode (Default) */
body.dark-mode {
    --bg-color: #080808;
    --card-bg: #121212;
    --card-border: rgba(255, 0, 0, 0.2);
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --accent-emerald: #ff0000;
    --accent-cobalt: #ff0000;
    --accent-red: #ff0000;
    --glow-spread-emerald: rgba(255, 0, 0, 0.3);
    --glow-spread-cobalt: rgba(255, 0, 0, 0.3);
    --glow-spread-red: rgba(255, 0, 0, 0.4);
    --nav-bg: rgba(8, 8, 8, 0.9);
}

/* Light Mode */
body.light-mode {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 102, 255, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-emerald: #059669;
    --accent-cobalt: #0066ff;
    --accent-red: #e60000;
    --glow-spread-emerald: rgba(5, 150, 105, 0.15);
    --glow-spread-cobalt: rgba(0, 102, 255, 0.15);
    --glow-spread-red: rgba(230, 0, 0, 0.15);
    --nav-bg: rgba(241, 245, 249, 0.85);
}

/* RTL Fonts */
body.rtl {
    --font-heading: 'Sakkal Majalla', 'Traditional Arabic', serif;
    --font-body: 'Sakkal Majalla', 'Traditional Arabic', serif;
}

/* =========================================================================
   Reset & Global Utilities
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Offset for fixed nav */
    overflow-x: hidden;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-green {
    color: var(--accent-green);
}

.text-blue {
    color: var(--accent-blue);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-red), var(--accent-emerald), transparent);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
    border-radius: 2px;
}

@keyframes gradientMove {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

section {
    padding: 6rem 0;
}

/* =========================================================================
   Glassmorphism & Glow Effects
   ========================================================================= */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 0;
    /* Sharp edges */
    padding: 2rem;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease, border-color 0.5s ease;
    animation: floatCard 6s ease-in-out infinite;
}

.glass-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px var(--glow-spread-red);
    border-color: var(--accent-red);
    animation-play-state: paused;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.glowing-border {
    position: relative;
}

.glowing-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(45deg, var(--accent-green), var(--accent-blue), var(--accent-green));
    z-index: -1;
    filter: blur(10px);
    opacity: 0.5;
    transition: var(--transition-slow);
}

.glowing-border:hover::before {
    opacity: 0.8;
    filter: blur(15px);
}

/* =========================================================================
   Mouse & Particle Background
   ========================================================================= */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

.mouse-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.08) 0%, rgba(217, 4, 41, 0.02) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    /* Centered on JS coords */
    transition: opacity 0.3s;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 0;
    /* geometric sharp */
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background: transparent;
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    box-shadow: 0 4px 15px var(--glow-spread-red);
}

.btn-primary:hover {
    background: rgba(255, 51, 51, 0.1);
    color: var(--accent-red);
    box-shadow: 0 0 20px var(--glow-spread-red);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 0 20px var(--glow-spread-red);
}

/* =========================================================================
   Navigation
   ========================================================================= */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition-fast);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    color: #ffffff;
}

.logo i {
    font-weight: inherit;
    margin-inline-end: 8px;
}

.logo span {
    color: var(--accent-red);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--accent-red);
    transition: var(--transition-fast);
}

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

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

#theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

body.dark-mode .dark-icon {
    display: none;
}

body.light-mode .light-icon {
    display: none;
}

/* =========================================================================
   Hero Section
   ========================================================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-red);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.name-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #ffffff;
    background: linear-gradient(90deg, #fff, #ff0000, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

.role-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(to right, #ff0000, #ff5e00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero-summary {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* Floating Abstract Visual Dashboard */
.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-orb {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}

.red-orb {
    background: var(--glow-spread-red);
    top: 10%;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.cobalt-orb {
    background: var(--glow-spread-cobalt);
    bottom: 10%;
    left: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

/* Hide orbs on mobile to keep it calm */
@media (max-width: 768px) {
    .glow-orb {
        display: none;
    }
}

.advanced-hero-profile {
    position: relative;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.advanced-hero-profile::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-green), var(--accent-blue), #2a2a2a, var(--accent-green));
    z-index: -1;
    animation: rotateGradient 4s linear infinite;
}

.advanced-hero-profile::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: -2;
    background: transparent;
    animation: pulseEnergy 2s infinite alternate;
}

.hero-profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--bg-color);
    background: var(--bg-color);
    position: relative;
    z-index: 2;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseEnergy {
    0% {
        box-shadow: 0 0 20px rgba(57, 255, 20, 0.4), 0 0 30px rgba(0, 210, 255, 0.2);
    }

    100% {
        box-shadow: 0 0 50px rgba(57, 255, 20, 0.7), 0 0 60px rgba(0, 210, 255, 0.5);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* =========================================================================
   About Section
   ========================================================================= */
.about-grid {
    display: block;
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.about-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(0, 210, 255, 0.08), rgba(217, 4, 41, 0.05), transparent 70%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.about-text {
    text-align: center;
    padding: 3rem 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* =========================================================================
   Career Objective Highlight Styling
   ========================================================================= */
.about-section {
    padding-bottom: 2rem;
}

.objective-section {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.objective-grid {
    display: block;
    width: 85%;
    max-width: 1000px;
    margin: 3rem auto 0;
    position: relative;
}

.objective-text {
    text-align: center;
    padding: 3rem 2rem;
}

.objective-text p {
    font-size: 1.4rem;
    line-height: 1.8;
    font-weight: 500;
}

.objective-gradient-text {
    background: linear-gradient(135deg, #ffffff, var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

p.objective-gradient-text {
    display: inline;
}

.animated-objective-box {
    position: relative;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue), var(--accent-green));
    background-size: 200% 200%;
    animation: rotateBorderGradient 4s linear infinite, boxPulse 3s infinite alternate;
    z-index: 1;
}

.animated-objective-box .objective-text {
    background: rgba(10, 10, 10, 0.9);
    border-radius: 17px;
    border: none;
    position: relative;
    z-index: 2;
}

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

    100% {
        background-position: 200% 50%;
    }
}

@keyframes boxPulse {
    0% {
        box-shadow: 0 0 15px rgba(0, 210, 255, 0.1), 0 0 15px rgba(57, 255, 20, 0.1);
    }

    100% {
        box-shadow: 0 0 30px rgba(0, 210, 255, 0.3), 0 0 30px rgba(57, 255, 20, 0.3);
    }
}

/* =========================================================================
   Skills Section — Technical Arsenal
   ========================================================================= */
.arsenal-card {
    max-width: 820px;
    margin: 0 auto 3rem;
    padding: 2.5rem 2.5rem 2rem;
}

.arsenal-title {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.skill-bar-list {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.skill-bar-item {
    width: 100%;
}

.skill-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.skill-bar-header span:first-child i {
    margin-inline-end: 0.4rem;
    color: var(--accent-green);
}

.skill-pct {
    color: var(--accent-blue);
    font-size: 0.9rem;
}

.skill-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff4d4d, #cc0000);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Triggered by JS when section is visible */
.skill-bar-fill.animate {
    width: var(--target-width);
}

/* Soft Skills Card — matches Technical Arsenal */
.soft-skills-row {
    max-width: 820px;
    margin: 0 auto;
    padding: 3px;
    /* acts as animated border thickness */
    border-radius: 20px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue), var(--accent-green));
    background-size: 200% 200%;
    animation: rotateBorderGradient 5s linear infinite, boxPulse 3s infinite alternate;
    position: relative;
}

.soft-skills-inner {
    background: rgba(10, 10, 10, 0.92);
    border-radius: 17px;
    padding: 2rem 2.5rem;
    backdrop-filter: blur(20px);
}

.soft-skills-title {
    font-size: 1.4rem;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.glow-badge {
    padding: 0.5rem 1.2rem;
    background: rgba(0, 210, 255, 0.06);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: default;
    color: var(--text-secondary);
}

.glow-badge:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 0 16px var(--glow-spread-blue);
    transform: translateY(-3px);
}

/* =========================================================================
   Experience Section (Timeline)
   ========================================================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    inset-inline-start: 20px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-red), var(--accent-red));
}

.timeline-item {
    position: relative;
    margin-inline-start: 60px;
    margin-bottom: 3rem;
    border-color: #330000;
}

.timeline-dot {
    position: absolute;
    inset-inline-start: -46px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--glow-spread-red);
}

.timeline-title {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.timeline-company {
    font-size: 1.1rem;
    color: var(--accent-red);
    margin-bottom: 0.2rem;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-list {
    padding-inline-start: 1.2rem;
    list-style: disc;
    color: var(--text-secondary);
}

.timeline-list li {
    margin-bottom: 0.5rem;
}

/* =========================================================================
   Education Section
   ========================================================================= */
.education-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.edu-icon {
    font-size: 3rem;
    color: var(--accent-red);
    background: rgba(255, 0, 0, 0.1);
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
}

.edu-info h3 {
    font-size: 1.4rem;
    color: var(--accent-red);
    margin-bottom: 0.3rem;
}

.edu-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.edu-info p {
    color: var(--text-secondary);
}

/* =========================================================================
   Career Objective Section
   ========================================================================= */
.objective-section {
    padding: 3rem 0;
}

.objective-card {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 3rem;
}

.objective-card h2 {
    margin-bottom: 1.5rem;
    color: var(--accent-blue);
}

.objective-card p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.8;
}

.quote-icon {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 4rem;
    opacity: 0.05;
    color: var(--text-primary);
}

/* =========================================================================
   Projects Section
   ========================================================================= */
.projects-stack {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.project-card-wide {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    border-radius: 0;
    /* Sharp edges */
    overflow: hidden;
    position: relative;
    padding: 2px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-cobalt), var(--accent-red));
    background-size: 200% 200%;
    animation: rotateBorderGradient 5s linear infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card-wide:hover {
    transform: scale(1.015);
    box-shadow: 0 0 40px var(--glow-spread-red), 0 0 40px var(--glow-spread-emerald);
}

.project-card-wide>* {
    position: relative;
    z-index: 2;
}

.project-card-wide::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 0;
    background: #000000;
    z-index: 1;
}

.project-card-image {
    flex: 0 0 55%;
    overflow: hidden;
    border-radius: 0;
    background: #050505;
    position: relative;
    z-index: 2;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #0d0d0d;
    transition: transform 0.4s ease;
}

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

.project-card-info {
    flex: 1;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    background: #0a0a0a;
    border-radius: 0;
    position: relative;
    z-index: 2;
}

.project-card-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.project-card-info p {
    color: var(--accent-red);
    font-size: 1rem;
    line-height: 1.7;
}

.btn-project {
    margin-top: 0.5rem;
    align-self: flex-start;
    padding: 0.65rem 1.6rem;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-emerald));
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-project:hover {
    opacity: 0.85;
    transform: translateX(4px);
}

/* =========================================================================
   Contact Section & Form
   ========================================================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info h3,
.contact-form-container h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    /* geometric */
    background: rgba(255, 255, 255, 0.02);
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--accent-blue);
}

.contact-item span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-item strong {
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.btn-whatsapp {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

.btn-whatsapp i {
    color: #25D366;
}

.btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
    border-color: #25D366;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.2);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
    box-shadow: 0 0 15px var(--glow-spread-red);
    transform: translateY(-3px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: start;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    /* geometric */
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition-fast);
    text-align: start;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 10px var(--glow-spread-red);
}

.submit-btn {
    width: 100%;
}

/* =========================================================================
   Footer
   ========================================================================= */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--card-border);
    text-align: center;
    background: var(--nav-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-to-top {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.back-to-top:hover {
    color: var(--accent-green);
}

/* =========================================================================
   Animations & Reveal Effects
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* =========================================================================
   Responsiveness
   ========================================================================= */

/* --- Tablet & Large Mobile (max 900px) --- */
@media (max-width: 900px) {

    .container {
        padding: 0 1.5rem;
    }

    /* Hero */
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding-top: 6rem;
    }

    .hero-text {
        order: 2;
    }

    .hero-visual {
        order: 1;
        display: flex;
        height: auto;
        width: 100%;
        justify-content: center;
    }

    .advanced-hero-profile {
        width: 260px;
        height: 260px;
    }

    .circle-frame-wrapper {
        width: 300px;
        height: 300px;
    }

    .hero-summary {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* About */
    .about-grid {
        width: 95%;
    }

    /* Objective */
    .objective-grid {
        width: 95%;
    }

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

    /* Timeline */
    .timeline-item {
        margin-inline-start: 40px;
    }

    /* Education */
    .education-card {
        flex-direction: column;
        text-align: center;
    }

    /* Projects */
    .project-card-wide {
        flex-direction: column;
    }

    .project-card-image {
        flex: 0 0 auto;
        height: 220px;
        border-radius: 17px 17px 0 0;
    }

    .project-card-image img {
        object-fit: cover;
    }

    .project-card-info {
        border-radius: 0 0 17px 17px;
        padding: 1.5rem;
    }

    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* --- Mobile (max 768px) --- */
@media (max-width: 768px) {

    /* Nav */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--card-border);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
        z-index: 999;
    }

    .nav-links.show {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    /* Typography */
    .name-title {
        font-size: 2.2rem;
    }

    .role-title {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    /* Hero */
    .advanced-hero-profile {
        width: 210px;
        height: 210px;
    }

    .circle-frame-wrapper {
        width: 250px;
        height: 250px;
    }

    /* About / Objective text */
    .about-text p,
    .objective-text p {
        font-size: 1rem;
    }

    /* Skills badges */
    .glow-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-links {
        gap: 0.8rem;
    }

    .toggle-container {
        gap: 0.8rem;
        z-index: 1001;
    }
    
    .lang-switch {
        width: 50px;
        height: 26px;
    }
    
    .lang-slider {
        width: 18px;
        height: 18px;
    }
    
    .lang-checkbox:checked + .lang-label .lang-slider {
        transform: translateX(24px);
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    /* Project cards */
    .project-card-image {
        height: 180px;
    }

    .project-card-info h3 {
        font-size: 1.2rem;
    }

    .btn-project {
        font-size: 0.88rem;
        padding: 0.5rem 1.2rem;
    }
}

/* --- Small Mobile (max 480px) --- */
@media (max-width: 480px) {

    section {
        padding: 4rem 0;
    }

    .name-title {
        font-size: 1.8rem;
    }

    .role-title {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

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

    .advanced-hero-profile {
        width: 180px;
        height: 180px;
    }

    .hero-visual .circle-frame-wrapper {
        width: 220px;
        height: 220px;
        margin: 0 auto;
        flex-shrink: 0;
    }

    .about-text {
        padding: 1.5rem 1rem;
    }

    .objective-text {
        padding: 1.5rem 1rem;
    }

    .objective-text p {
        font-size: 1rem;
    }

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

    .timeline-item {
        margin-inline-start: 30px;
    }

    .timeline-dot {
        inset-inline-start: -36px;
    }

    .project-card-image {
        height: 160px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .edu-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* =========================================================================
   Image Modal (Lightbox)
   ========================================================================= */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
    box-shadow: 0 0 30px var(--glow-spread-blue);
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.4s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

#modal-caption {
    margin-top: 20px;
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
    z-index: 2001;
}

.modal-close:hover {
    color: var(--accent-emerald);
}

/* =========================================================================
   NEW ADVANCED GIS UI ADDITIONS
   ========================================================================= */

/* Sliding Language Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    color: var(--accent-emerald);
}

.lang-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.lang-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.lang-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.lang-slider {
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: var(--accent-emerald);
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--glow-spread-emerald);
}

.lang-checkbox:checked+.lang-label .lang-slider {
    transform: translateX(30px);
    background-color: var(--accent-cobalt);
    box-shadow: 0 0 10px var(--glow-spread-cobalt);
}

.lang-en,
.lang-ar {
    z-index: 1;
}

/* Illuminated Circle Profile Frame */
.circle-frame-wrapper {
    position: relative;
    width: 420px;
    height: 420px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    margin: 0 auto;
    flex-shrink: 0;
}

.circle-border-animated {
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    background: conic-gradient(from 0deg, 
        rgba(255, 0, 0, 0.7), 
        transparent 30%, 
        rgba(255, 94, 0, 0.5) 50%, 
        transparent 70%, 
        rgba(255, 0, 0, 0.7)
    );
    animation: rotateGradient 8s linear infinite;
    z-index: -1;
    filter: blur(5px);
}

.circle-profile-image {
    width: 95%;
    height: 95%;
    background-color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 3px solid var(--bg-color);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.circle-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.circle-frame-wrapper:hover .circle-profile-image img {
    transform: scale(1.05);
}

@keyframes pulseEnergyCircle {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px var(--accent-red));
    }

    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 20px var(--accent-emerald));
    }

    100% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 25px var(--accent-cobalt));
    }
}

/* Floating Action Button (CV) */
.fab-cv {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cobalt));
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-spread-emerald);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1.2rem;
}

.fab-cv span {
    font-size: 0.6rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-top: 2px;
}

.fab-cv:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 30px var(--glow-spread-cobalt);
}

body.rtl .fab-cv {
    right: auto;
    left: 30px;
}

/* Replace variable usages throughout layout globally */
.type-cursor {
    font-weight: 200;
    color: var(--accent-red);
    animation: blink 0.7s infinite;
    margin-left: 5px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--accent-red);
    display: none;
}

@media (pointer: fine) {
    .cursor-dot {
        display: block;
    }
}