:root {
    /* HCode Inspired Palette */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f8f8f8;
    --color-text-primary: #232323;
    --color-text-secondary: #828282;
    --color-accent: #e6af2a;
    /* HCode Gold */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-dark-overlay: rgba(0, 0, 0, 0.5);

    /* Fonts */
    --font-primary: 'Open Sans', sans-serif;
    /* Body */
    --font-heading: 'Montserrat', sans-serif;
    /* Headings */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1.5rem;
    --spacing-md: 3rem;
    --spacing-lg: 6rem;
    --spacing-xl: 10rem;

    /* Header Height */
    --header-height: 100px;
    /* Increased for bigger logo */

    /* Transitions */
    --transition-fast: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.5s ease;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.7;
    font-size: 14px;
    font-weight: 400;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 34px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-text-primary);
    color: var(--color-text-primary);
}

.btn-outline:hover {
    background-color: var(--color-text-primary);
    color: var(--color-white);
}

/* Header - White Solid (Modified per user request) */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: var(--header-height);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: var(--color-white);
    /* Always white */
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
    transition: padding var(--transition-fast);
}

.site-header.scrolled {
    padding: 0 30px;
    /* Slight shrink on scroll */
    height: 90px;
}

.logo-img {
    height: 70px;
    /* Bigger logo */
    width: auto;
    display: block;
    /* User asked for white background explicitly, though header is white.
       Adding it just in case image has transparency and needs a mat. */
    background-color: white;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-text-primary);
    /* Dark text */
}

.site-header.scrolled .logo a {
    color: var(--color-text-primary);
    /* Dark on scroll */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 11px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-text-primary);
    /* Dark text */
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-links a:hover::after {
    width: 100%;
}

.site-header.scrolled .nav-links a {
    color: var(--color-text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--color-text-primary);
    /* Dark text */
    letter-spacing: 1px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-btn .bar {
    width: 22px;
    height: 2px;
    background-color: var(--color-text-primary);
    /* Dark bars */
}

/* Hero Section (Parallax) */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-image: url('../assets/hero_image.jpeg');
    /* Real hero image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    color: var(--color-white);
}

/* Dark overlay for readability */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    /* Large HCode style */
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--color-white);
}

.hero-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    letter-spacing: 1px;
    font-weight: 300;
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.7;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Sections Common */
section {
    padding: var(--spacing-lg) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--color-accent);
    margin: 15px auto 0;
}

/* Projects - Grid / Masonry Look */
.projects-section {
    background-color: var(--color-bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 column layout */
    gap: 30px;
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #eee;
    /* Placeholder bg */
}

.project-image {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-smooth);
    background-image: url('../assets/project-placeholder.jpg');
    /* Generic */
}

/* Hover Effect: Zoom Image, Show Overlay */
.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    text-align: center;
    padding: 20px;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: transform var(--transition-fast);
}

.project-overlay p {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform var(--transition-fast) 0.1s;
}

.project-card:hover .project-overlay h3,
.project-card:hover .project-overlay p {
    transform: translateY(0);
}

/* About Section */
.about-section {
    background-color: var(--color-bg-secondary);
}

.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--color-text-secondary);
}

.about-image {
    flex: 1;
    height: 400px;
    background-color: #ddd;
    /* Placeholder */
}

/* Contact Section */
.contact-wrapper {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
    padding-top: 20px;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--color-text-primary);
}

.info-item p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.contact-form {
    flex: 2;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e5e5e5;
    background-color: #fcfcfc;
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-text-primary);
    background-color: #fff;
    outline: none;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #888;
    padding: 40px 0;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* RTL Support - Override for Arabic */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* [dir="rtl"] .logo removed to allow natural flex flipping */

/* Important: In RTL, HCode menus might look better reversed handled by nav-links logic below */

[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .project-card:hover .project-overlay {
    text-align: center;
    /* Generally keep centered for cards */
}

/* Responsive */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        flex-direction: column;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0 20px;
        background-color: var(--color-black);
        /* Solid header on mobile usually better or keep transparent */
    }

    .nav-links {
        display: none;
        /* Mobile menu implementation usually toggles this */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        flex-direction: column;
    }
}