/* ============================================
   ABDULRAHMAN AL-MUQAILY - PORTFOLIO CSS
   Dark Theme - younes.expert inspired
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #212121;
    --accent: #e63946;
    --accent-hover: #c1121f;
    --accent-light: rgba(230, 57, 70, 0.15);
    --accent-glow: rgba(230, 57, 70, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #6b7280;
    --border-color: #2a2a2a;
    --border-hover: #3a3a3a;
    --font-arabic: 'Tajawal', 'Arial', sans-serif;
    --font-latin: 'Inter', 'Arial', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-accent: 0 4px 20px rgba(230, 57, 70, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --navbar-height: 70px;
}

/* Light Mode Variables */
.light-mode {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f6;
    --text-primary: #111111;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

/* ---- Base Reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-arabic);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.ltr-lang {
    direction: ltr;
    font-family: var(--font-latin);
}

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

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

ul {
    list-style: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ---- Selection ---- */
::selection {
    background-color: var(--accent);
    color: #fff;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.light-mode .navbar {
    background: rgba(248, 249, 250, 0.9);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    transition: var(--transition);
}

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

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-right,
.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle,
.lang-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-arabic);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-weight: 500;
}

.theme-toggle:hover,
.lang-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.mobile-menu-btn {
    display: none;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

/* ============================================
   FLOATING SOCIALS
   ============================================ */
.floating-socials {
    position: fixed;
    left: 24px;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.float-social-link {
    width: 38px;
    height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.float-social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.float-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, var(--border-color), transparent);
}

/* ============================================
   COMMON SECTION STYLES
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.section-tag {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Animate on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-arabic);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
    color: #fff;
}

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 12px 16px;
}

.btn-ghost:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.btn-full {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: var(--navbar-height);
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

/* Background decoration */
.hero-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
    max-width: 800px;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Profile Photo */
.hero-photo-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.hero-photo-ring {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent), #ff6b6b, var(--accent));
    animation: rotate-ring 6s linear infinite;
    box-shadow: 0 0 40px rgba(230, 57, 70, 0.3);
}

@keyframes rotate-ring {
    0% { background: linear-gradient(0deg, var(--accent), #ff6b6b, var(--accent)); }
    100% { background: linear-gradient(360deg, var(--accent), #ff6b6b, var(--accent)); }
}

.hero-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-primary);
    display: block;
}

/* Hero Text */
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-name {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.title-icon {
    color: var(--accent);
    font-size: 1.4rem;
}

.hero-title {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 550px;
    line-height: 1.7;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-top: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

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

.scroll-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    animation: bounce-down 2s ease-in-out infinite;
    transition: var(--transition);
    cursor: pointer;
}

.scroll-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ============================================
   EXPERIENCE / TIMELINE SECTION
   ============================================ */
.timeline {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 28px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    display: flex;
    gap: 24px;
    margin-bottom: 36px;
    padding-right: 68px;
    position: relative;
}

.timeline-marker {
    position: absolute;
    right: 12px;
    top: 20px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    z-index: 1;
    border: 2px solid var(--bg-primary);
}

.timeline-marker.current {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

.timeline-marker.education {
    background: #3b82f6;
    color: #fff;
}

.timeline-content {
    flex: 1;
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.timeline-card:hover {
    border-color: var(--accent);
    transform: translateX(-4px);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.1);
}

.tc-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.tc-logo-wrap {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 6px;
}

.tc-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(1);
}

.tc-logo-fallback {
    color: var(--accent);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tc-info {
    flex: 1;
}

.tc-company {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tc-role {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.tc-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tc-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.tc-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
}

.current-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.edu-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tc-body {
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

.tc-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.tc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tc-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(230, 57, 70, 0.2);
}

/* ============================================
   CERTIFICATIONS SECTION
   ============================================ */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #ff6b6b);
    opacity: 0;
    transition: var(--transition);
}

.cert-card:hover {
    border-color: rgba(230, 57, 70, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 4px 20px rgba(230, 57, 70, 0.1);
}

.cert-card:hover::before {
    opacity: 1;
}

.cert-logo-container {
    width: 100px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--border-color);
}

.cert-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cert-logo-fallback {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

.cert-details {
    flex: 1;
    margin-bottom: 16px;
}

.cert-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.cert-issuer {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.cert-date {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
}

.cert-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-arabic);
    transition: var(--transition);
    cursor: pointer;
}

.cert-link-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    border-color: rgba(230, 57, 70, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    min-height: 50px;
}

.project-header:only-child {
    justify-content: flex-start;
}

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

.metabase-icon {
    background: rgba(80, 158, 227, 0.15);
    padding: 8px;
}

.project-logo-img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.project-icon {
    font-size: 1.2rem;
    color: var(--accent);
}

.project-links {
    display: flex;
    gap: 8px;
}

.project-link {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: var(--transition);
}

.project-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.project-link-disabled {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: default;
    opacity: 0.5;
}

.project-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.tech-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-card:hover .tech-badge {
    border-color: rgba(230, 57, 70, 0.2);
    color: var(--accent);
    background: var(--accent-light);
}

/* ============================================
   TECH SPECS SECTION
   ============================================ */
.techspecs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.techspec-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.techspec-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(230, 57, 70, 0.12);
}

.ts-icon {
    width: 72px;
    height: 72px;
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.8rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.techspec-card:hover .ts-icon {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35);
}

.ts-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ============================================
   TECH STACK SECTION
   ============================================ */
.stack-categories {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.stack-category {}

.stack-cat-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    padding-right: 12px;
    border-right: 3px solid var(--accent);
}

.stack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    min-width: 80px;
    transition: var(--transition);
    cursor: default;
}

.stack-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.stack-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.github-icon {
    filter: invert(1);
}

.light-mode .github-icon {
    filter: none;
}

.stack-icon-text {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    font-family: var(--font-latin);
}

.stack-name {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* ============================================
   COMPANIES SECTION — infinite marquee
   ============================================ */
.companies-marquee {
    width: 100%;
    padding: 20px 0;
    position: relative;
    background:
        radial-gradient(ellipse at 80% 10%, rgba(230, 57, 70, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 90%, rgba(230, 57, 70, 0.05) 0%, transparent 50%);
}

.marquee-container {
    width: 90%;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    height: 140px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0));
    mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0));
}

