:root {
    --bg-deep: #050510;
    --bg-card: #0a0a1a;
    --bg-overlay: rgba(5, 5, 16, 0.85);

    --accent-gold: #c5a059;
    --accent-gold-bright: #ffd700;
    --gradient-gold: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);

    --text-main: #e6f1ff;
    --text-muted: #8892b0;

    --font-heading: 'Playfair Display', serif;
    --font-heading-ar: 'Cairo', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-body-ar: 'Cairo', sans-serif;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

/* Revert cursor for touch devices */
@media (hover: none) and (pointer: coarse) {
    * {
        cursor: auto !important;
    }

    .cursor-follower {
        display: none !important;
    }
}

html {
    scroll-behavior: auto;
    /* Let GSAP/Lenis handle smooth scroll if used, or standard */
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Cursor */
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(197, 160, 89, 0.3);
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: difference;
}

.cursor-active {
    width: 50px;
    height: 50px;
    background: var(--accent-gold);
    border-color: transparent;
    mix-blend-mode: normal;
    opacity: 0.5;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

.text-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-title span {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    /* Standard property for compatibility */
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 10px 0;
    /* Reduced from 20px */
    z-index: 100;
    background: rgba(5, 5, 16, 0.9);
    /* Slightly more opaque */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo img {
    width: 80px;
    /* Reduced from 110px */
    height: auto;
    transition: transform 0.3s var(--ease-out);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    /* Removed dots */
    align-items: center;
    /* Align items vertically */
}

.nav-links li {
    list-style: none;
    /* Double check removal */
}

/* Standard Nav Item Styling */
.nav-links a.nav-item {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--text-main);
    text-decoration: none;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s var(--ease-out);
}

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

/* Language Switch Button Styling */
.lang-switch {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--accent-gold);
    border-radius: 25px;
    background: rgba(197, 160, 89, 0.1);
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lang-switch:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a2e 0%, #050510 70%);
    opacity: 0.8;
    z-index: -1;
}

/* Animated grain or lines could go here */

.hero-title {
    font-size: 6rem;
    line-height: 1.6;
    /* Increased from 1 to fix cutoff */
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* Extra buffer */
    opacity: 0;
    /* JS Reveal */
    transform: translateY(30px);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(20px);
}

/* Updated Investment Card with Image */
.doc-card {
    flex: 1 1 150px;
    /* Slightly wider */
    height: 150px;
    /* Fixed height for image */
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Text at bottom */
    align-items: flex-start;
    /* Left align text */
    text-align: left;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    padding: 30px;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: var(--card-bg);
    /* Set inline */
    transition: transform 0.6s;
    filter: brightness(0.6);
    z-index: 0;
}

.doc-card:hover::before {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.doc-card i {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.doc-card span {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    z-index: 2;
    font-weight: 700;
}

.doc-card::after {
    /* Gradient Overlay */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 1;
}

/* Magnetic Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 50px;
    /* Pillow shape */
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    /* JS Reveal */
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gold);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.btn-primary:hover {
    color: var(--bg-deep);
    border-color: var(--accent-gold);
}

.btn-primary:hover::before {
    transform: scaleX(1);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* About Section */
.about-section {
    padding: 150px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.about-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.about-image-wrapper:hover img {
    transform: scale(1.05);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.stats-row {
    display: flex;
    gap: 50px;
    margin-top: 40px;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--accent-gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Projects - Bento Grid */
.projects-section {
    padding: 100px 0;
    background: #080816;
}

.projects-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 350px);
    gap: 20px;
    margin-top: 50px;
}

.project-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: none;
    /* Custom cursor override */
}

/* First item spans 2 columns and full height rows on Desktop */
.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.project-details {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 2;
    transform: translateY(10px);
    transition: transform 0.3s var(--ease-out);
}

.project-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-gold);
    letter-spacing: 2px;
    margin-bottom: 5px;
    display: block;
}

.project-item h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: white;
}

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

.project-item:hover .project-details {
    transform: translateY(0);
}

/* Documents / Opportunities */
.section-docs {
    margin-top: 100px;
}

.docs-slider {
    display: flex;
    flex-wrap: wrap;
    /* Fallback for mobile, slider via JS maybe */
    gap: 20px;
    margin-top: 40px;
}

/* Old .doc-card styles removed in favor of new Image Card styles above */

/* Contact Section - Premium Design */
.contact-section {
    padding: 120px 0;
    background: linear-gradient(180deg, #080816 0%, #050510 100%);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.3), transparent);
}

/* Projects Grid Modern */
.projects-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 60px;
    column-gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .projects-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 20px;
        row-gap: 40px;
    }
}

