@charset "UTF-8";

/* Variables */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fdcb6e;
    --text-color: #ffffff;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --white: #ffffff;
    --transition: all 0.3s ease;
    --nav-height: 64px;
    --container-max: 1100px;
    --container-pad: clamp(1rem, 4vw, 1.5rem);
    --section-pad-y: clamp(3.5rem, 10vw, 6.25rem);
    --radius-lg: 30px;
    --radius-md: 20px;
    --radius-sm: 12px;
    --touch-min: 44px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    /* Breakpoints: sm ≤767 | md tablet 768–1023 | lg ≥1024 */
    --bp-tablet: 768px;
    --bp-desktop: 1024px;
}

@media (min-width: 768px) {
    :root {
        --nav-height: 72px;
    }
}

@media (min-width: 1200px) {
    :root {
        --nav-height: 80px;
        --container-max: 1200px;
        --radius-lg: 30px;
    }
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    right: 1rem;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%), 
        radial-gradient(at 0% 50%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 50%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 50%, hsla(339,49%,30%,1) 0, transparent 50%), 
        radial-gradient(at 0% 100%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 100%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 100%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-size: 200% 200%;
    background-attachment: scroll;
    animation: meshGradient 15s ease infinite;
    overflow-x: hidden;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

body.nav-open {
    overflow: hidden;
    touch-action: none;
}

@media (min-width: 769px) {
    body {
        background-attachment: fixed;
    }
}

@media (max-width: 768px) {
    body {
        animation: none;
        background-size: 100% 100%;
    }
}

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

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-inline: var(--container-pad);
}

/* Glass Card Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
    .glass-card {
        border-radius: var(--radius-md);
    }
}

/* Nav backdrop (mobile menu) */
.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-backdrop:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: calc(var(--nav-height) + var(--safe-top));
    padding-top: var(--safe-top);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.navbar .container,
.nav-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    gap: 12px;
}

.lang-toggle {
    padding: 8px 14px;
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(108, 92, 231, 0.2);
    color: var(--secondary-color);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    cursor: pointer;
    transition: var(--transition);
    margin-inline-start: auto;
    flex-shrink: 0;
}

.lang-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
}

html[dir="ltr"] .hero-arrow {
    transform: scaleX(-1);
}

html[dir="ltr"] .nav-links li {
    margin-right: 0;
    margin-left: 25px;
}

.logo {
    font-size: clamp(1.05rem, 3.8vw, 1.8rem);
    font-weight: 900;
    color: var(--secondary-color);
    flex-shrink: 1;
    min-width: 0;
    line-height: 1.2;
}

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-right: 25px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    color: var(--white);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.navbar.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.navbar.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.navbar.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100dvh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: calc(var(--nav-height) + var(--safe-top) + 1rem);
    padding-bottom: calc(2rem + var(--safe-bottom));
}

.hero-shapes .shape {
    position: absolute;
    width: clamp(44px, 12vw, 65px);
    height: clamp(44px, 12vw, 65px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1.8rem;
    animation: float 6s infinite ease-in-out;
    z-index: 1;
}

.s1 { top: 12%; right: 8%; animation-delay: 0s; }
.s2 { bottom: 18%; left: 6%; animation-delay: 2s; }
.s3 { top: 32%; left: 8%; animation-delay: 4s; }

@media (max-width: 480px) {
    .hero-shapes .shape {
        opacity: 0.65;
        font-size: 1.2rem;
    }
    .s3 { display: none; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-30px) rotate(15deg); }
}

.hero-card {
    padding: clamp(1.5rem, 5vw, 3.75rem);
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-badge {
    background: rgba(108, 92, 231, 0.2);
    color: var(--secondary-color);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 25px;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.hero h1 {
    font-size: clamp(2rem, 10vw, 5rem);
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.15;
    word-break: break-word;
}

.text-gradient {
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.15rem, 4.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.35;
}

.palestine-flag {
    color: #4caf50;
    border-bottom: 4px solid #ff5252;
}

.hero p {
    font-size: clamp(1rem, 3.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
    max-width: 36ch;
    margin-inline: auto;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    width: 100%;
}

.hero-btns .btn-main,
.hero-btns .btn-outline {
    width: 100%;
    max-width: 320px;
    text-align: center;
    justify-content: center;
}

@media (min-width: 480px) {
    .hero-btns .btn-main,
    .hero-btns .btn-outline {
        width: auto;
        min-width: 160px;
    }
}

.btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: var(--white);
    padding: 14px 28px;
    min-height: var(--touch-min);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    transition: var(--transition);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.4);
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.btn-main:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--secondary-color);
}

.btn-main:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--white);
    padding: 14px 28px;
    min-height: var(--touch-min);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-5px);
}

