@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@700;800;900&family=Cairo:wght@400;700;900&display=swap');

:root {
    --bg: #000000;
    --fg: #ffffff;
    --accent: #ffcc00;
    /* Changed back to yellow for consistency */
    --accent-yellow: #ffcc00;
    --gray: #888888;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

a {
    transition: 0.3s;
    text-decoration: none;
    color: inherit;
}

a:visited {
    color: inherit;
}

/* Override for kit buttons to ensure black text */
a.kit-btn,
a.kit-btn:visited {
    color: #000 !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for all browsers */
html,
body {
    -ms-overflow-style: none !important;
    /* IE and Edge */
    scrollbar-width: none !important;
    /* Firefox */
}

/* NOISE OVERLAY */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05;
    pointer-events: none;
    z-index: 500;
}

/* SCROLL PROGRESS BAR */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    z-index: 10002;
    transition: width 0.1s;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
}


/* CUSTOM CURSOR */
.custom-cursor {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.1s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.3s var(--ease), background 0.3s, width 0.3s, height 0.3s;
}

/* COMEDIC BOUNCY INTRO */
#intro {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#intro.hide {
    transform: translateY(-100%) rotate(5deg);
    pointer-events: none;
    visibility: hidden;
    /* Added to ensure it doesn't block anything */
}

.intro-logo-wrap {
    margin-bottom: 20px;
}

.intro-logo {
    width: 120px;
    height: auto;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
}

.intro-logo.active {
    animation: jellyPop 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.bouncy-text-container {
    text-align: center;
}

.bouncy-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
}

/* Surname slightly smaller or different color */
.bouncy-row.surname {
    margin-top: 5px;
}

.bouncy-row span {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 6rem);
    color: #fff;
    display: inline-block;
    transform: translateY(-200%);
    opacity: 0;
}

.surname span {
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--accent);
}

/* The Funny Drop Animation */
.bouncy-row span.drop-in {
    animation: funnyDrop 1.2s cubic-bezier(0.35, 1.6, 0.5, 0.8) forwards;
}

