/* GROW font (self-hosted) */
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap;
  src: url("/assets/fonts/readex-pro-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap;
  src: url("/assets/fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* GROW brand */
    --bg-color: #050E11;
    --card-bg: #0C1D23;
    --text-primary: #F2F5F8;
    --text-secondary: #BAC2CE;
    --accent: #FC6D41;
    --accent-hover: #E4572C;
    --border: #163038;
    --gradient: linear-gradient(135deg, #FC6D41 0%, #FFB596 100%);
    --button-bg: #163038;
}

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

body {
    font-family: 'Readex Pro', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

/* Header */
header {
    padding: 4rem 0;
    text-align: center;
    background: radial-gradient(circle at top, #10252C 0%, #050E11 70%);
}

.profile-monogram {
    width: 100px;
    height: 100px;
    background: var(--gradient);
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(252, 109, 65, 0.3);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #BAC2CE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 500;
}

.contact-info {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
}

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

/* Sections */
section {
    padding: 4rem 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    inset-inline-start: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* About & Experience */
.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
}

.experience-item {
    border-left: 2px solid var(--border);
    padding-left: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-color);
}

.exp-date {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
    display: block;
}

.exp-role {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.exp-company {
    color: var(--text-secondary);
}

/* Language switch */
.lang-switch {
    position: absolute;
    top: 1.25rem;
    inset-inline-end: 1.25rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lang-switch:hover {
    color: var(--accent);
    border-color: var(--accent);
}

header {
    position: relative;
}

[dir="rtl"] h1 {
    line-height: 1.3;
}

/* GROW logo */
.brand-logo {
    display: block;
    width: 220px;
    height: auto;
    margin: 0 auto 1.5rem;
}

/* Icon-style card images (app icons rather than screenshots) */
.card-image-wrapper.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #10252C 0%, #050E11 100%);
}

.card-image.icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

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

@media (max-width: 600px) {
    .container { padding: 0 1rem; }
    header { padding: 4.5rem 0 3rem; }
    .lang-switch { top: 1rem; inset-inline-end: 1rem; }
    h1 { font-size: 2.5rem; }
    .role { font-size: 1.1rem; }
    .contact-info { gap: 0.75rem 1.5rem; }
    .projects-grid { grid-template-columns: 1fr; }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(252, 109, 65, 0.1);
    color: var(--accent);
    border-radius: 99px;
}

.store-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.store-btn {
    flex: 1;
    padding: 0.75rem;
    background: var(--button-bg);
    color: white;
    text-align: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
}

.store-btn:hover {
    background: var(--accent);
    color: #1C0A03;
    transform: translateY(-2px);
}

.store-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: var(--bg-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* Print Styles */
@media print {
    :root {
        --bg-color: #ffffff;
        --card-bg: #ffffff;
        --text-primary: #000000;
        --text-secondary: #475569;
        --border: #e2e8f0;
        --button-bg: #e2e8f0;
    }

    body {
        background: white;
        color: black;
    }

    header {
        padding: 2rem 0;
        background: none;
    }

    h1 {
        -webkit-text-fill-color: black;
        background: none;
        color: black;
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        display: block;
        /* Fallback */
        display: grid;
    }

    .project-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .store-btn {
        border: 1px solid #94a3b8;
        color: black;
        background: white;
    }

    a {
        text-decoration: none;
        color: black;
    }
}
/* ===================== Motion (GROW) =====================
   Native scroll, no pins, no blur: only transform / opacity animate. */
:root {
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --cyan: #35B3C8;
}

/* Scroll progress */
.progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 50;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

[dir="rtl"] .progress {
    transform-origin: right;
}

/* Header: drifting brand glows + intro */
header {
    overflow: hidden;
    isolation: isolate;
}

header::before,
header::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    pointer-events: none;
}

header::before {
    top: -260px;
    left: 8%;
    background: radial-gradient(circle, rgba(252, 109, 65, 0.22) 0%, rgba(252, 109, 65, 0) 65%);
    animation: drift-a 14s ease-in-out infinite alternate;
}

header::after {
    bottom: -320px;
    right: 6%;
    background: radial-gradient(circle, rgba(53, 179, 200, 0.16) 0%, rgba(53, 179, 200, 0) 65%);
    animation: drift-b 18s ease-in-out infinite alternate;
}

@keyframes drift-a {
    to { transform: translate(140px, 90px) scale(1.15); }
}

@keyframes drift-b {
    to { transform: translate(-160px, -70px) scale(1.2); }
}

.brand-logo {
    animation: logo-in 1s var(--ease) both, logo-float 5s ease-in-out 1.2s infinite alternate;
}

@keyframes logo-in {
    from { opacity: 0; scale: 0.8; }
}

@keyframes logo-float {
    to { translate: 0 -8px; }
}

header h1,
header .role,
header .contact-info,
.lang-switch {
    animation: rise 0.9s var(--ease) both;
}

header h1 { animation-delay: 0.15s; }
header .role { animation-delay: 0.3s; }
header .contact-info { animation-delay: 0.45s; }
.lang-switch { animation-delay: 0.6s; }

@keyframes rise {
    from { opacity: 0; translate: 0 22px; }
}

.contact-info a {
    padding: 0.35rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 99px;
    transition: color 0.3s, border-color 0.3s, translate 0.3s var(--ease);
}

.contact-info a:hover {
    border-color: var(--accent);
    translate: 0 -2px;
}

/* Services ticker */
.ticker {
    overflow: hidden;
    border-block: 1px solid var(--border);
    background: rgba(12, 29, 35, 0.6);
    padding: 0.85rem 0;
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    width: max-content;
    animation: ticker 38s linear infinite;
}

.ticker-track span {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.ticker-track .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(252, 109, 65, 0.15);
    flex: none;
}

.ticker-track { padding-inline-end: 1.75rem; }

@keyframes ticker {
    to { transform: translateX(-50%); }
}

[dir="rtl"] .ticker-track {
    animation-direction: reverse;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

/* Reveal on scroll (only when motion.js runs) */
.js-motion .rv {
    opacity: 0;
    translate: 0 32px;
}

.js-motion .rv.in {
    opacity: 1;
    translate: none;
}

.js-motion h2.rv,
.js-motion .about-text.rv {
    transition: opacity 0.8s var(--ease), translate 0.9s var(--ease);
}

h2::after {
    transform-origin: left;
}

[dir="rtl"] h2::after {
    transform-origin: right;
}

.js-motion h2.rv::after {
    transform: scaleX(0);
    transition: transform 0.9s var(--ease) 0.25s;
}

.js-motion h2.rv.in::after {
    transform: none;
}

/* Cards: rise in, tilt on desktop, lift on hover */
.project-card {
    --rx: 0deg;
    --ry: 0deg;
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s,
        opacity 0.75s var(--ease) var(--d, 0ms), translate 0.85s var(--ease) var(--d, 0ms);
}

.project-card:hover {
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px);
    box-shadow: 0 24px 40px -12px rgba(252, 109, 65, 0.25);
}

.js-motion .project-card .tag {
    opacity: 0;
    translate: 0 8px;
    transition: opacity 0.5s var(--ease), translate 0.5s var(--ease);
}

.js-motion .project-card.in .tag {
    opacity: 1;
    translate: none;
    transition-delay: calc(var(--d, 0ms) + 350ms);
}

.js-motion .project-card.in .tag:nth-child(2) { transition-delay: calc(var(--d, 0ms) + 430ms); }
.js-motion .project-card.in .tag:nth-child(3) { transition-delay: calc(var(--d, 0ms) + 510ms); }

/* App cards: icon bob + light sweep on hover */
.card-image.icon {
    animation: bob 4s ease-in-out infinite alternate;
}

@keyframes bob {
    to { translate: 0 -6px; }
}

.project-card.app .card-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
    transform: translateX(-110%);
    pointer-events: none;
}

.project-card.app:hover .card-image-wrapper::after {
    transform: translateX(110%);
    transition: transform 0.9s var(--ease);
}

/* Website cards: browser frame + the page scrolls like a live preview */
.browser-bar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 2;
    height: 24px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    background: #10252C;
    border-bottom: 1px solid var(--border);
}

.browser-bar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
    flex: none;
}

.browser-bar i:first-child { background: var(--accent); }

.browser-bar b {
    flex: 1;
    margin-inline: 8px 26px;
    font-weight: 400;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card.site .card-image {
    position: absolute;
    top: 24px;
    left: 0;
    height: auto;
    transition: transform 1s var(--ease);
}

.project-card.site:hover .card-image {
    transform: translateY(calc(-100% + 176px));
    transition: transform 5.5s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.project-card.site.pan .card-image {
    animation: pan 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) 0.5s both;
}

@keyframes pan {
    0%, 8% { transform: none; }
    48%, 58% { transform: translateY(calc(-100% + 176px)); }
    100% { transform: none; }
}

.store-btn {
    transition: background 0.3s ease, color 0.3s ease, translate 0.3s var(--ease);
}

.store-btn:hover {
    transform: none;
    translate: 0 -2px;
}

@media (max-width: 600px) {
    header::before, header::after { width: 380px; height: 380px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media print {
    .progress, .ticker, .browser-bar { display: none; }
    .rv, .tag { opacity: 1 !important; translate: none !important; }
    .project-card.site .card-image { position: static; }
}
