:root {
    --bg-dark: #000000;
    --bg-panel: #0a0a0a;
    --neon-green: #39FF14;
    --neon-glow: rgba(57, 255, 20, 0.6);
    --text-white: #FFFFFF;
    --text-gray: #CCCCCC;
    --font-head: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* --- Matrix Background Canvas --- */
#matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
}

/* --- Typography & Utilities --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neon-text {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-glow);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.section-padding {
    padding: 100px 0;
}

/* --- Header / Nav --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(57, 255, 20, 0.1);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 5px var(--neon-glow));
}

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

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-family: var(--font-head);
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-green);
    transition: var(--transition);
}

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

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

.nav-links a.active {
    color: var(--neon-green);
}

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-head);
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--neon-green);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 25px var(--neon-green);
    transform: translateY(-3px);
}

.btn-outline {
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    background: transparent;
}

.btn-outline:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 20px var(--neon-green);
}

/* --- Footer --- */
/* --- Footer Layout --- */
footer {
    background: #000 !important;
    padding: 80px 0 40px !important;
    border-top: 1px solid rgba(57, 255, 20, 0.2);
    width: 100%;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid !important;
    /* Explicit 4 columns: Logo | Links | Contact | Newsletter */
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr !important;
    gap: 40px !important;
    margin-bottom: 50px;
    align-items: start;
    text-align: left !important;
}

/* 1. Logo Section */
.footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    display: block;
    margin-bottom: 25px;
}

.footer-logo img {
    height: 60px;
    width: 60px;
    object-fit: contain;
    padding: 10px;
    background: rgba(57, 255, 20, 0.05);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 8px;
}

.footer-info p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 300px;
    margin: 0;
    text-align: left;
}

/* 2. & 3. Links & Contact Sections */
.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-links h4,
.footer-contact h4,
.footer-newsletter h4 {
    color: var(--neon-green);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 30px;
    font-family: var(--font-head);
    text-transform: uppercase;
    text-align: left;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 15px;
}

.footer-links a,
.footer-contact a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--neon-green);
    padding-left: 5px;
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact svg {
    flex-shrink: 0;
    stroke: var(--neon-green);
}

.social-title {
    margin-top: 30px !important;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(57, 255, 20, 0.05);
    border: 1px solid rgba(57, 255, 20, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 0;
}

.social-links a:hover {
    background: var(--neon-green);
    border-color: var(--neon-green);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(57, 255, 20, 0.4);
    padding: 0;
}

.social-links svg {
    fill: var(--neon-green);
    transition: fill 0.3s ease;
}

.social-links a:hover svg {
    fill: #000;
}

/* 4. Newsletter Section */
.footer-newsletter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-newsletter p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: left;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.newsletter-form input {
    width: 100%;
    padding: 15px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--neon-green);
    background: rgba(20, 20, 20, 1);
}