@keyframes jellyPop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.2) rotate(10deg);
    }

    80% {
        transform: scale(0.9) rotate(-5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes funnyDrop {
    0% {
        opacity: 0;
        transform: translateY(-300px) scale(0.5);
    }

    30% {
        opacity: 1;
        transform: translateY(20px) scale(1.3, 0.6);
        /* Squash on impact */
    }

    50% {
        transform: translateY(-40px) scale(0.8, 1.2);
        /* Rebound stretch */
    }

    70% {
        transform: translateY(10px) scale(1.1, 0.9);
        /* Settle squash */
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



/* LANGUAGE SWITCHER */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--fg);
    padding: 8px 15px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.lang-btn:hover {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}



/* RTL & ARABIC TYPOGRAPHY */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

body.rtl .side-menu {
    left: auto;
    right: -100%;
}

body.rtl .side-menu.active {
    right: 0;
}

body.rtl .hero-content h1 {
    letter-spacing: 0;
}

body.rtl .btn {
    letter-spacing: 0;
    font-weight: 700;
}

/* Motarkaa Arabic Headings */
body.rtl h1,
body.rtl h2,
body.rtl h3 {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s var(--ease);
}

header.active {
    opacity: 1;
    pointer-events: auto;
}

.logo-wrap {
    height: 40px;
}

.main-logo {
    height: 100%;
    width: auto;
    display: block;
    filter: brightness(1);
    transition: transform 0.3s var(--ease);
}

.main-logo:hover {
    transform: scale(1.1);
}

.menu-toggle {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-toggle span {
    width: 35px;
    height: 1px;
    background: #fff;
    transition: 0.4s var(--ease);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
}

/* SIDE MENU */
.side-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transform: translateX(100%);
    transition: 0.8s var(--ease);
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu ul {
    list-style: none;
    text-align: center;
}

.side-menu li {
    margin: 2rem 0;
}

.side-menu a {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.side-menu a:hover {
    color: var(--accent);
}

/* SECTIONS COMMON */
section {
    padding: 100px 5%;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header p {
    font-size: 0.8rem;
    letter-spacing: 5px;
    color: var(--accent-yellow);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 60px;
}

/* HERO */
.hero-section {
    background: #000;
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -5px;
    margin-bottom: 40px;
    color: #fff;
}

.hero-content h1 span {
    display: inline-block;
    /* Comedic Movement */
    animation: comedicJiggle 4s ease-in-out infinite;
}

.hero-content h1 span:nth-child(even) {
    animation-delay: 0.5s;
}

@keyframes heroNeon {
    from {
        text-shadow: 0 0 10px rgba(255, 204, 0, 0.5),
            0 0 20px rgba(255, 204, 0, 0.3);
    }

    to {
        text-shadow: 0 0 20px rgba(255, 204, 0, 0.8),
            0 0 40px rgba(255, 204, 0, 0.6),
            0 0 60px rgba(255, 204, 0, 0.4);
    }
}

@keyframes comedicJiggle {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    10% {
        transform: translate(-2px, 2px) rotate(-1deg);
    }

    20% {
        transform: translate(2px, -2px) rotate(1deg);
    }

    30% {
        transform: translate(-2px, -2px) rotate(-1deg);
    }

    40% {
        transform: translate(2px, 2px) rotate(1deg);
    }

    50% {
        transform: scale(1.05) translate(0, -5px);
    }

    /* Comedic hop */
    60% {
        transform: scale(0.95) translate(0, 0);
    }
}

.hero-content .outline {
    -webkit-text-stroke: 1px #fff;
    color: transparent;
    animation: heroNeonOutline 3s ease-in-out infinite alternate !important;
}

@keyframes heroNeonOutline {
    from {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
    }

    to {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    }
}

.hero-bio {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 600px;
    margin-bottom: 50px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 1.2rem 3rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: 0.3s;
}

.btn.primary {
    background: #fff;
    color: #000;
}

.btn.secondary {
    border: 1px solid #333;
    color: #fff;
}

.btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ABOUT RE-DESIGNED */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 25px;
}

.tech-stack {
    font-size: 2.22rem;
    color: #444;
    margin: 40px 0;
}

.software-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.software-icons i {
    color: var(--accent);
}

.software-icons span {
    font-weight: 800;
    letter-spacing: 2px;
}

/* Horizontal Stats */
.about-stats-horizontal {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    border-top: 1px solid #111;
    padding-top: 30px;
}

.stat-mini h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.stat-mini p {
    color: var(--accent-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    margin-top: 5px;
}

/* Premium Image Wrap */
.about-image-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: -140px;
    /* Pulls image up level with Who is Mohamed heading */
}

.image-inner {
    position: relative;
    width: 100%;
    max-width: 450px;
    border-radius: 30px;
    overflow: hidden;
    background: #080808;
    border: 1px solid #111;
}

.image-inner img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(0.2);
    transition: 0.5s var(--ease);
}

.image-inner:hover img {
    filter: grayscale(0);
    transform: scale(1.05);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.05) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

/* PORTFOLIO */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.work-card {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    border-radius: 15px;
    /* Added rounded corners for premium look */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.6s;
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    filter: brightness(0.8);
}

.work-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(255, 204, 0, 0.1);
    border-color: var(--accent);
}

.work-card:hover img {
    transform: scale(1.1);
    filter: brightness(1);
}

.work-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.work-card:hover .work-info {
    opacity: 1;
    transform: translateY(0);
}

.work-info p {
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.4s var(--ease) 0.1s;
}

.work-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--fg);
    opacity: 0;
    transform: translateY(10px);
    transition: 0.4s var(--ease) 0.2s;
}

.work-card:hover .work-info p,
.work-card:hover .work-info h3 {
    opacity: 1;
    transform: translateY(0);
}

/* VIDEO */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.video-card {
    position: relative;
    aspect-ratio: 9/16;
    background: #111;
    overflow: hidden;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: 0.3s;
}

.video-card:hover .video-info {
    opacity: 1;
}

.video-info h3 {
    font-size: 1.2rem;
    text-align: center;
    padding: 20px;
}

/* KITS */
.kit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.kit-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
}

