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

:root {
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --color-bg: #f3f7f5;
    --color-surface: rgba(255, 255, 255, 0.8);
    --color-surface-solid: #ffffff;
    --color-surface-soft: rgba(255, 255, 255, 0.7);
    --color-border: #dfece8;
    --color-border-strong: #bfdccf;
    --color-text: #1f2937;
    --color-text-soft: #5b6978;
    --color-text-muted: #75839a;
    --color-primary: #0f766e;
    --color-primary-strong: #115e59;
    --color-secondary: #f59e0b;
    --color-footer: #0f172a;
    --shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 20px 45px rgba(15, 23, 42, 0.14);
    --radius-md: 20px;
    --container-xl: 1280px;
    --container-lg: 1120px;
    --container-md: 960px;
}

html {
    scroll-behavior: smooth;
}

html[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

body {
    -webkit-tap-highlight-color: transparent;
}

html.dark {
    --color-bg: #0b1220;
    --color-surface: rgba(15, 23, 42, 0.78);
    --color-surface-solid: #121f34;
    --color-surface-soft: rgba(30, 41, 59, 0.76);
    --color-border: rgba(148, 163, 184, 0.22);
    --color-border-strong: rgba(20, 184, 166, 0.38);
    --color-text: #e5eefc;
    --color-text-soft: #c1cedd;
    --color-text-muted: #93a4ba;
    --shadow-sm: 0 14px 34px rgba(2, 8, 23, 0.28);
    --shadow-md: 0 22px 54px rgba(2, 8, 23, 0.42);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

img,
svg {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.outfit-font {
    font-family: var(--font-heading);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

::selection {
    background: rgba(59, 130, 246, 0.45);
    color: #fff;
}

.page-shell {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* -----------------------------
   Spotlight / Cursor glow
------------------------------ */
.page-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* default position */
    --spot-x: 50vw;
    --spot-y: 40vh;

    background:
        radial-gradient(
            1100px circle at var(--spot-x) var(--spot-y),
            rgba(15, 118, 110, 0.22) 0%,
            rgba(245, 158, 11, 0.16) 22%,
            rgba(13, 148, 136, 0.08) 38%,
            rgba(0, 0, 0, 0) 62%
        );

    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 220ms ease;
}

/* noise overlay (very low opacity) for a premium look */
.page-shell::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    opacity: 0.055;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
    background-size: 260px 260px;
    mix-blend-mode: overlay;
}

body:hover .page-shell::before,
.page-shell.is-spotlight::before {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .page-shell::before {
        opacity: 0 !important;
        transition: none !important;
        background: none !important;
    }
    .page-shell::after {
        display: none !important;
    }
}

/* -----------------------------
   Magnetic CTA (cursor attraction)
------------------------------ */
.button,
.button-secondary,
.button-inline {
    --mag-ox: 0px;
    --mag-oy: 0px;
    --mag-rot: 0deg;
}

.button.is-magnetic,
.button-secondary.is-magnetic,
.button-inline.is-magnetic {
    box-shadow:
        0 22px 60px rgba(59, 130, 246, 0.35),
        0 0 0 1px rgba(59, 130, 246, 0.25);
    transform: translate3d(var(--mag-ox), var(--mag-oy), 0) rotate(var(--mag-rot)) scale(1.02);
    border-color: rgba(59, 130, 246, 0.55);
    background-image: radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(255,255,255,0.25), transparent 55%);
}

/* Touch fallback (no hover) */
.button:active,
.button-secondary:active,
.button-inline:active {
    transform: translateY(-1px) scale(0.99);
}

/* keep shine sweep compatible with magnetic state */
.button.is-magnetic::after,
.button-secondary.is-magnetic::after,
.button-inline.is-magnetic::after {
    opacity: 1;
}


.container,
.container-wide,
.container-narrow {
    width: min(calc(100% - 2rem), var(--container-lg));
    margin: 0 auto;
}

.container-wide {
    width: min(calc(100% - 2rem), var(--container-xl));
}

.container-narrow {
    width: min(calc(100% - 2rem), var(--container-md));
}

.section {
    padding: 5rem 0;
}

.section-soft {
    background: var(--color-surface-soft);
    backdrop-filter: blur(10px);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.eyebrow {
    margin: 0 0 0.8rem;
    color: var(--color-primary);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.text-gradient {
    background-image: linear-gradient(135deg, var(--color-primary), #f59e0b 55%, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass {
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.dark .glass {
    border-color: rgba(148, 163, 184, 0.08);
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.with-border {
    border-bottom: 1px solid var(--color-border);
}

.nav-bar {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-block;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--color-primary);
}

.nav-link.is-active {
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-primary);
}

.theme-toggle,
.menu-toggle {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface-solid);
    color: var(--color-text);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
    background: var(--color-surface);
    border-color: var(--color-border-strong);
    transform: translateY(-1px);
}

.theme-toggle svg,
.menu-toggle svg {
    width: 1.3rem;
    height: 1.3rem;
}

.menu-toggle {
    display: none;
}

.mobile-menu {
    width: min(calc(100% - 2rem), var(--container-xl));
    margin: 0 auto 0.75rem;
    padding: 0.75rem;
    border-radius: 0 0 22px 22px;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-inner {
    display: grid;
    gap: 0.35rem;
}

.mobile-link {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
}

.hidden {
    display: none !important;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 8.5rem 0 4rem;
    position: relative;
}

.hero-visual {
    width: min(48vw, 560px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: 10% 8% 8% 8%;
    background: radial-gradient(circle at center, rgba(20, 184, 166, 0.24), transparent 62%);
    filter: blur(26px);
    z-index: 0;
}

.hero-visual img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    display: block;
    border-radius: 32px;
    box-shadow: 0 28px 80px rgba(15, 118, 110, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.05);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    margin: 0 0 1.5rem;
    font-size: clamp(3rem, 8vw, 5.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-text,
.section-text,
.header-text {
    max-width: 42rem;
    margin: 0 auto;
    color: var(--color-text-soft);
    font-size: 1.08rem;
    line-height: 1.8;
}

.trust-strip {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.trust-item {
    background: var(--color-surface-solid);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 1.35rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.trust-item strong {
    display: block;
    font-size: clamp(1.4rem, 2vw, 2rem);
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.trust-item span {
    color: var(--color-text-soft);
    font-size: 0.93rem;
}

.hero-actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.button,
.button-secondary,
.button-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        background-color 0.22s ease,
        border-color 0.22s ease;
}

/* shine sweep */
.button::after,
.button-secondary::after,
.button-inline::after {
    content: '';
    position: absolute;
    inset: -2px;
    transform: translateX(-120%);
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.28) 35%,
        rgba(255, 255, 255, 0.08) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.button:hover::after,
.button-secondary:hover::after,
.button-inline:hover::after {
    opacity: 1;
    animation: btnShine 0.8s ease forwards;
}

@keyframes btnShine {
    to { transform: translateX(120%); }
}

.button {
    background: linear-gradient(135deg, var(--color-primary), #0ea5a4);
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 118, 110, 0.24);
}

.button:hover {
    background: linear-gradient(135deg, var(--color-primary-strong), #0f766e);
    transform: translateY(-2px);
}

.button-secondary,
.button-inline {
    background: var(--color-surface-solid);
    color: var(--color-text);
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.button-secondary:hover,
.button-inline:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.button-inline {
    border-radius: 16px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
}

.section-subtitle {
    margin: 0 0 1rem;
    color: var(--color-primary);
    font-size: 1.35rem;
    font-weight: 700;
}

.about-copy p {
    margin: 0 0 1.5rem;
    color: var(--color-text-soft);
    line-height: 1.8;
}

.language-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
}

.language-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--color-text-soft);
}

.bullet-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--color-secondary);
    flex: none;
}

.info-card {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card-corner {
    position: absolute;
    inset: 0 0 auto auto;
    width: 8rem;
    height: 8rem;
    background: #2563eb75;
    border-bottom-left-radius: 100%;
    transition: transform 0.25s ease;
}

.info-card:hover .card-corner {
    transform: scale(1.08);
}

.info-card-content {
    position: relative;
    z-index: 1;
}

.card-title {
    margin: 0 0 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.card-title svg {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--color-primary);
}

.timeline {
    border-left: 2px solid rgba(59, 130, 246, 0.32);
    padding-left: 1rem;
}

.timeline h4 {
    margin: 0;
    font-size: 1.15rem;
}

.timeline-meta {
    margin: 0.35rem 0;
    color: var(--color-primary);
    font-size: 0.92rem;
    font-weight: 600;
}

.timeline-location {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.project-note {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    color: var(--color-text-soft);
    font-size: 0.94rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.skill-card {
    padding: 1.5rem;
    background: var(--color-surface-solid);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.skill-card.wide {
    grid-column: span 2;
}

.skill-card h3 {
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.1rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
}

.tag-blue { background: rgba(59, 130, 246, 0.14); color: #1d4ed8; }
.tag-yellow { background: rgba(234, 179, 8, 0.16); color: #a16207; }
.tag-cyan { background: rgba(6, 182, 212, 0.14); color: #0f766e; }
.tag-red { background: rgba(239, 68, 68, 0.14); color: #b91c1c; }
.tag-purple { background: rgba(168, 85, 247, 0.14); color: #7e22ce; }
.tag-orange { background: rgba(249, 115, 22, 0.15); color: #c2410c; }
.tag-sky { background: rgba(14, 165, 233, 0.15); color: #0369a1; }
.tag-green { background: rgba(34, 197, 94, 0.14); color: #15803d; }
.tag-emerald { background: rgba(16, 185, 129, 0.14); color: #047857; }
.tag-indigo { background: rgba(99, 102, 241, 0.14); color: #4338ca; }
.tag-rose { background: rgba(244, 63, 94, 0.14); color: #be123c; }
.tag-slate,
.tag-neutral { background: rgba(148, 163, 184, 0.16); color: #475569; }
.tag-primary { background: rgba(59, 130, 246, 0.12); color: var(--color-primary); }

.dark .tag-blue { color: #bfdbfe; }
.dark .tag-yellow { color: #fde68a; }
.dark .tag-cyan { color: #a5f3fc; }
.dark .tag-red { color: #fecaca; }
.dark .tag-purple { color: #e9d5ff; }
.dark .tag-orange { color: #fdba74; }
.dark .tag-sky { color: #bae6fd; }
.dark .tag-green { color: #bbf7d0; }
.dark .tag-emerald { color: #a7f3d0; }
.dark .tag-indigo { color: #c7d2fe; }
.dark .tag-rose { color: #fecdd3; }
.dark .tag-slate,
.dark .tag-neutral { color: #d8e2ef; }
.dark .tag-primary { color: #bfdbfe; }

.skills-cta {
    margin-top: 4rem;
    text-align: center;
}

.contact {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #0f172a 58%, #111827);
    color: #fff;
}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(17, 24, 39, 0.08));
    pointer-events: none;
}

.contact-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.contact h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.contact p {
    max-width: 42rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    line-height: 1.8;
}

.contact-cards {
    margin: 2.5rem 0 2.75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 18rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.contact-card:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Contact form */
.contact-form {
    max-width: 42rem;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.contact-form button {
    align-self: center;
}

@media (max-width: 720px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .blob {
        animation: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

.contact-card svg {
    width: 1.45rem;
    height: 1.45rem;
    flex: none;
}

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

.social-link {
    color: rgba(219, 234, 254, 0.92);
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
    color: #fff;
    transform: translateY(-2px);
}

.social-link svg {
    width: 2rem;
    height: 2rem;
}

.page-header {
    padding: 8.5rem 0 2.5rem;
    text-align: center;
}

.page-header h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.7rem, 6vw, 4.2rem);
}

.projects-section {
    padding: 1rem 0 6rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface-solid);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    position: relative;
}

/* subtle glow ring */
.project-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-md) + 2px);
    background: radial-gradient(400px circle at 20% 0%, rgba(59, 130, 246, 0.18), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

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

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-strong);
}

.project-cover {
    position: relative;
    min-height: 13rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.project-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.05);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card:hover .project-cover::after {
    opacity: 1;
}

.project-cover h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    transition: transform 0.25s ease;
}

.project-card:hover .project-cover h3 {
    transform: scale(1.05);
}

.cover-blue { background: linear-gradient(135deg, #dbeafe, #c7d2fe); color: #1e3a8a; }
.cover-cyan { background: linear-gradient(135deg, #cffafe, #bfdbfe); color: #155e75; }
.cover-indigo { background: linear-gradient(135deg, #e0e7ff, #f3e8ff); color: #312e81; }
.cover-rose { background: linear-gradient(135deg, #ffe4e6, #ffedd5); color: #881337; }
.cover-teal { background: linear-gradient(135deg, #ccfbf1, #d1fae5); color: #134e4a; }
.cover-violet { background: linear-gradient(135deg, #ede9fe, #fae8ff); color: #5b21b6; }
.cover-amber { background: linear-gradient(135deg, #fef3c7, #ffedd5); color: #92400e; }
.cover-zinc { background: linear-gradient(135deg, #e4e4e7, #d4d4d8); color: #18181b; }

/* التدرجات المحسّنة لكل مشروع */
.dark .cover-blue {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #bfdbfe;
}

.dark .cover-cyan {
    background: linear-gradient(135deg, #0e7490, #06b6d4);
    color: #cffafe;
}

.dark .cover-indigo {
    background: linear-gradient(135deg, #3730a3, #6366f1);
    color: #c7d2fe;
}

.dark .cover-rose {
    background: linear-gradient(135deg, #9f1239, #f43f5e);
    color: #ffe4e6;
}

.dark .cover-teal {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #ccfbf1;
}

.dark .cover-violet {
    background: linear-gradient(135deg, #5b21b6, #8b5cf6);
    color: #e9d5ff;
}

.dark .cover-amber {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    color: #fef3c7;
}

.dark .cover-zinc {
    background: linear-gradient(135deg, #3f3f46, #71717a);
    color: #f4f4f5;
}   

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.project-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.project-top h3 {
    margin: 0;
    font-size: 1.28rem;
}

.project-link {
    color: var(--color-text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.project-link:hover {
    color: var(--color-primary);
    transform: translateY(-1px);
}

.project-link svg {
    width: 1.45rem;
    height: 1.45rem;
}

.project-description {
    margin: 0;
    color: var(--color-text-soft);
    line-height: 1.75;
    font-size: 0.96rem;
}

.tag-list.compact .tag {
    padding: 0.38rem 0.72rem;
    border-radius: 10px;
    font-size: 0.78rem;
}

/* Skeleton loading */
.skeleton-card {
    pointer-events: none;
}

.skeleton-card .project-cover h3 {
    color: transparent;
}

.skeleton-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--color-border) 25%, var(--color-surface-soft) 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
    width: 60%;
    height: 10px;
}

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

.site-footer {
    padding: 2rem 1rem;
    background: var(--color-footer);
    text-align: center;
    color: #94a3b8;
}

.site-footer p {
    margin: 0.35rem 0;
}

.footer-location {
    color: #64748b;
}

.blob-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: move 10s infinite alternate;
}

.dark .blob {
    opacity: 0.28;
}

.blob-1 {
    top: -8%;
    left: -10%;
    width: 24rem;
    height: 24rem;
    background: rgba(59, 130, 246, 0.42);
}

.blob-2 {
    right: -12%;
    bottom: -10%;
    width: 31rem;
    height: 31rem;
    background: rgba(6, 182, 212, 0.34);
}


@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(20px, 30px) scale(1.12);
    }
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    70% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.99);
    filter: blur(6px);
    transition:
        opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms),
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms),
        filter 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms);
    will-change: transform, opacity, filter;
}

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

@media (max-width: 1024px) {
    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        flex-direction: column;
        min-height: auto;
    }

    .hero-visual {
        width: min(92vw, 560px);
    }

    .trust-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-header {
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
}

@media (max-width: 720px) {
    .section {
        padding: 4rem 0;
    }

    .hero {
        padding-top: 7.5rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 14vw, 4rem);
        line-height: 1.06;
    }

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

    .button,
    .button-secondary,
    .button-inline {
        width: 100%;
    }

    .contact-card {
        min-width: 0;
        width: 100%;
        justify-content: center;
    }

    .trust-items {
        grid-template-columns: 1fr;
    }

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

    .skill-card.wide {
        grid-column: auto;
    }

    .section-heading {
        gap: 1rem;
    }

    .project-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu {
        width: min(calc(100% - 1rem), var(--container-xl));
    }

    .brand {
        font-size: 1.6rem;
    }

    .nav-bar {
        min-height: 4rem;
    }
}