.subscribe-btn {
    width: 100%;
    padding: 15px;
    background: var(--neon-green);
    border: none;
    color: #000;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: #2ecc11;
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.4);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 50px !important;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.footer-bottom p {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin: 0;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Utility Classes for Inline Styles --- */
.nav-tagline {
    border: 1px solid var(--neon-green);
    padding: 8px 15px;
    color: var(--neon-green);
    font-family: var(--font-head);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    height: fit-content;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    background: transparent;
    z-index: 1;
}

/* Hero Background Layer */
.hero-bg-layer {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 45%;
    max-width: 600px;
    z-index: 2;
    opacity: 0.5;
    pointer-events: none;
}

.hero-bg-image {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(1.1) saturate(1.3);
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

.hero-section .container {
    padding-left: 20px;
    /* محاذي للوجو */
    padding-right: 20px;
}

.hero-grid-container {
    width: 100%;
    position: relative;
    z-index: 10;
}

.hero-text {
    position: relative;
    z-index: 10;
    padding: 20px 0;
    padding-left: 0;
    max-width: 650px;
    text-align: left;
    margin-left: 0;
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
}

.hero-title {
    position: relative;
    z-index: 2;
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-precision {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 25px;
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: 50%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img-styled {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover for immersive feel on desktop too */
    object-position: center;
    filter: brightness(0.8);
}

.stats-section {
    background: rgba(57, 255, 20, 0.02);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
}

.newsletter-desc {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.newsletter-btn {
    width: 100%;
    padding: 10px;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header-img {
    width: 30px;
    height: 30px;
}

.chatbot-header-title {
    margin: 0;
    font-size: 0.9rem;
}

.chatbot-status {
    font-size: 0.7rem;
    color: var(--neon-green);
}

.cta-section {
    background: linear-gradient(to top, #050505, transparent);
}

.cta-container {
    text-align: center;
}

.cta-desc {
    color: var(--text-gray);
    margin-bottom: 30px;
}

.portfolio-supabase-note {
    margin-top: 80px;
    padding: 40px;
    background: rgba(57, 255, 20, 0.05);
    border: 1px dashed var(--neon-green);
    text-align: center;
}

.portfolio-supabase-desc {
    color: var(--text-gray);
    margin-top: 10px;
}

.portfolio-code-block {
    display: block;
    margin-top: 20px;
    background: #000;
    padding: 15px;
    color: #fff;
    font-size: 0.8rem;
    text-align: left;
}

.contact-info-desc {
    color: var(--text-gray);
    margin-bottom: 30px;
}

.contact-submit-btn {
    width: 100%;
}

/* --- Roadmap / Services Styles --- */
.roadmap-container {
    position: relative;
    max-width: 1000px;
    margin: 50px auto 0;
}

.path-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.service-item {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 150px;
    opacity: 0;
    transform: translateY(30px);
}

.service-item.right {
    flex-direction: row-reverse;
}

.service-content {
    width: 45%;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--neon-green);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.service-item.right .service-content {
    border-left: none;
    border-right: 3px solid var(--neon-green);
    text-align: right;
}

.service-content:hover {
    transform: scale(1.02);
    background: rgba(57, 255, 20, 0.05);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--neon-green);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.service-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--neon-green);
}

.service-content p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* --- About Section Styles --- */
.bio-box {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px;
    position: relative;
    background: rgba(10, 10, 10, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.bio-box::before,
.bio-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--neon-green);
    border-style: solid;
    transition: all 0.3s;
}

.bio-box::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.bio-box::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.about-welcome {
    margin-bottom: 20px;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.about-btn-container {
    margin-top: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .service-item {
        flex-direction: column !important;
        margin-bottom: 80px;
    }

    .service-content {
        width: 90%;
        margin-top: 50px;
        text-align: center !important;
        border: 1px solid var(--neon-green) !important;
    }

    .path-svg {
        display: block;
        opacity: 0.6;
        /* Slightly transparent on mobile for better readability */
    }

    .service-icon {
        position: relative;
        left: auto;
        transform: none;
        margin-bottom: -70px;
        z-index: 5;
    }

    .bio-box {
        padding: 30px 20px;
    }
}


/* --- Mobile Menu Styles --- */
.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--neon-green);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.mobile-nav-links a {
    color: var(--text-white);
    font-family: var(--font-head);
    font-size: 2rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.mobile-nav-links a:hover {
    color: var(--neon-green);
    transform: scale(1.1);
}

.mobile-menu-overlay.active .mobile-nav-links a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-links a:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-nav-links a:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu-overlay.active .mobile-nav-links a:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu-overlay.active .mobile-nav-links a:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu-overlay.active .mobile-nav-links a:nth-child(5) {
    transition-delay: 0.5s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Add mobile menu later if needed */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-left {
        gap: 15px;
    }

    .nav-tagline {
        font-size: 0.65rem;
        padding: 6px 10px;
    }

    .hero-section {
        height: 100vh;
        min-height: 600px;
    }

    .hero-bg-layer {
        right: 50%;
        transform: translate(50%, -50%);
        width: 70%;
        max-width: 400px;
        opacity: 0.3;
    }
}

.hero-grid-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
}

.hero-text {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding: 0;
    text-align: left;
    z-index: 10;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-precision {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    line-height: 1.4;
    max-width: 100%;
}

.hero-description {
    display: block;
    /* Show description as in the image */
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 25px;
    max-width: 100%;
    line-height: 1.4;
    text-transform: none;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-img-styled {
    object-fit: cover;
    object-position: center top;
    /* Focus on the face/upper body */
    filter: brightness(0.5);
    width: 100%;
    height: 100%;
}

.hero-btn-group {
    justify-content: flex-start;
    /* Align buttons to the left */
    gap: 15px;
}

.hero-btn-group .btn {
    padding: 10px 18px;
    font-size: 0.8rem;
}

.footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
}

.footer-info p {
    margin: 0 auto;
}