/* Gallery Section */
.gallery-section {
    padding: var(--section-pad-y) 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.75rem, 6vw, 3.5rem);
    font-weight: 900;
    margin-bottom: clamp(2rem, 6vw, 3.75rem);
    line-height: 1.2;
    padding-inline: 0.25rem;
    background: linear-gradient(45deg, var(--white), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-transform: uppercase;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 4vw, 1.875rem);
}

@media (min-width: 540px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (min-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.gallery-item {
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.gallery-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.image-wrapper {
    height: clamp(200px, 55vw, 300px);
    overflow: hidden;
}

.image-placeholder {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 15px;
}

.item-info {
    padding: 25px;
}

.item-meta-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.item-work-no {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
}

.item-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    background: rgba(108, 92, 231, 0.22);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(108, 92, 231, 0.35);
}

.item-category-badge i {
    opacity: 0.9;
}

/* About Section */
.about-section {
    padding: var(--section-pad-y) 0;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    padding: clamp(1.5rem, 5vw, 3.75rem);
    text-align: center;
}

@media (min-width: 1200px) {
    .about-content {
        flex-direction: row;
        text-align: start;
        align-items: center;
    }
}

.profile-placeholder {
    width: clamp(180px, 50vw, 300px);
    height: clamp(180px, 50vw, 300px);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7rem;
    color: var(--secondary-color);
    border: 5px solid var(--glass-border);
    box-shadow: 15px 15px 0 var(--primary-color);
}

.about-text {
    width: 100%;
    min-width: 0;
}

.about-text h2 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    margin-bottom: 25px;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 30px;
}

@media (min-width: 540px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skill-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.skill-card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.skill-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
}

.sub-title {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
}

.section-lead {
    text-align: center;
    max-width: min(560px, 100%);
    margin: clamp(-2rem, -4vw, -2.5rem) auto clamp(1.5rem, 5vw, 2.5rem);
    padding-inline: 0.5rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    line-height: 1.65;
}

/* Nav scroll state */
.navbar.is-scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.nav-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

.nav-links a.is-active {
    color: var(--accent-color);
}

/* Stats */
.stats-section {
    padding: 0 0 60px;
    margin-top: -40px;
    position: relative;
    z-index: 3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 3vw, 1.25rem);
}

@media (min-width: 769px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-6px);
    background: rgba(108, 92, 231, 0.15);
}

.stat-number {
    display: block;
    font-size: clamp(2rem, 7vw, 2.8rem);
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1.1;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-color);
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

/* Gallery filters */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 20px;
    min-height: var(--touch-min);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.gallery-item.is-hidden {
    display: none;
}

.gallery-item .gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.06);
}

.gallery-item .view-btn {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(15, 23, 42, 0.55);
    color: var(--white);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gallery-item .image-wrapper {
    position: relative;
}

.gallery-item:hover .view-btn,
.gallery-item .view-btn:focus-visible {
    opacity: 1;
}

@media (hover: none), (pointer: coarse) {
    .gallery-item .view-btn {
        opacity: 1;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.35) 45%, transparent 70%);
        align-items: flex-end;
        padding-bottom: 1rem;
    }
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.item-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(108, 92, 231, 0.25);
    color: var(--secondary-color);
    border: 1px solid rgba(108, 92, 231, 0.35);
}

