@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ========================================
   م. ناجي الدعاس — Portfolio 2026
   Professional CSS — Full Responsive
   Dark & Light Themes + 3D Effects
   ======================================== */

/* ——— Custom Properties ——— */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0b0f19;
    --bg-secondary: #070a10;
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-card-hover: rgba(22, 32, 58, 0.85);
    --bg-glass: rgba(15, 23, 42, 0.85);
    --bg-glass-border: rgba(184, 27, 59, 0.15);

    --primary-color: #b81b3b;
    --primary-glow: rgba(184, 27, 59, 0.35);
    --primary-soft: rgba(184, 27, 59, 0.08);
    --accent-gold: #f0c040;
    --accent-gold-glow: rgba(240, 192, 64, 0.3);
    --accent-purple: #8a1228;
    --accent-green: #10b981;

    --text-primary: #f8fafc;
    --text-secondary: #b8c5d3;
    --text-muted: #8b9bb5;

    --border-color: rgba(184, 27, 59, 0.2);
    --border-subtle: rgba(255, 255, 255, 0.05);

    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(184, 27, 59, 0.1);
    --shadow-glow: 0 0 30px rgba(184, 27, 59, 0.2);
    --shadow-gold: 0 0 25px rgba(240, 192, 64, 0.25);

    --header-bg: rgba(11, 15, 25, 0.9);
    --header-blur: blur(20px);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;

    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ——— Light Theme ——— */
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-border: rgba(184, 27, 59, 0.15);

    --primary-color: #8a1228;
    --primary-glow: rgba(138, 18, 40, 0.25);
    --primary-soft: rgba(138, 18, 40, 0.07);
    --accent-gold: #b81b3b;
    --accent-gold-glow: rgba(184, 27, 59, 0.2);

    --text-primary: #0f172a;
    --text-secondary: #060606;
    --text-muted: #64748b;

    --border-color: rgba(138, 18, 40, 0.15);
    --border-subtle: rgba(0, 0, 0, 0.06);

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(138, 18, 40, 0.07);
    --shadow-glow: 0 0 20px rgba(138, 18, 40, 0.15);

    --header-bg: rgba(250, 250, 250, 0.92);
}

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

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

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color var(--transition-med), color var(--transition-med);
    position: relative;
}

/* ——— Scrollbar ——— */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* ——— Selection ——— */
::selection {
    background: var(--primary-glow);
    color: var(--primary-color);
}

/* ——— Container ——— */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ========================================
   CYBER GRID BACKGROUND
   ======================================== */
.cyber-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.cyber-grid::before {
    content: '';
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(rgba(184, 27, 59, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 27, 59, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 20s linear infinite;
}

.cyber-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(184, 27, 59, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(138, 18, 40, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 100% 80% at 50% 100%, var(--bg-primary) 0%, transparent 50%);
}

[data-theme="light"] .cyber-grid::before {
    background-image:
        linear-gradient(rgba(138, 18, 40, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 18, 40, 0.04) 1px, transparent 1px);
}

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

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

/* Watermark background from my-library */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/NajiAlDaas2026.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.025;
    /* Subtle and professional watermark background */
    pointer-events: none;
    z-index: -10;
    mix-blend-mode: luminosity;
}

/* ========================================
   HEADER
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: var(--header-blur);
    -webkit-backdrop-filter: var(--header-blur);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-med);
}

header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--primary-glow);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 2vw, 1.8rem);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
    box-shadow: 0 0 8px var(--primary-color);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

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

/* Mobile Nav */
.menu-toggle {
    display: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* Mobile Dropdown Nav */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--header-bg);
    backdrop-filter: var(--header-blur);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    animation: slideDown 0.25s ease;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    border-right: 3px solid transparent;
}

.mobile-nav a:hover {
    color: var(--primary-color);
    background: var(--primary-soft);
    border-right-color: var(--primary-color);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   THEME TOGGLE
   ======================================== */
.theme-toggle-btn {
    position: fixed;
    bottom: 90px;
    left: 20px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--primary-color);
    background: var(--bg-card);
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--primary-glow), var(--shadow-card);
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.theme-toggle-btn:hover {
    background: var(--primary-soft);
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--primary-color);
    background: var(--bg-card);
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all var(--transition-med);
    backdrop-filter: blur(10px);
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-soft);
    box-shadow: 0 0 25px var(--primary-glow);
}

