:root {
    /* Color Palette - Earthy Heritage (Earthy Tones) */
    --color-bg: #151311;
    /* Deep Umber/Brown-Black */
    --color-surface: #1f1c1a;
    /* Warm Earthy Surface */
    --color-primary: #a3ad73;
    /* Sophisticated Olive Green */
    --color-primary-dim: #687042;
    /* Deep Olive */
    --color-accent: #7c5c42;
    /* Warm Earthy Brown */

    --color-text-main: #f0f0f0;
    --color-text-muted: #a0a0a0;
    --color-text-secondary: var(--color-text-muted);
    --color-text-dim: var(--color-text-muted);
    --color-text-strong: #ffffff;
    --color-on-primary: #000000;
    --color-warning: #e0a650;

    /* Lines, tints and bars (light mode redefines them in css/theme.css) */
    --color-line-faint: rgba(255, 255, 255, 0.05);
    --color-line: rgba(255, 255, 255, 0.08);
    --color-line-strong: rgba(255, 255, 255, 0.18);
    --color-line-bold: rgba(255, 255, 255, 0.3);
    --color-tint-faint: rgba(255, 255, 255, 0.02);
    --color-tint: rgba(255, 255, 255, 0.05);
    --color-tint-strong: rgba(255, 255, 255, 0.1);
    --color-nav: rgba(15, 14, 13, 0.9);
    --color-nav-solid: rgba(15, 14, 13, 0.98);
    --color-panel: rgba(21, 19, 17, 0.98);
    --color-ghost: rgba(0, 0, 0, 0.3);
    --color-input: rgba(0, 0, 0, 0.25);

    /* Typography */
    --font-display: 'Amiri', serif;
    /* For poetic headings */
    --font-heading: 'Noto Kufi Arabic', sans-serif;
    /* For structural headings */
    --font-body: 'IBM Plex Sans Arabic', sans-serif;
    /* For body text */

    --container-width: 1280px;
    --header-height: 80px;

    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

html {
    scroll-behavior: smooth;
}

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

/* Background System */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/site-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax-like feel */
    z-index: -5;
    filter: brightness(0.35) sepia(0.5) blur(0px);
    /* Darkened and warmed for earthy feel challenge挑战 */
}

/* Overlay for Grain/Texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/stardust.png');
    /* Subtle grain */
    opacity: 0.1;
    z-index: -4;
    pointer-events: none;
}

/* Typography Utilities */
h1,
h2,
h3 {
    color: var(--color-text-main);
    margin-bottom: 1rem;
}

h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1.2;
    font-weight: 700;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    border-right: 4px solid var(--color-primary);
    padding-right: 15px;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
    position: relative;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--color-nav);
    /* Glassy Dark */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-line-faint);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-primary);
    font-weight: 700;
}

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

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--color-text-main);
    opacity: 0.7;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--color-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-fast);
}

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

/* Home Icon Specific Styles */
.nav-links a i.bx-home-alt {
    font-size: 1.4rem;
    vertical-align: middle;
}

/* Photo Overlay */
.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.photo-overlay i {
    font-size: 3rem;
    color: white;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

/* Text Link Styling */
.text-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.text-link:hover {
    color: var(--color-text-main);
}

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

/* Dark gradient fade at bottom of hero */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to top, var(--color-bg), transparent);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    animation: fadeUp 1s ease-out;
}

.hero-tagline {
    font-family: var(--font-heading);
    color: var(--color-primary);
    letter-spacing: 2px;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
}

.hero-quote {
    text-align: center;
    margin-top: 50px;
    font-size: 2.5rem;
    color: var(--color-primary);
    font-family: var(--font-display);
    line-height: 1.4;
    font-weight: 700;
}

.hero-buttons {
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 34px;
    border-radius: 2px;
    /* Sharp edges for classic feel */
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: white;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-line-bold);
    color: var(--color-text-strong);
    background: var(--color-ghost);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Feature Grid (Cards) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.grid-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

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

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-line-faint);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition-fast);
    position: relative;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary-dim);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-image-medium {
    height: 280px;
}

.card-image-tall {
    height: 300px;
}

.card-image-large {
    height: 350px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
    opacity: 0.9;
    max-width: 100%;
    display: block;
}

.card:hover .card-image img {
    transform: scale(1.05);
    opacity: 1;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 3rem;
    color: white;
    opacity: 0;
    transition: var(--transition-fast);
}

.card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-content {
    padding: 24px;
}

.meta-date {
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.card h3 {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tags span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--color-tint);
    color: var(--color-text-muted);
    border-radius: 50px;
}

/* About Section Specifics */
.about-section-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 4px;
    filter: grayscale(100%);
    transition: var(--transition-slow);
    box-shadow: 20px 20px 0 var(--color-primary-dim);
    /* Offset border style */
}

.about-image:hover img {
    filter: grayscale(0);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

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

/* Detail View (Modal-ish) */
.detail-view {
    min-height: 100vh;
    padding-top: 120px;
}

.video-large {
    width: 100%;
    aspect-ratio: 21/9;
    background: black;
    border-radius: 8px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .about-section-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-section {
        height: auto;
        padding: 150px 0;
    }
}

/* Utility Classes */
.container-narrow {
    max-width: 900px;
}

.about-site-content {
    margin-top: 40px;
    line-height: 2;
}

.search-results-container {
    padding: 40px 20px;
    min-height: 60vh;
}

.video-detail-section {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--color-bg);
}

.album-view-section {
    background: var(--color-surface);
    padding-top: 100px;
    min-height: 100vh;
}

.video-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.video-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

.video-details {
    line-height: 1.9;
    color: var(--color-text-muted);
}