.marquee-item {
    width: 240px;
    height: 140px;
    position: absolute;
    right: calc(280px * 4);
    animation: scroll-right 30s linear infinite;
    animation-delay: var(--delay);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes scroll-right {
    to { right: -280px; }
}

.marquee-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    display: block;
}

/* Pause on hover */
.marquee-container:hover .marquee-item {
    animation-play-state: paused;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.love-title {
    font-size: clamp(2rem, 5vw, 3rem);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: var(--transition);
}

.contact-item:hover {
    border-color: rgba(230, 57, 70, 0.3);
    transform: translateX(-4px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-link {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
}

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

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.form-input,
.form-textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    transition: var(--transition);
    width: 100%;
    direction: rtl;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

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

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.footer-love {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-name {
    color: var(--accent);
    font-weight: 700;
}

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

.footer-social-link {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

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

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #22c55e;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: var(--font-arabic);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    left: 80px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets */
@media (max-width: 1024px) {
    .techspecs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

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

/* Tablets */
@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }

    .navbar .nav-center {
        position: static;
        transform: none;
    }

    .nav-logo {
        font-size: 0.95rem;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .floating-socials {
        display: none;
    }

    .hero-stats {
        padding: 14px 20px;
        gap: 16px;
    }

    .hero-actions {
        gap: 8px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

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

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

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

    .timeline::before {
        right: 18px;
    }

    .timeline-item {
        padding-right: 54px;
    }

    .timeline-marker {
        right: 2px;
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

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

/* Mobile */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-center {
        position: static;
        transform: none;
        order: -1;
        width: 100%;
        text-align: center;
        padding: 8px 0 0;
    }

    .techspecs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .techspec-card {
        padding: 24px 16px;
    }

    .ts-icon {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    .ts-title {
        font-size: 0.85rem;
    }

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

    .hero-name {
        font-size: 2rem;
    }

    .hero-photo-ring {
        width: 150px;
        height: 150px;
    }

    .stack-items {
        gap: 8px;
    }

    .stack-item {
        min-width: 70px;
        padding: 12px 10px;
    }

    .stack-icon {
        width: 28px;
        height: 28px;
    }

    .hero-stats {
        gap: 12px;
        padding: 12px 16px;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .hero-actions .btn-ghost {
        display: none;
    }

    .footer-top {
        justify-content: center;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
    }

    .marquee-container {
        height: 110px;
    }
    .marquee-item {
        width: 180px;
        height: 110px;
        right: calc(220px * 4);
    }
    @keyframes scroll-right {
        to { right: -220px; }
    }
    .marquee-img {
        padding: 8px;
    }
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-content {
    animation: fade-in-up 0.8s ease forwards;
}

/* Stagger animation for hero elements */
.hero-photo-wrapper { animation-delay: 0.1s; }
.hero-greeting { animation-delay: 0.2s; }
.hero-name { animation-delay: 0.3s; }
.hero-title-wrapper { animation-delay: 0.4s; }
.hero-subtitle { animation-delay: 0.5s; }
.hero-stats { animation-delay: 0.6s; }
.hero-actions { animation-delay: 0.7s; }

/* Progress bar effect for skills */
.skill-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff6b6b);
    border-radius: 2px;
    width: 0;
    transition: width 1.2s ease;
}

/* Glow effect for accent elements */
.glow-text {
    text-shadow: 0 0 30px rgba(230, 57, 70, 0.5);
}

/* Noise texture overlay for hero */
.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* Grid pattern decoration */
.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Section divider */
.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin: 16px auto;
    border-radius: 2px;
}

/* Highlight words */
.highlight {
    color: var(--accent);
    position: relative;
}

/* Card shine effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    transform: skewX(-15deg);
    transition: left 0.6s ease;
}

.card-shine:hover::after {
    left: 120%;
}