/* ========================================
   SECTIONS COMMON
   ======================================== */
section {
    position: relative;
    z-index: 1;
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
    border-radius: 2px;
    margin: 0.8rem auto 0;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ========================================
   TEXT UTILITIES
   ======================================== */
.text-cyber {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow);
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--primary-color);
    text-shadow: none;
}

.glitch::before {
    animation: glitch1 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    transform: translateX(-2px);
    color: #ff006e;
}

.glitch::after {
    animation: glitch2 3s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    transform: translateX(2px);
    color: var(--primary-color);
}

@keyframes glitch1 {

    0%,
    94%,
    100% {
        transform: translateX(0);
        opacity: 0;
    }

    95% {
        transform: translateX(-3px);
        opacity: 0.8;
    }

    97% {
        transform: translateX(3px);
        opacity: 0.8;
    }

    99% {
        transform: translateX(-1px);
        opacity: 0.8;
    }
}

@keyframes glitch2 {

    0%,
    92%,
    100% {
        transform: translateX(0);
        opacity: 0;
    }

    93% {
        transform: translateX(3px);
        opacity: 0.8;
    }

    96% {
        transform: translateX(-2px);
        opacity: 0.8;
    }

    98% {
        transform: translateX(2px);
        opacity: 0.8;
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.8rem;
    border-radius: var(--radius-md);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    color: #ffffff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px var(--primary-glow), 0 0 0 1px var(--primary-color);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    box-shadow: inset 0 0 0 0 var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-soft);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-glow);
}

.w-100 {
    width: 100%;
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* ========================================
   3D TILT CARD
   ======================================== */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    will-change: transform;
}

.tilt-card-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 60%);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tilt-card:hover .tilt-card-shine {
    opacity: 1;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}

/* Animated background orbs */
.hero::before {
    content: '';
    position: absolute;
    width: clamp(300px, 50vw, 700px);
    height: clamp(300px, 50vw, 700px);
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    top: -10%;
    right: -10%;
    animation: orbFloat 8s ease-in-out infinite alternate;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: clamp(200px, 35vw, 500px);
    height: clamp(200px, 35vw, 500px);
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 5%;
    left: -5%;
    animation: orbFloat 10s ease-in-out infinite alternate-reverse;
    pointer-events: none;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    width: 100%;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-text .subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 520px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   PROFILE 3D — احترافي 2026
   ======================================== */
.profile-3d {
    position: relative;
    width: clamp(240px, 30vw, 360px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px;
}

/* الإطار الخارجي الدوّار */
.profile-3d::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%;
    background: conic-gradient(from 0deg, var(--primary-color), var(--accent-gold), var(--accent-purple), var(--primary-color));
    animation: morphSpin 6s linear infinite;
    z-index: 0;
    filter: blur(1px);
}

/* ظل التوهج الخارجي */
.profile-3d::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.18) 0%, rgba(124, 58, 237, 0.1) 40%, transparent 70%);
    animation: glowPulseProfile 3s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes morphSpin {
    0% {
        border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%;
        transform: rotate(0deg);
    }

    25% {
        border-radius: 54% 46% 40% 60% / 44% 56% 44% 56%;
    }

    50% {
        border-radius: 40% 60% 54% 46% / 56% 40% 60% 44%;
        transform: rotate(180deg);
    }

    75% {
        border-radius: 60% 40% 46% 54% / 40% 60% 44% 56%;
    }

    100% {
        border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%;
        transform: rotate(360deg);
    }
}

@keyframes glowPulseProfile {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* الحاوية الداخلية للصورة */
.profile-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 44% 56% 58% 42% / 50% 42% 58% 50%;
    overflow: hidden;
    z-index: 1;
    background: var(--bg-card);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 255, 0.15), inset 0 0 30px rgba(0, 229, 255, 0.04);
    animation: morphShape 8s ease-in-out infinite alternate;
}

