:root {
    /* Color System - Dark Mode (Default) */
    --primary: #1E90FF;
    /* Electric Blue */
    --secondary: #0A0A0A;
    /* Deep Black */
    --accent: #00E5FF;
    /* Neon Cyan */
    --neutral: #F4F4F4;
    /* Soft Grey */

    /* Semantic Variables */
    --bg-body: var(--secondary);
    --bg-card: #141414;
    --bg-alt: #0F0F0F;
    --text-main: var(--neutral);
    --text-muted: #A0A0A0;
    --border-color: #2a2a2a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(30, 144, 255, 0.15);
}

[data-theme="light"] {
    /* Light Mode Overrides */
    --bg-body: var(--neutral);
    --bg-card: #FFFFFF;
    --bg-alt: #EAEAEA;
    --text-main: #0A0A0A;
    --text-muted: #555555;
    --border-color: #E0E0E0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --glow: 0 0 15px rgba(30, 144, 255, 0.1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.rtl-text {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

.section {
    padding: 80px 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Typography & Accents */
.accent {
    color: var(--accent);
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--text-main);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: var(--bg-body);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--accent);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    background: rgba(10, 10, 10, 0.85);
    /* Semi-transparent default dark */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

[data-theme="light"] .navbar {
    background: rgba(244, 244, 244, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-nav):hover::after {
    width: 100%;
}

.btn-nav {
    padding: 0.5rem 1.2rem;
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
}

#lang-toggle {
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    width: 35px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(30, 144, 255, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(0, 229, 255, 0.05), transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-text-content {
    flex: 1;
    max-width: 650px;
}

.hero-image-content {
    flex: 0 0 320px;
    margin-left: 2rem;
    display: flex;
    justify-content: center;
}

.hero-img-placeholder {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 30% 30%, #333, #0a0a0a);
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 40px rgba(30, 144, 255, 0.2);
    position: relative;
    overflow: hidden;
    animation: fadeUp 1.2s ease-out forwards, glowPulse 4s infinite alternate;
}

.hero-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes glowPulse {
    from {
        box-shadow: 0 0 30px rgba(30, 144, 255, 0.2);
    }

    to {
        box-shadow: 0 0 50px rgba(0, 229, 255, 0.4);
    }
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.hero-section h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-section h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-slideshow {
    width: 100%;
    height: 400px;
    background: #000;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.about-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.about-slideshow .slide.active {
    opacity: 1;
    animation: slowZoom 6s linear infinite;
    /* Longer duration than transition for smoothness */
}

.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.6), transparent 50%);
    z-index: 2;
    pointer-events: none;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }

    /* Subtle zoom */
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.career-objective-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    background: rgba(30, 144, 255, 0.05);
    border-radius: 0 10px 10px 0;
}

.career-objective-box h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Skills Section */
.skill-list {
    margin-top: 1rem;
    padding: 0;
    list-style: none;
    text-align: center;
}

.skill-list li {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.service-card .skill-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.projects-grid.channels-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    /* Limit width to keep 2 items centered and looking good */
    margin: 0 auto;
}

.element-center {
    justify-content: center;
}

.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.project-image {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #000;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

.channel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .channel-overlay {
    opacity: 1;
}

.channel-overlay i {
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.project-cat {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-link {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.btn-link:hover {
    gap: 0.8rem;
}

/* Featured Video Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.video-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.1);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.video-preview-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.video-card:hover .video-preview-img {
    transform: scale(1.05);
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(30, 144, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
    transition: all 0.3s ease;
    z-index: 2;
}

.play-button-overlay i {
    color: #fff;
    font-size: 1.5rem;
    margin-left: 4px;
    /* Optical adjustment for play icon */
}

.video-thumbnail:hover .play-button-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--accent);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
}

.video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensures both vertical and horizontal videos fit within the 16:9 box without cropping */
    display: none;
    z-index: 5;
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-modal.show {
    opacity: 1;
    display: flex;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    /* Large container */
    background: #000;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.25);
    /* Cinematic Blue Glow */
    border: 1px solid rgba(0, 229, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.video-modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.close-modal:hover {
    color: var(--accent);
}

.video-wrapper {
    position: relative;
    width: 100%;
    /* 16:9 Aspect Ratio Base, but video will fit naturally */
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrapper video,
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Handles mixed aspect ratios cleanly */
    border: none;
}

/* Handle Vertical Videos better if needed */
.video-wrapper.is-vertical {
    aspect-ratio: 9 / 16;
    max-height: 80vh;
}



.video-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.1);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.thumb-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #111 0%, #222 100%);
    opacity: 0.8;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: var(--neutral);
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.video-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.contact-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.detail-item i {
    color: var(--accent);
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.footer-socials a:hover {
    color: var(--accent);
}

.back-to-top {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-top:hover {
    color: var(--primary);
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1.0s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-image-content {
        margin: 0 0 2rem 0;
        flex: 0 0 auto;
    }

    .hero-text-content {
        max-width: 100%;
    }

    .hero-section h1 {
        font-size: 3.5rem;
    }

    .hero-text {
        margin: 0 auto 2rem;
    }

    .cta-group {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-slideshow {
        height: 300px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title.text-left {
        text-align: center;
    }

    .contact-info {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-details {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        transition: right 1s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }



    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid.channels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-section h3 {
        font-size: 1.8rem;
    }



    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Localization Overrides (RTL) --- */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .nav-links a:not(.btn-nav)::after {
    left: auto;
    right: 0;
}

html[dir="rtl"] .career-objective-box {
    border-left: none;
    border-right: 4px solid var(--accent);
    border-radius: 10px 0 0 10px;
}

html[dir="rtl"] .hero-image-content {
    margin-left: 0;
    margin-right: 2rem;
}

html[dir="rtl"] .section-title.text-left {
    text-align: right;
}

html[dir="rtl"] .play-button-overlay i {
    margin-left: 0;
    margin-right: 4px;
    /* Optical adjustment swap */
}

/* Flip arrow icons for RTL natural flow */
html[dir="rtl"] .fa-arrow-right {
    transform: rotate(180deg);
}

/* Ensure Back To Top arrow doesn't rotate */
html[dir="rtl"] .back-to-top .fa-arrow-up {
    transform: none;
}

/* Responsive RTL adjustments */
@media (max-width: 968px) {
    html[dir="rtl"] .hero-image-content {
        margin-right: 0;
    }

    html[dir="rtl"] .section-title.text-left {
        text-align: center;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
        transition: left 0.5s ease;
    }

    html[dir="rtl"] .nav-links.active {
        left: 0;
        right: auto;
    }
}