.item-year {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.item-year i {
    color: var(--secondary-color);
    opacity: 0.85;
}

.gallery-loading {
    grid-column: 1 / -1;
    padding: 60px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.gallery-loading i {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.gallery-error {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    color: #fca5a5;
}

/* Projects */
.projects-section {
    padding: var(--section-pad-y) 0;
    background: rgba(0, 0, 0, 0.15);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 4vw, 1.75rem);
}

@media (min-width: 600px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.project-card {
    padding: 32px;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    background: rgba(108, 92, 231, 0.12);
}

.project-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.project-tech span {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
}

/* Journey / Timeline */
.journey-section {
    padding: var(--section-pad-y) 0;
}

.timeline {
    list-style: none;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    padding-right: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding: 28px 32px 28px 24px;
    margin-bottom: 24px;
    margin-right: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -28px;
    top: 32px;
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-item h3 {
    font-size: 1.35rem;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

/* Lightbox */
.lightbox {
    border: none;
    padding: 0;
    max-width: min(92vw, 900px);
    width: 100%;
    background: transparent;
}

.lightbox::backdrop {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    padding: 0;
    overflow: hidden;
    position: relative;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: min(55vh, 70dvh);
    object-fit: contain;
    display: block;
    background: #0f172a;
}

.lightbox-info {
    padding: 24px 28px;
}

.lightbox-info h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.lightbox-meta {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.8);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

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

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.char-count {
    font-weight: 400;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    float: left;
}

main section,
main header {
    scroll-margin-top: calc(var(--nav-height) + var(--safe-top) + 16px);
}

/* Footer */
.site-footer {
    padding: clamp(2.5rem, 6vw, 3.75rem) 0 calc(2.5rem + var(--safe-bottom));
    border-top: 1px solid var(--glass-border);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--secondary-color);
}

.footer-logo span {
    color: var(--white);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

.footer-copy {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    left: calc(20px + var(--safe-left));
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--primary-color);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 12px 28px rgba(108, 92, 231, 0.45);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

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

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-4px);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Draw board */
.draw-section {
    padding: var(--section-pad-y) 0;
    background: rgba(0, 0, 0, 0.12);
}

.draw-panel {
    padding: clamp(0.75rem, 3vw, 1.5rem);
    overflow: hidden;
}

.draw-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.draw-toolbar::-webkit-scrollbar {
    height: 4px;
}

.draw-toolbar > * {
    flex-shrink: 0;
    scroll-snap-align: start;
}

@media (min-width: 769px) {
    .draw-toolbar {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.draw-tool {
    padding: 10px 16px;
    min-height: var(--touch-min);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.draw-tool.is-active,
.draw-tool:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.draw-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.draw-label input[type="color"] {
    width: 44px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.draw-label input[type="range"] {
    width: min(100px, 28vw);
    min-width: 72px;
    accent-color: var(--primary-color);
}

.draw-label input[type="color"] {
    min-width: var(--touch-min);
    min-height: var(--touch-min);
}

.draw-presets {
    display: flex;
    gap: 8px;
}

.draw-presets button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    cursor: pointer;
    padding: 0;
}

.draw-save-btn {
    padding: 10px 22px !important;
    font-size: 0.95rem !important;
    margin-inline-start: auto;
}

.draw-canvas-wrap {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #1e293b;
}

#draw-canvas {
    display: block;
    width: 100%;
    touch-action: none;
    cursor: crosshair;
}

.project-link {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 22px;
    font-size: 0.95rem;
}

@media (max-width: 767px) {
    .logo {
        order: 0;
        flex: 1 1 auto;
    }

    .lang-toggle {
        order: 2;
    }

    .nav-toggle {
        order: 3;
    }
}

@media (max-width: 768px) {
    .draw-save-btn {
        margin-inline-start: auto;
    }
}

/* Goals Section */
.goals-section {
    padding: var(--section-pad-y) 0;
}

.goals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 4vw, 2.5rem);
}

@media (min-width: 600px) {
    .goals-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.goal-item {
    padding: clamp(1.5rem, 5vw, 2.5rem);
    text-align: center;
    transition: var(--transition);
}

.goal-item:hover {
    transform: scale(1.05);
    background: rgba(108, 92, 231, 0.2);
}

.goal-icon {
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 25px;
}

/* Contact Section */
.contact-section {
    padding: var(--section-pad-y) 0;
    padding-bottom: calc(var(--section-pad-y) + var(--safe-bottom));
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 6vw, 3.75rem);
    padding: clamp(1.5rem, 5vw, 3.75rem);
}

.contact-info,
.contact-form-container {
    width: 100%;
    min-width: 0;
}

.contact-info .section-title {
    text-align: center;
    margin-bottom: 1rem;
}

@media (min-width: 1200px) {
    .contact-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    .contact-info .section-title {
        text-align: start;
    }

    .contact-info {
        flex: 0 0 38%;
    }

    .contact-form-container {
        flex: 1;
    }
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

@media (min-width: 1200px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-links a {
    width: var(--touch-min);
    height: var(--touch-min);
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.8rem;
    color: var(--secondary-color);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: rotate(360deg);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-field label {
    font-weight: 700;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.form-status {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}

.form-status:not(.visually-hidden) {
    background: rgba(108, 92, 231, 0.25);
    border: 1px solid rgba(108, 92, 231, 0.4);
}

.form-status.form-status--error:not(.visually-hidden) {
    background: rgba(255, 82, 82, 0.15);
    border-color: rgba(255, 82, 82, 0.35);
}

.contact-form input,
.contact-form textarea {
    padding: 14px 18px;
    min-height: var(--touch-min);
    border-radius: var(--radius-sm);
    font-size: 16px;
    border: 1px solid var(--glass-border);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-family: 'Cairo', sans-serif;
    width: 100%;
}

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

.contact-form .btn-main {
    width: 100%;
}

@media (min-width: 480px) {
    .contact-form .btn-main {
        width: auto;
        min-width: 180px;
    }
}

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

/* ─── Desktop navigation ─── */
@media (min-width: 1200px) {
    .nav-backdrop {
        display: none !important;
    }

    .nav-toggle {
        display: none !important;
    }

    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        max-height: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        overflow: visible;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .nav-links li {
        margin-right: 20px;
        border-bottom: none;
    }

    .nav-links a {
        display: inline;
        padding: 0;
        min-height: auto;
        font-size: 0.95rem;
    }

    .hero-btns {
        flex-direction: row;
    }

    .hero-btns .btn-main,
    .hero-btns .btn-outline {
        width: auto;
        max-width: none;
    }
}

/* ─── Mobile navigation (هاتف فقط) ─── */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: calc(var(--nav-height) + var(--safe-top));
        left: 0;
        right: 0;
        z-index: 1001;
        margin: 0;
        padding: 12px var(--container-pad) calc(16px + var(--safe-bottom));
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s ease;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links li {
        margin: 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        min-height: var(--touch-min);
        padding: 12px 10px;
        font-size: 1.05rem;
    }

    .navbar.is-open .nav-links {
        max-height: calc(100dvh - var(--nav-height) - var(--safe-top));
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .profile-placeholder {
        margin-inline: auto;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 20px 14px;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .item-info {
        padding: 18px;
    }

    .project-card {
        padding: 22px;
    }

    .timeline-item {
        margin-right: 16px;
        padding: 18px 16px;
    }

    .lightbox-close {
        top: calc(12px + var(--safe-top));
        left: calc(12px + var(--safe-left));
        width: 48px;
        height: 48px;
    }

    .lightbox-info {
        padding: 18px 16px;
    }

    .footer-nav {
        gap: 12px 16px;
    }

    .footer-copy {
        font-size: 0.82rem;
        line-height: 1.5;
        padding-inline: 0.5rem;
    }
}

@media (max-width: 360px) {
    .lang-toggle {
        padding-inline: 10px;
    }
}

@media (min-width: 1200px) {
    .hero-card {
        padding: 3.75rem 4rem;
    }

    .gallery-grid {
        gap: 2rem;
    }
}

/* Gallery responsive images */
.image-wrapper picture {
    display: block;
    width: 100%;
    height: 100%;
}

.image-wrapper .gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-content picture {
    display: block;
    line-height: 0;
}

/* PWA install — bottom sheet */
.pwa-install-backdrop {
    position: fixed;
    inset: 0;
    z-index: 997;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.pwa-install-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.pwa-install {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 998;
    padding: 0 calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
    max-width: 480px;
    margin-inline: auto;
    pointer-events: none;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.pwa-install.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pwa-install-sheet {
    position: relative;
    padding: 20px 18px 18px;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
    border-bottom: none;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(108, 92, 231, 0.25);
    overflow: hidden;
}

.pwa-install-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.pwa-install-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: var(--touch-min);
    height: var(--touch-min);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.pwa-install-close:hover {
    background: var(--primary-color);
}

.pwa-install-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
    padding-inline-end: 36px;
}

.pwa-install-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.pwa-install-heading {
    flex: 1;
    min-width: 0;
}

.pwa-install-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 8px;
    background: rgba(253, 203, 110, 0.18);
    color: var(--accent-color);
    border: 1px solid rgba(253, 203, 110, 0.35);
}

.pwa-install-heading h2 {
    font-size: clamp(1.05rem, 4vw, 1.2rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 6px;
}

.pwa-install-heading p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.5;
}

.pwa-install-benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

.pwa-install-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.pwa-install-benefits li i {
    width: 28px;
    text-align: center;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.pwa-ios-guide {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(108, 92, 231, 0.12);
    border: 1px dashed rgba(108, 92, 231, 0.45);
}

.pwa-ios-guide.is-open {
    animation: pwaFadeIn 0.25s ease;
}

@keyframes pwaFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwa-ios-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.pwa-ios-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pwa-ios-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}

.pwa-ios-steps li i {
    margin-top: 2px;
    color: var(--accent-color);
    width: 20px;
    flex-shrink: 0;
}

.pwa-install-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pwa-install-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.pwa-install-actions .pwa-dismiss {
    width: 100%;
    min-height: var(--touch-min);
    border-color: var(--glass-border);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

body.has-pwa-banner .back-to-top {
    bottom: calc(280px + var(--safe-bottom));
    transition: bottom 0.32s ease;
}

@media (min-width: 480px) {
    .pwa-install {
        bottom: 20px;
        padding-bottom: var(--safe-bottom);
        transform: translateY(24px);
    }

    .pwa-install.is-visible {
        transform: translateY(0);
    }

    .pwa-install-sheet {
        border-radius: var(--radius-lg);
        border-bottom: 1px solid var(--glass-border);
    }

    body.has-pwa-banner .back-to-top {
        bottom: calc(24px + var(--safe-bottom));
    }
}

@media (display-mode: standalone) {
    .pwa-install,
    .pwa-install-backdrop {
        display: none !important;
    }
}