@keyframes morphShape {
    0% {
        border-radius: 44% 56% 58% 42% / 50% 42% 58% 50%;
    }

    50% {
        border-radius: 56% 44% 42% 58% / 42% 58% 42% 58%;
    }

    100% {
        border-radius: 44% 56% 58% 42% / 50% 42% 58% 50%;
    }
}

.profile-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.6s ease;
}

.profile-3d:hover .profile-inner img {
    transform: scale(1.04);
}

/* بادج المتاح للعمل */
.profile-badge {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 7px 18px;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-glow);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.profile-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* نقاط الزينة */
.profile-dot {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 2;
}

.profile-dot:nth-child(1) {
    width: 8px;
    height: 8px;
    top: 8%;
    right: 5%;
    animation: orbitDot1 4s ease-in-out infinite;
}

.profile-dot:nth-child(2) {
    width: 5px;
    height: 5px;
    bottom: 15%;
    left: 3%;
    background: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-gold);
    animation: orbitDot2 5.5s ease-in-out infinite;
}

.profile-dot:nth-child(3) {
    width: 6px;
    height: 6px;
    top: 45%;
    right: -2%;
    background: var(--accent-purple);
    box-shadow: 0 0 8px var(--accent-purple);
    animation: orbitDot3 3.5s ease-in-out infinite;
}

@keyframes orbitDot1 {

    0%,
    100% {
        transform: translate(0, 0)
    }

    50% {
        transform: translate(-8px, 12px)
    }
}

@keyframes orbitDot2 {

    0%,
    100% {
        transform: translate(0, 0)
    }

    50% {
        transform: translate(10px, -8px)
    }
}

@keyframes orbitDot3 {

    0%,
    100% {
        transform: translate(0, 0)
    }

    50% {
        transform: translate(-6px, 10px)
    }
}

/* Hologram Ring */
.hologram-ring {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 229, 255, 0.25);
    animation: ringRotate 12s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.hologram-ring::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px dashed rgba(240, 192, 64, 0.2);
    animation: ringRotate 8s linear infinite reverse;
}

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

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

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    background: transparent;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.about-text {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.about-text::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 8rem;
    color: var(--primary-color);
    opacity: 0.06;
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

.about-text p {
    color: var(--text-secondary);
    font-size: clamp(0.88rem, 1.5vw, 1rem);
    line-height: 1.9;
}

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

.skill-tag {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: default;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.skill-tag:hover {
    color: var(--primary-color);
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.skill-tag:hover::before {
    transform: scaleX(1);
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.8rem);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.2rem);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-med);
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-med);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border-color: rgba(0, 229, 255, 0.3);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-soft), rgba(124, 58, 237, 0.08));
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    transition: all var(--transition-fast);
}

.service-card:hover .service-icon {
    background: var(--primary-soft);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.1) rotate(-5deg);
}

.service-card h3 {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
    flex: 1;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects {
    background: transparent;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: #050a12;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1.2rem, 2.5vw, 2rem);
}

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

.project-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow), 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 229, 255, 0.25);
}

.project-content {
    padding: clamp(1.2rem, 2.5vw, 1.8rem);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.project-desc {
    flex: 1;
}

.project-desc p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.75;
}

.tech-stack {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tech-stack span {
    background: var(--primary-soft) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(0, 229, 255, 0.2) !important;
    border-radius: 50px !important;
    padding: 3px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 600;
}

.project-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    display: block;
}

.project-item:hover .project-image img {
    transform: scale(1.05);
}

/* Hidden projects */
.project-item.hidden {
    display: none;
}

/* ========================================
   TECHNICAL LIBRARY SHOWCASE
   ======================================== */
