:root {
    /* Color System - Tech meets Middle East */
    --primary: #00D9FF;        /* Cyan from Persian tiles */
    --accent: #FFD700;         /* Islamic gold */
    --deep: #1A0B2E;           /* Deep purple night */
    --glow: #00FFF0;           /* Techno-turquoise */
    --matrix-green: #00FF41;   /* Matrix effect */

    /* Gradients */
    --gradient-mesh: radial-gradient(at 40% 20%, hsla(174,100%,50%,0.3) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, hsla(189,100%,56%,0.2) 0px, transparent 50%);

    /* Typography */
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', monospace;
    --font-arabic: 'Noto Kufi Arabic', 'Inter', sans-serif;

    /* Spacing & Animation */
    --golden-ratio: 1.618;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --blur-amount: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0A0A0B;
        --surface: rgba(255, 255, 255, 0.03);
        --text: #E4E4E7;
    }
}

/* Warm hero theme (orange/peach) overrides */
.theme-hero {
    --primary: #FF8A3D;       /* warm orange */
    --accent: #FFC796;        /* peach */
    --glow: #FFA864;          /* soft orange glow */
    --matrix-green: #FFB15E;  /* warmed matrix tint */
    --gradient-mesh: radial-gradient(at 40% 20%, hsla(30,100%,65%,0.25) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, hsla(15,100%,60%,0.18) 0px, transparent 50%);
}

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

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    background-image: var(--gradient-mesh);
    min-height: 100vh;
}

/* Subtle global noise for depth */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/ filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.07' /%3E%3C/svg%3E");
    background-size: 120px 120px;
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}

/* Visually hidden (for accessible labels) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,1px,1px); white-space: nowrap; border: 0; }

/* Scroll progress indicator */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--accent), var(--primary)); z-index: 10000; box-shadow: 0 0 12px rgba(0,0,0,0.3); transition: width .1s linear; }

/* Layout containers */
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }
section { padding: 6rem 2rem; }
section + section { margin-top: 4rem; }
footer { text-align: center; padding: 2rem 1rem; border-top: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.15); }
.center-hero { min-height: 50vh; }

/* Home mission section tightened layout */
.home-mission { padding: 3rem 1.5rem; }
.home-mission .terminal-header { text-align: center; margin-bottom: .5rem; }
.home-mission .intro { max-width: 860px; margin: 0 auto 1rem; text-align: center; opacity: .9; }
.home-mission .bento-grid { padding: 0; max-width: 900px; margin: 0 auto 1.25rem; }
.home-mission .bento-item { text-align: center; }

/* Header and navigation */
header { position: relative; z-index: 10; background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0)); border-bottom: 1px solid rgba(255,255,255,0.08); }
header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 700; font-size: 1.5rem; color: var(--text); text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
nav a { font-family: var(--font-main); color: var(--text); font-weight: 500; letter-spacing: .02em; text-decoration: none; }
nav a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Mobile menu */
.menu-toggle { display: none; margin-right: .5rem; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: var(--text); position: relative; }
.menu-toggle .menu-icon, .menu-toggle .menu-icon::before, .menu-toggle .menu-icon::after { display: block; position: absolute; left: 50%; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transform: translateX(-50%); transition: transform .2s ease, opacity .2s ease; }
.menu-toggle .menu-icon { top: 50%; }
.menu-toggle .menu-icon::before { content: ''; top: -7px; }
.menu-toggle .menu-icon::after { content: ''; top: 7px; }
.menu-toggle:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,217,255,0.1) inset; }
@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  nav { display: none; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: .5rem; padding-top: .5rem; }
}

/* Theme toggle button */
.theme-toggle { margin-left: .5rem; display: inline-flex; align-items: center; gap: .5rem; height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: var(--text); cursor: pointer; backdrop-filter: blur(6px); }
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); }

/* Hero section (image-ready) */
.hero { position: relative; min-height: 68vh; display: grid; place-items: center; padding: clamp(2rem, 6vw, 6rem) 1rem; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, #00695C 0%, #D4A574 100%); opacity: 0.9; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, transparent 70%),
  linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(10,10,11,0.6) 100%);
  z-index: 1; }
.hero.has-image::before { background: var(--hero-image, none); background-size: cover; background-position: center; filter: brightness(0.75); }
.hero > * { position: relative; z-index: 2; }
.hero h1 { font-family: var(--font-main); font-weight: 700; font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.1; letter-spacing: 0.01em; }
.hero p { max-width: 60ch; margin: 1rem auto 2rem; opacity: 0.9; }


/* Command Palette shell (modal chrome only) */
.command-palette { position: fixed; inset: 0; z-index: 9999; }
.command-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.command-modal { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); width: min(600px, 90vw); background: rgba(26,11,46,0.95); border: 1px solid rgba(0,217,255,0.3); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,217,255,0.3); overflow: hidden; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.command-input { width: 100%; padding: 1.5rem; background: transparent; border: none; border-bottom: 1px solid rgba(0,217,255,0.2); color: var(--text); font-size: 1.2rem; font-family: var(--font-code); outline: none; }
.command-input::placeholder { color: rgba(255, 255, 255, 0.3); }
.command-results { max-height: 400px; overflow-y: auto; padding: 1rem; }
.command-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; margin: 0.25rem 0; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.command-item:hover, .command-item.active { background: rgba(0, 217, 255, 0.1); border-left: 3px solid var(--primary); padding-left: calc(1rem - 3px); }

/* Konami Easter Egg */
@keyframes konamiGlow {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.5); }
}

.konami-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--deep), rgba(255, 215, 0, 0.2));
    border: 2px solid var(--accent);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    z-index: 10000;
    animation: popIn 0.5s ease;
    box-shadow: 0 0 100px rgba(255, 215, 0, 0.5);
}

@keyframes popIn {
    from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Timeline (milestones) */
.hl-timeline { position: relative; padding-left: 2rem; }
.hl-timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--primary), var(--accent)); }
.hl-time-item { position: relative; margin: 2rem 0; }
.hl-time-dot { position: absolute; left: -1.5rem; top: 0.5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 20px var(--primary); }
.hl-time-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 1rem; backdrop-filter: blur(10px); }