@media (max-width: 768px) {
    .projects-grid-modern {
        grid-template-columns: 1fr;
        row-gap: 30px;
    }
}

/* Premium Contact Cards Grid */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.contact-card {
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.6), rgba(5, 5, 16, 0.8));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: rgba(197, 160, 89, 0.3);
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.15),
        0 0 80px rgba(197, 160, 89, 0.08);
}

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

.contact-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.1), rgba(197, 160, 89, 0.05));
    border: 2px solid rgba(197, 160, 89, 0.2);
    border-radius: 50%;
    position: relative;
    transition: all 0.4s ease;
}

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
}

.contact-icon i {
    font-size: 1.8rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: white;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.contact-card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

.contact-card a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-card a:hover {
    color: var(--accent-gold-bright);
    transform: translateX(3px);
}

/* Legacy Contact Wrapper Styles (for compatibility) */
.contact-wrapper {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.contact-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-top: 5px;
}

.contact-item h5 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: white;
}

.contact-item p,
.contact-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

/* Utility */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Mobile Menu Button */
.menu-btn {
    position: relative;
    display: none;
    /* Hidden on desktop */
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all .5s ease-in-out;
    z-index: 1001;
    /* Above overlay */
}

.menu-btn__burger {
    width: 25px;
    height: 2px;
    background: var(--text-main);
    border-radius: 5px;
    transition: all .5s ease-in-out;
}

.menu-btn__burger::before,
.menu-btn__burger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: var(--text-main);
    border-radius: 5px;
    transition: all .5s ease-in-out;
}

.menu-btn__burger::before {
    transform: translateY(-8px);
}

.menu-btn__burger::after {
    transform: translateY(8px);
}

/* Animation for Open State */
.menu-btn.open .menu-btn__burger {
    transform: translateX(-50px);
    background: transparent;
    box-shadow: none;
}

.menu-btn.open .menu-btn__burger::before {
    transform: rotate(45deg) translate(35px, -35px);
}

.menu-btn.open .menu-btn__burger::after {
    transform: rotate(-45deg) translate(35px, 35px);
}

/* Portfolio Layout */
.portfolio-section {
    margin-bottom: 120px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        /* Full width on mobile */
        gap: 15px;
    }

    .portfolio-section {
        margin-bottom: 80px;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease-out);
    z-index: 1000;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-item {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-main);
    text-decoration: none;
    display: block;
    margin: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: color 0.3s;
}

.mobile-menu-overlay.open .mobile-nav-item {
    animation: fadeInUp 0.5s forwards;
    /* Delays handled by nth-child in raw CSS or JS loop */
}

.mobile-menu-overlay.open .mobile-nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-menu-overlay.open .mobile-nav-item:nth-child(2) {
    animation-delay: 0.2s;
}

.mobile-menu-overlay.open .mobile-nav-item:nth-child(3) {
    animation-delay: 0.3s;
}

.mobile-menu-overlay.open .mobile-nav-item:nth-child(4) {
    animation-delay: 0.4s;
}

.mobile-nav-item:hover {
    color: var(--accent-gold);
}

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

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }

    .projects-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 300px);
    }

    .item-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Hide Desktop Nav */
    .menu-btn {
        display: flex;
    }

    /* Show Hamburger */

    .hero-title {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-grid-modern {
        display: flex;
        /* Stack on mobile */
        flex-direction: column;
        gap: 20px;
    }

    .project-item {
        height: 300px;
    }

    .contact-wrapper {
        padding: 30px;
    }

    .cursor-follower {
        display: none;
    }
}

/* RTL Adjustments */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;
}

html[dir="rtl"] .hero-content {
    text-align: center;
}

html[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-item {
    text-align: right;
}

/* Portfolio Sector Navigation */
.sector-nav {
    position: sticky;
    top: 100px;
    /* Aligns below the 100px navbar */
    z-index: 90;
    background: rgba(5, 5, 16, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    transition: background 0.3s ease;
}

.sector-nav .container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.sector-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sector-link:hover {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.sector-link.active {
    color: var(--accent-gold);
    font-weight: 700;
}

/* Ensure main navbar stays strictly on top */
.navbar {
    z-index: 1000 !important;
}

@media (max-width: 768px) {
    .sector-nav {
        top: 80px;
        /* Adjusted for smaller mobile navbar */
        padding: 10px 0;
    }

    .sector-nav .container {
        gap: 20px;
    }

    .sector-link {
        font-size: 0.8rem;
        letter-spacing: 0;
    }
}