.library-showcase {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.library-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 70% at 80% 50%, rgba(184, 27, 59, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 20% 50%, rgba(138, 18, 40, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.library-showcase .container {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
}

.book-image {
    width: clamp(200px, 25vw, 300px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.book-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.book-image:hover img {
    transform: scale(1.04);
}

.book-info h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.book-info p {
    color: var(--text-secondary);
    font-size: clamp(0.88rem, 1.4vw, 1rem);
    line-height: 1.85;
    margin-bottom: 1rem;
}

.book-target {
    background: var(--bg-glass);
    border: 1px solid rgba(240, 192, 64, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.book-target strong {
    color: var(--accent-gold);
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq {
    background: transparent;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 850px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-card);
}

.faq-item:hover {
    border-color: rgba(0, 229, 255, 0.25);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--primary-soft);
}

.faq-question span {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.faq-toggle-icon {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    font-size: 0.85rem;
}

.faq-item.open .faq-toggle-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.2rem;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal.open {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-color);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
    z-index: 10;
}

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

/* Form Styles */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    direction: rtl;
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-soft), 0 0 15px var(--primary-glow);
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

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

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    text-align: center;
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    box-shadow: 0 0 20px var(--primary-glow);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   BOOK PREVIEW MODAL
   ======================================== */
.book-preview-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.book-reader {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 200px;
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.book-reader h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.book-reader pre,
.book-reader code {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--primary-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

.book-reader-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.book-page-num {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    text-align: center;
}

footer p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-soft);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-3px);
}

/* ========================================
   STATS BAR
   ======================================== */
.stats-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 2.5rem 0;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-glow);
    display: block;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    display: block;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Large Laptops: 1200px – 1440px */
@media (max-width: 1440px) {
    .hero-container {
        gap: 3rem;
    }
}

/* Laptops: 1024px – 1199px */
@media (max-width: 1199px) {
    .hero-text h1 {
        font-size: 2.8rem;
    }

    .profile-3d {
        width: 270px;
    }

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

/* Tablets: 768px – 1023px */
@media (max-width: 1023px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding-top: 1rem;
        gap: 3rem;
    }

    .hero-text {
        order: 2;
    }

    .profile-3d {
        order: 1;
        width: clamp(200px, 55vw, 280px);
        margin: 20px;
    }

    .hero-text h1 {
        font-size: 2.4rem;
    }

    .hero-text .subtitle {
        max-width: 100%;
    }

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

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

    .library-showcase .container {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .book-image {
        width: min(240px, 65vw);
    }

    .book-info .actions {
        justify-content: center !important;
    }

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

/* Mobile L: 480px – 767px */
@media (max-width: 767px) {
    html {
        font-size: 15px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .profile-3d {
        width: clamp(180px, 60vw, 240px);
        margin: 15px;
    }

    .profile-badge {
        font-size: 0.72rem;
        padding: 5px 14px;
        bottom: -14px;
    }

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

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

    .project-item {
        flex-direction: column;
    }

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

    .project-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.9rem;
    }

    .book-reader-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile S: < 480px */
@media (max-width: 479px) {
    html {
        font-size: 14px;
    }

    .header-container {
        height: 60px;
    }

    .hero {
        padding-top: 60px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .profile-3d {
        width: clamp(160px, 70vw, 210px);
        margin: 12px;
    }

    .profile-badge {
        font-size: 0.68rem;
        padding: 4px 12px;
        bottom: -12px;
    }

    .profile-dot {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        text-align: center;
        width: 100%;
    }

    .about-content {
        gap: 1.5rem;
    }

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

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

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

    .modal-content {
        padding: 1.2rem;
    }

    .theme-toggle-btn,
    .scroll-to-top {
        width: 42px;
        height: 42px;
        bottom: 16px;
    }

    .theme-toggle-btn {
        bottom: 70px;
    }

    .faq-question {
        padding: 1rem;
    }

    .faq-answer {
        padding: 0 1rem;
    }

    .faq-item.open .faq-answer {
        padding: 0 1rem 1rem;
    }
}

/* Very small: < 360px */
@media (max-width: 359px) {
    .logo span:last-child {
        display: none;
    }

    .profile-3d {
        width: 150px;
        margin: 10px;
    }

    .hologram-ring {
        display: none;
    }
}

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */
[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    color: #ffffff;
}

[data-theme="light"] .cyber-grid::after {
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(138, 18, 40, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(184, 27, 59, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(250, 250, 250, 0.5) 0%, transparent 50%);
}

[data-theme="light"] body::before {
    opacity: 0.015;
}

[data-theme="light"] .book-reader pre,
[data-theme="light"] .book-reader code {
    background: rgba(0, 0, 0, 0.06);
    color: #0f1f30;
}

[data-theme="light"] .service-card:hover {
    box-shadow: 0 8px 40px rgba(0, 100, 180, 0.15);
}

[data-theme="light"] .filter-btn.active,
[data-theme="light"] .filter-btn:hover {
    color: #ffffff;
}

[data-theme="light"] .tech-stack span {
    background: rgba(0, 100, 180, 0.07) !important;
    color: var(--primary-color) !important;
    border-color: rgba(0, 119, 170, 0.2) !important;
}

[data-theme="light"] .about-text::before {
    color: var(--primary-color);
    opacity: 0.04;
}

/* ========================================
   SCROLLBAR LIGHT
   ======================================== */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #e6edf5;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

/* ========================================
   MY-LIBRARY DESIGN UTILITIES
   ======================================== */
.glass-effect {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark-glass-effect {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glowing-orb {
    position: absolute;
    filter: blur(80px);
    border-radius: 9999px;
    opacity: 0.15;
    mix-blend-mode: plus-lighter;
    pointer-events: none;
    z-index: 0;
}

@keyframes neon-pulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(184, 27, 59, 0.2), 0 0 3px rgba(184, 27, 59, 0.1);
    }

    50% {
        box-shadow: 0 0 25px rgba(184, 27, 59, 0.4), 0 0 8px rgba(184, 27, 59, 0.2);
    }
}

.pulse-neon {
    animation: neon-pulse 3s infinite;
}

/* ========================================
   CONVERSATIONAL STEPPER PROJECT PLANNER
   ======================================== */
.stepper-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 2;
    border: 3px solid var(--bg-card);
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-indicator.completed {
    background: var(--accent-green) !important;
    color: #fff !important;
    border-color: var(--accent-green) !important;
}

.step-pane {
    animation: fadeInStep 0.4s ease;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step 1: Project Cards Styling */
.project-card {
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    transition: all 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color) !important;
    box-shadow: 0 5px 15px var(--primary-glow);
}

.project-card.selected {
    background: var(--primary-soft) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 20px var(--primary-glow) !important;
}

/* Step 2 & 3: Chip Selector Styling */
.chip-selector {
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.chip-selector:hover {
    border-color: var(--primary-color) !important;
    background: var(--primary-soft) !important;
}

.chip-selector.selected {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px var(--primary-glow) !important;
}

/* Step 3: Dynamic Checkboxes as Chips Styling */
.checkbox-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    user-select: none;
    text-align: right;
    justify-content: flex-start;
}

.checkbox-chip:hover {
    border-color: var(--primary-color) !important;
    background: var(--primary-soft) !important;
}

.checkbox-chip.selected {
    background: var(--primary-soft) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 12px var(--primary-glow) !important;
}

.checkbox-chip input {
    display: none;
}

.checkbox-chip .chip-check-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-chip.selected .chip-check-icon {
    border-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Step 4 Receipt Styling */
.project-receipt-card {
    animation: slideInReceipt 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideInReceipt {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.receipt-tag {
    background: var(--primary-soft);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-primary);
}

/* Track Card Premium Highlights */
.track-card[data-track="business"]:hover {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 5px 15px var(--accent-gold-glow) !important;
}

.track-card[data-track="business"].selected {
    background: rgba(240, 192, 64, 0.08) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 20px var(--accent-gold-glow) !important;
}

.track-card[data-track="technical"]:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 5px 15px var(--primary-glow) !important;
}

.track-card[data-track="technical"].selected {
    background: var(--primary-soft) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 20px var(--primary-glow) !important;
}

/* ========================================
   PROJECT ARCHITECT CONSOLE LAYOUT CSS
   ======================================== */
.console-modal .modal-content {
    animation: zoomInConsole 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomInConsole {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.track-dependent-group {
    animation: fadeGroup 0.35s ease;
}

@keyframes fadeGroup {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar for preview list */
#receipt-project-features::-webkit-scrollbar {
    width: 4px;
}

#receipt-project-features::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

/* Responsive Overrides for Console */
@media (max-width: 900px) {
    .console-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }

    .console-content {
        padding: 1.2rem !important;
        width: 96% !important;
        overflow-y: auto;
        max-height: 92vh;
    }

    .console-content h2 {
        font-size: 1.3rem !important;
    }

    .console-configurator {
        padding: 1rem !important;
        gap: 1rem !important;
    }

    .project-receipt-card {
        padding: 1rem !important;
        margin-top: 0.5rem;
    }
}

/* Phones: ≤ 600px */
@media (max-width: 600px) {
    .console-content {
        padding: 0.8rem !important;
        width: 100% !important;
        max-height: 95vh;
        border-radius: 14px !important;
    }

    .console-content h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.1rem !important;
    }

    .console-content>div>p {
        font-size: 0.78rem !important;
        margin-bottom: 0.8rem !important;
    }

    .console-configurator {
        padding: 0.7rem !important;
        gap: 0.8rem !important;
    }

    .console-section {
        gap: 0.6rem;
    }

    .console-section-label {
        font-size: 0.82rem !important;
        margin-bottom: 0.3rem !important;
    }

    /* Track selector cards */
    .track-selector-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .track-card {
        padding: 0.6rem 0.4rem !important;
    }

    .track-card div:first-child {
        font-size: 1.4rem !important;
        margin-bottom: 0.2rem !important;
    }

    .track-card h4 {
        font-size: 0.78rem !important;
    }

    .track-card p {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }

    /* Chip selectors */
    .chip-selector-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.35rem !important;
    }

    .chip-selector {
        padding: 0.4rem 0.2rem !important;
        font-size: 0.68rem !important;
        border-radius: 6px !important;
    }

    /* Checkbox chips */
    .checkbox-chip {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.7rem !important;
        gap: 5px !important;
        border-radius: 7px !important;
    }

    .checkbox-chip .chip-check-icon {
        width: 13px !important;
        height: 13px !important;
        font-size: 0.55rem !important;
    }

    /* Budget & Timeline grid */
    .console-budget-grid {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
    }

    /* Name & Description grid */
    .console-contact-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    /* Receipt card */
    .project-receipt-card {
        padding: 0.8rem !important;
        border-radius: 12px !important;
    }

    .receipt-row {
        font-size: 0.78rem !important;
        margin-bottom: 0.4rem !important;
    }

    .receipt-tag {
        font-size: 0.65rem !important;
        padding: 2px 5px !important;
    }

    #receipt-project-features {
        max-height: 80px !important;
        font-size: 0.65rem !important;
    }

    /* Submit buttons */
    #submit-whatsapp {
        font-size: 0.82rem !important;
        padding: 0.65rem !important;
    }

    #send-email {
        font-size: 0.75rem !important;
        padding: 0.55rem !important;
    }

    /* Sent step */
    #modal-sent-step div:first-child {
        font-size: 3.5rem !important;
    }

    #modal-sent-step h2 {
        font-size: 1.3rem !important;
    }

    #modal-sent-step p {
        font-size: 0.85rem !important;
    }

    /* Input fields */
    .console-section input,
    .console-section textarea {
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
    }
}

/* Small phones: ≤ 420px */
@media (max-width: 420px) {
    .console-content {
        padding: 0.6rem !important;
        border-radius: 10px !important;
    }

    .console-content h2 {
        font-size: 0.95rem !important;
    }

    .track-selector-grid {
        grid-template-columns: 1fr !important;
        gap: 0.4rem !important;
    }

    .track-card {
        padding: 0.5rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        text-align: right !important;
    }

    .track-card div:first-child {
        font-size: 1.5rem !important;
        margin-bottom: 0 !important;
    }

    .chip-selector-grid {
        grid-template-columns: 1fr !important;
    }

    .chip-selector {
        font-size: 0.72rem !important;
        padding: 0.45rem !important;
    }

    .checkbox-chip {
        font-size: 0.68rem !important;
    }

    #receipt-project-code {
        font-size: 0.8rem !important;
    }
}