.kit-icon {
    font-size: 3rem;
    color: var(--accent-yellow);
    margin-bottom: 20px;
}

.kit-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.kit-card p {
    color: #888;
    margin-bottom: 30px;
}

.kit-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: #fff;
    color: #000 !important;
    text-decoration: none;
    font-weight: 800;
    border-radius: 10px;
    transition: 0.3s;
}

.kit-btn.disabled {
    background: #222;
    color: #444;
}

/* CONTACT */
.contact-wrap {
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass);
    padding: 50px;
    border-radius: 30px;
}

.form-group {
    margin-bottom: 30px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #222;
    padding: 20px;
    color: #fff;
    font-family: inherit;
    font-size: 1.1rem;
    border-radius: 10px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.submit-btn {
    width: 100%;
    padding: 20px;
    background: #fff;
    color: #000;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 10px;
    transition: 0.3s;
}

.submit-btn:hover {
    background: var(--accent);
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 1s var(--ease);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* FOOTER */
footer {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-social a {
    font-size: 2rem;
    color: #fff;
    transition: 0.3s;
}

.footer-social a:hover {
    color: var(--accent-yellow);
}

/* MODALS */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
}

.modal-content {
    width: 90%;
    max-width: 1400px;
    height: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-video {
    width: 100%;
    height: auto;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    background: #000;
}

.close {
    position: fixed;
    top: 30px;
    right: 40px;
    font-size: 4rem;
    color: #fff;
    cursor: pointer;
    z-index: 21000;
    transition: 0.3s;
    line-height: 1;
}

.close:hover {
    color: var(--accent);
    transform: scale(1.1);
}


/* QUIZ */
.quiz-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 6000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quiz-container {
    width: 100%;
    max-width: 600px;
    background: #111;
    padding: 50px;
    border-radius: 30px;
    border: 1px solid var(--accent);
    text-align: center;
}

#quiz-start h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.quiz-timer {
    font-size: 2rem;
    color: var(--accent);
    font-weight: 900;
    margin-bottom: 20px;
}

.options-grid {
    display: grid;
    gap: 15px;
    margin-top: 30px;
}

.option-btn {
    padding: 20px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 15px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.2rem;
    transition: 0.3s;
}

.option-btn:hover {
    background: #222;
    border-color: var(--accent);
}

@media (max-width: 1024px) {

    .about-grid,
    .work-grid,
    .video-grid,
    .kit-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        background-image: none;
    }

    .about-image-wrap {
        margin-top: 0;
        margin-bottom: 50px;
    }

    .about-stats-horizontal {
        flex-wrap: wrap;
        gap: 30px;
    }
}

/* MOBILE OPTIMIZATIONS (UP TO 768PX) */
@media (max-width: 768px) {
    * {
        cursor: auto !important;
    }

    .custom-cursor,
    .cursor-follower {
        display: none !important;
    }



    header {
        padding: 15px 5%;
        gap: 10px;
    }

    .header-right {
        gap: 10px;
    }



    .logo-wrap {
        height: 30px;
    }

    .hero-content h1 {
        font-size: clamp(3rem, 12vw, 5.5rem);
        letter-spacing: -2px;
        line-height: 0.9;
    }

    .hero-bio {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    section {
        padding: 60px 5%;
    }

    .about-grid {
        display: flex;
        flex-direction: column;
    }

    .about-image-wrap {
        margin-top: 0;
        margin-bottom: 40px;
        order: -1;
    }

    .about-stats-horizontal {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-mini h3 {
        font-size: 2.22rem;
    }

    .kit-card {
        padding: 30px 20px;
    }

    .contact-wrap {
        padding: 30px 20px;
    }

    .footer-social {
        gap: 20px;
    }

    .footer-social a {
        font-size: 1.5rem;
    }

    .close {
        top: 20px;
        right: 20px;
        font-size: 3rem;
    }

    body.rtl .hero-content h1 {
        font-size: clamp(2.5rem, 10vw, 4.5rem);
    }

    .quiz-container {
        padding: 30px 20px;
    }

    .quiz-start h2 {
        font-size: 2.5rem;
    }

    .bouncy-name span {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
}