:root {
    --void: #000000;
    --obsidian: #0a0a0a;
    --slate: #1a1a1a;
    --ghost: #2a2a2a;
    --mist: #888888;
    --pearl: #cccccc;
    --bone: #e8e8e8;
    --light: #ffffff;

    --neon-pink: #ff69b4;
    --neon-orange: #ff8c42;
    --neon-emerald: #00ff88;
    --pink-glow: rgba(255, 105, 180, 0.4);
    --orange-glow: rgba(255, 140, 66, 0.4);
    --emerald-glow: rgba(0, 255, 136, 0.4);
    --pink-dim: rgba(255, 105, 180, 0.15);
    --orange-dim: rgba(255, 140, 66, 0.1);
    --emerald-dim: rgba(0, 255, 136, 0.15);
    --neon-purple: #9f5fff;
    --purple-glow: rgba(159, 95, 255, 0.4);
}

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

/* Global focus indicators for keyboard accessibility */
a:focus-visible {
    outline: 2px solid var(--neon-pink);
    outline-offset: 3px;
}

button:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--neon-orange);
    outline-offset: 3px;
}

input:focus-visible {
    outline: 2px solid var(--neon-emerald);
    outline-offset: 3px;
}

textarea:focus-visible {
    outline: 2px solid #0af;
    outline-offset: 3px;
}

select:focus-visible,
[tabindex]:focus-visible:not([tabindex="-1"]) {
    outline: 2px solid var(--neon-pink);
    outline-offset: 3px;
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--neon-emerald);
    color: var(--void);
    padding: 12px 24px;
    font-weight: bold;
    text-decoration: none;
    z-index: 10000;
    border-radius: 4px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    outline: 2px solid var(--neon-orange);
    outline-offset: 3px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--void);
    color: var(--pearl);
    font-family: 'Space Mono', monospace;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Tamil text rendering */
.tamil-text {
    font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', 'Lohit Tamil', serif;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, var(--void) 0%, transparent 100%);
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--light);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--neon-pink);
    box-shadow: 0 0 8px var(--pink-glow);
    transition: width 0.3s ease;
}

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

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

/* Indic Numeral Column - vertical countdown 5→2 */
.indic-column {
    position: absolute;
    left: 5%;
    top: 15%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
    pointer-events: none;
}

.indic-num {
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 400;
    line-height: 1;
}

/* Staggered opacity pulse - same rate, offset timing, unequal peaks */
@keyframes indicPulse5 {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.32; }
}

@keyframes indicPulse4 {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@keyframes indicPulse3 {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.22; }
}

@keyframes indicPulse2 {
    0%, 100% { opacity: 0.10; }
    50% { opacity: 0.38; }
}

/* Kannada 5 - cyan/teal */
.kannada-5 {
    font-family: 'Noto Sans Kannada', sans-serif;
    color: #00d4aa;
    text-shadow: 0 0 30px rgba(0, 212, 170, 0.4);
    animation: indicPulse5 8s ease-in-out infinite;
}

/* Devanagari 4 - neon green */
.devanagari-4 {
    font-family: 'Noto Sans Devanagari', sans-serif;
    color: var(--neon-emerald);
    text-shadow: 0 0 30px var(--emerald-glow);
    animation: indicPulse4 8s ease-in-out infinite;
    animation-delay: -2s;
}

/* Sharada 3 - teal/cyan */
.sharada-3 {
    font-family: 'Noto Sans Sharada', sans-serif;
    color: #00c4b4;
    text-shadow: 0 0 30px rgba(0, 196, 180, 0.4);
    animation: indicPulse3 8s ease-in-out infinite;
    animation-delay: -4s;
}

/* irendu (Tamil 2) image */
.irendu-2 {
    width: clamp(60px, 12vw, 100px);
    height: auto;
    filter: drop-shadow(0 0 20px var(--orange-glow));
    animation: indicPulse2 8s ease-in-out infinite;
    animation-delay: -6s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.tagline {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--mist);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.2s forwards;
}

.title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--light);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.4s forwards;
    position: relative;
    white-space: nowrap;
}

.title-wrapper {
    position: relative;
    display: inline-block;
}

/* The gradient title text */
.title-text {
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-orange) 50%, var(--neon-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--pink-glow)) drop-shadow(0 0 40px var(--orange-glow));
    opacity: 0.85;
}

/* Flickering pink portion: "rmulat" - 15% more opaque */
.title-flicker {
    position: absolute;
    top: 0;
    left: 0;
    font-weight: 700;
    color: transparent;
    -webkit-text-fill-color: transparent;
    pointer-events: none;
}

.title-flicker .flicker-pink {
    color: var(--neon-pink);
    -webkit-text-fill-color: var(--neon-pink);
    text-shadow: 0 0 20px var(--pink-glow), 0 0 40px var(--pink-glow), 0 0 60px var(--pink-glow);
    animation: pinkSputter 6s ease-in-out infinite;
    opacity: 1;
}

/* The background "4" glyph - moved to the left, as faint as possible */
.bg-four {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.1em;
    font-weight: 900;
    color: #7fff9f;
    -webkit-text-stroke: 1px #1b4e2d;
    text-shadow:
        0 0 25px rgba(100, 200, 140, 0.3),
        0 0 50px rgba(100, 200, 140, 0.15);
    z-index: -1;
    top: 50%;
    left: -0.5em;
    transform: translateY(-50%);
    opacity: 0.08;
    animation: fourFlicker 10s ease-in-out infinite;
    pointer-events: none;
}

/* Multicoloured neon watermark with dynamic colors */
.neon-watermark {
    position: absolute;
    top: 45%;
    right: 5%;
    transform: translateY(-150%);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
    background: linear-gradient(
        90deg,
        var(--neon-pink) 0%,
        var(--neon-orange) 20%,
        var(--neon-emerald) 40%,
        var(--neon-purple) 60%,
        #00d4ff 80%,
        var(--neon-pink) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: neonWatermarkFlow 8s linear infinite, neonWatermarkPulse 4s ease-in-out infinite;
    filter: blur(0.5px);
    text-shadow:
        0 0 40px rgba(255, 105, 180, 0.3),
        0 0 80px rgba(255, 140, 66, 0.2),
        0 0 120px rgba(0, 255, 136, 0.15);
}

@keyframes neonWatermarkFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes neonWatermarkPulse {
    0%, 100% {
        opacity: 0.12;
        filter: blur(0.5px);
    }
    50% {
        opacity: 0.18;
        filter: blur(1px);
    }
}

/* Synchronized flickering animations */
@keyframes pinkSputter {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 15px var(--pink-glow), 0 0 30px var(--pink-glow);
    }
    /* Pink sputters out */
    25% {
        opacity: 0.7;
        text-shadow: 0 0 8px var(--pink-glow);
    }
    35% {
        opacity: 0.15;
        text-shadow: 0 0 2px var(--pink-glow);
    }
    40% {
        opacity: 0.05;
        text-shadow: none;
    }
    /* Pink stays dim while 4 is visible */
    50% {
        opacity: 0.02;
    }
    /* Pink comes back */
    60% {
        opacity: 0.1;
    }
    70% {
        opacity: 0.5;
        text-shadow: 0 0 5px var(--pink-glow);
    }
    75% {
        opacity: 0.9;
    }
    85% {
        opacity: 1;
        text-shadow: 0 0 15px var(--pink-glow), 0 0 30px var(--pink-glow);
    }
}

@keyframes fourFlicker {
    0%, 100% {
        opacity: 0.04;
        text-shadow: 0 0 10px rgba(100, 200, 140, 0.08);
    }
    /* 4 starts becoming visible as pink dims */
    30% {
        opacity: 0.08;
    }
    /* 4 is most legible when pink is out */
    40% {
        opacity: 0.15;
        text-shadow:
            0 0 20px rgba(100, 200, 140, 0.2),
            0 0 40px rgba(100, 200, 140, 0.1);
    }
    50% {
        opacity: 0.18;
        text-shadow:
            0 0 25px rgba(100, 200, 140, 0.25),
            0 0 50px rgba(0, 255, 136, 0.15);
    }
    /* 4 sputters out */
    60% {
        opacity: 0.12;
    }
    70% {
        opacity: 0.06;
    }
    75% {
        opacity: 0.04;
        text-shadow: 0 0 10px rgba(100, 200, 140, 0.08);
    }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--pearl);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.9;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.6s forwards;
}

.subtitle .weather-link {
    color: var(--pearl);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.subtitle .weather-link:hover {
    color: var(--neon-emerald);
    text-shadow: 0 0 15px var(--emerald-glow);
}

/* Broadcast Statement - declarative, weather-report style */
.broadcast-statement {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem; /* ~115% of body text */
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--bone);
    margin: 2.5rem auto 2rem;
    max-width: 800px;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.6s forwards;
}

/* Television Container - Retro CRT Style with Image Frame */
.tv-container {
    margin: 2rem auto 2.5rem;
    max-width: 500px;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.7s forwards;
}

/* Image-based TV frame */
.tv-frame-img {
    position: relative;
    width: 100%;
}

.tv-frame-bg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 60px rgba(255, 180, 100, 0.15));
}

/* TV Frame - vintage boxy CRT with wood-grain aesthetic */
.tv-frame {
    background: linear-gradient(180deg, #2a2218 0%, #1e1a14 40%, #15120d 100%);
    border-radius: 24px;
    padding: 24px 24px 20px;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        inset 0 -3px 6px rgba(0, 0, 0, 0.9),
        inset 2px 0 4px rgba(255, 255, 255, 0.03),
        inset -2px 0 4px rgba(0, 0, 0, 0.5),
        0 12px 40px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(100, 200, 140, 0.02);
    border: 3px solid #1a1612;
    position: relative;
}

/* Wood grain texture overlay */
.tv-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 22px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 3px,
        rgba(60, 45, 30, 0.1) 3px,
        rgba(60, 45, 30, 0.1) 4px
    );
    pointer-events: none;
    opacity: 0.5;
}

/* TV Screen - positioned within the ātmanoptican frame */
.tv-screen {
    position: absolute;
    top: 15%;
    left: 25%;
    width: 50%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(
        ellipse at center,
        #0a0f0a 0%,
        #050805 60%,
        #020302 100%
    );
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        inset 0 0 80px rgba(0, 20, 10, 0.4);
    animation: tvGlow 8s ease-in-out infinite;
}

/* Curved glass reflection effect */
.tv-screen::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 10%;
    width: 35%;
    height: 20%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 100%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
}

/* Scanlines overlay */
.tv-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.2) 2px,
        rgba(0, 0, 0, 0.2) 4px
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0.6;
    border-radius: 4px;
}

/* Screen flicker - slow, infrastructural */
@keyframes tvGlow {
    0% {
        box-shadow:
            inset 0 0 40px rgba(0, 0, 0, 0.9),
            inset 0 0 80px rgba(0, 20, 10, 0.35),
            0 0 12px rgba(80, 255, 140, 0.15);
    }
    50% {
        box-shadow:
            inset 0 0 45px rgba(0, 0, 0, 0.95),
            inset 0 0 90px rgba(0, 30, 15, 0.45),
            0 0 18px rgba(80, 255, 140, 0.25);
    }
    100% {
        box-shadow:
            inset 0 0 40px rgba(0, 0, 0, 0.9),
            inset 0 0 80px rgba(0, 20, 10, 0.35),
            0 0 12px rgba(80, 255, 140, 0.15);
    }
}

/* TV Content - fills the screen area */
.tv-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    animation: contentFlicker 12s ease-in-out infinite;
    border-radius: 4px;
    padding: 0.5rem;
}

/* Scrolling container - slower pace for reading */
.tv-scroll {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    animation: scrollUp 80s linear infinite;
    padding-top: 100%;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

/* Pause scroll on hover */
.tv-content:hover .tv-scroll {
    animation-play-state: paused;
}

/* Sanskrit text styling */
.tv-content .sanskrit {
    font-family: 'Noto Sans Devanagari', 'Noto Serif Devanagari', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: #CC5500;
    line-height: 1.8;
    margin: 0;
    text-shadow:
        0 0 2px rgba(0, 0, 0, 0.9),
        0 0 4px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(20, 10, 0, 0.9),
        0 0 15px rgba(204, 85, 0, 0.5),
        0 0 30px rgba(204, 85, 0, 0.2);
    letter-spacing: 0.03em;
    text-align: center;
}

/* Translation text styling - dark teal with silver wave */
.tv-content .translation {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 1.5rem 0 0 0;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-align: center;
    font-style: italic;
    /* Animated silver wave through dark teal */
    background-image: linear-gradient(
        90deg,
        #1a5c5c 0%,
        #1a5c5c 40%,
        #c0c0c0 50%,
        #1a5c5c 60%,
        #1a5c5c 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: silverWave 2s linear infinite;
}

@keyframes silverWave {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Attribution styling */
.tv-content .attribution {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    font-weight: 500;
    color: #70dd90;
    margin: 1rem 0 0 0;
    text-align: center;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow:
        0 0 2px rgba(0, 0, 0, 0.9),
        0 0 6px rgba(0, 0, 0, 0.7),
        0 0 12px rgba(100, 200, 140, 0.4);
}

/* Video inside TV - fills screen with 4px margins */
.tv-video {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 4px);
    object-fit: cover;
    image-rendering: auto;
    border-radius: 4px;
    opacity: 0.85;
    filter:
        contrast(1.05)
        saturate(1.1)
        brightness(0.95);
    mix-blend-mode: screen;
    z-index: 0;
}

@keyframes videoGlitchIn {
    0%, 100% {
        opacity: 0;
        transform: scale(1) translate(0);
        filter: contrast(1.2) brightness(0.9) saturate(0.8);
    }
    /* First glitch burst - brief flash */
    15% { opacity: 0; }
    15.5% {
        opacity: 0.7;
        transform: scale(1.02) translate(-2px, 1px);
        filter: contrast(1.5) brightness(1.2) saturate(0.5) hue-rotate(20deg);
    }
    16% {
        opacity: 0.5;
        transform: scale(0.99) translate(3px, -1px);
    }
    16.5% { opacity: 0; }

    /* Second glitch - longer appearance */
    40% { opacity: 0; }
    40.3% {
        opacity: 0.8;
        transform: translate(-3px, 2px);
        filter: contrast(1.4) brightness(1.1) hue-rotate(-15deg);
    }
    41% {
        opacity: 0.9;
        transform: translate(2px, 0);
    }
    42% {
        opacity: 0.85;
        transform: translate(0, 1px);
        filter: contrast(1.3) brightness(1) saturate(0.7);
    }
    43% {
        opacity: 0.6;
        transform: translate(-1px, -2px);
    }
    43.5% { opacity: 0; }

    /* Third glitch - sustained view */
    65% { opacity: 0; }
    65.2% {
        opacity: 0.9;
        transform: scale(1.01) translate(2px, -1px);
        filter: contrast(1.6) brightness(1.3) saturate(0.4);
    }
    66% {
        opacity: 1;
        transform: scale(1);
        filter: contrast(1.2) brightness(1) saturate(0.8);
    }
    70% {
        opacity: 0.95;
        filter: contrast(1.3) brightness(0.95);
    }
    72% {
        opacity: 0.7;
        transform: translate(-2px, 1px);
        filter: contrast(1.5) brightness(1.2) hue-rotate(10deg);
    }
    72.5% {
        opacity: 0.3;
        transform: translate(4px, -2px);
    }
    73% { opacity: 0; }
}

/* Static noise when empty */
.tv-content:empty::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    animation: staticNoise 0.5s steps(5) infinite;
}

@keyframes staticNoise {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2%, 2%); }
    50% { transform: translate(2%, -2%); }
    75% { transform: translate(-1%, -1%); }
}

/* Subtle content flicker */
@keyframes contentFlicker {
    0%, 100% { opacity: 1; }
    48% { opacity: 1; }
    49% { opacity: 0.92; }
    50% { opacity: 1; }
    72% { opacity: 1; }
    73% { opacity: 0.95; }
    74% { opacity: 1; }
}

/* TV Glitch Effects */
.tv-screen {
    animation: tvGlow 8s ease-in-out infinite, tvGlitch 8s steps(1) infinite;
}

@keyframes tvGlitch {
    0%, 100% {
        transform: translate(0);
        filter: none;
    }
    /* Glitch burst 1 */
    7% { transform: translate(0); }
    7.5% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
    8% { transform: translate(2px, -1px); }
    8.5% { transform: translate(0); filter: none; }
    /* Glitch burst 2 */
    32% { transform: translate(0); }
    32.2% { transform: translate(3px, 0); filter: saturate(2); }
    32.5% { transform: translate(-2px, 1px); }
    32.8% { transform: translate(0); filter: none; }
    /* Glitch burst 3 - longer */
    58% { transform: translate(0); }
    58.2% { transform: translate(-3px, 2px); filter: hue-rotate(-60deg) brightness(1.2); }
    58.5% { transform: translate(4px, -1px); filter: saturate(0.5); }
    58.8% { transform: translate(-1px, 2px); }
    59.2% { transform: translate(2px, 0); filter: hue-rotate(30deg); }
    59.5% { transform: translate(0); filter: none; }
    /* Micro glitch */
    78% { transform: translate(0); }
    78.1% { transform: translate(1px, 0); }
    78.2% { transform: translate(0); }
}

/* Horizontal tear/distortion line */
.tv-screen::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(100, 200, 140, 0.3) 20%,
        rgba(100, 200, 140, 0.5) 50%,
        rgba(100, 200, 140, 0.3) 80%,
        transparent 100%
    );
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    animation: tearLine 6s linear infinite;
}

@keyframes tearLine {
    0%, 100% { top: -10%; opacity: 0; }
    10% { opacity: 0; }
    12% { top: 15%; opacity: 0.8; }
    14% { top: 20%; opacity: 0; }
    45% { opacity: 0; }
    47% { top: 60%; opacity: 0.6; }
    49% { top: 65%; opacity: 0; }
    70% { opacity: 0; }
    71% { top: 85%; opacity: 0.5; }
    73% { top: 90%; opacity: 0; }
}

/* Color channel split on glitch */
.tv-content {
    animation: contentFlicker 12s ease-in-out infinite, rgbSplit 8s steps(1) infinite;
}

@keyframes rgbSplit {
    0%, 100% {
        text-shadow: 0 0 8px rgba(100, 200, 140, 0.3);
    }
    7.5% {
        text-shadow:
            -2px 0 rgba(255, 0, 0, 0.4),
            2px 0 rgba(0, 255, 255, 0.4),
            0 0 8px rgba(100, 200, 140, 0.5);
    }
    8% {
        text-shadow: 0 0 8px rgba(100, 200, 140, 0.3);
    }
    32.3% {
        text-shadow:
            1px 0 rgba(255, 0, 0, 0.3),
            -1px 0 rgba(0, 255, 255, 0.3),
            0 0 10px rgba(100, 200, 140, 0.6);
    }
    32.7% {
        text-shadow: 0 0 8px rgba(100, 200, 140, 0.3);
    }
    58.3% {
        text-shadow:
            -3px 0 rgba(255, 0, 0, 0.5),
            3px 0 rgba(0, 255, 255, 0.5),
            0 2px rgba(255, 0, 255, 0.3),
            0 0 12px rgba(100, 200, 140, 0.7);
    }
    59% {
        text-shadow:
            2px 1px rgba(255, 0, 0, 0.3),
            -2px -1px rgba(0, 255, 255, 0.3);
    }
    59.5% {
        text-shadow: 0 0 8px rgba(100, 200, 140, 0.3);
    }
}

/* Static noise burst overlay */
.tv-scanlines::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0;
    mix-blend-mode: overlay;
    animation: staticBurst 8s steps(1) infinite;
}

@keyframes staticBurst {
    0%, 100% { opacity: 0; }
    7.3% { opacity: 0; }
    7.5% { opacity: 0.15; transform: translateX(-5%); }
    7.7% { opacity: 0.1; transform: translateX(3%); }
    8% { opacity: 0; transform: translateX(0); }
    58% { opacity: 0; }
    58.3% { opacity: 0.2; transform: translateY(-2%); }
    58.6% { opacity: 0.15; transform: translateY(1%) translateX(-2%); }
    59% { opacity: 0.1; }
    59.3% { opacity: 0; transform: translate(0); }
}

/* TV Chassis - control panel with knobs */
.tv-chassis {
    background: linear-gradient(180deg, #1e1a14 0%, #15120d 100%);
    padding: 16px 20px;
    border-radius: 0 0 22px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #0d0b08;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.03);
    position: relative;
}

/* Control knobs on the left */
.tv-chassis::before {
    content: '';
    display: flex;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #3a3a3a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Second knob */
.tv-chassis::after {
    content: '';
    position: absolute;
    left: 52px;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #3a3a3a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.1),
        inset 0 -2px 3px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Power Button - circular with LED indicator */
.tv-power-btn {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
    padding: 0.6rem 1rem;
    background: radial-gradient(circle at 30% 30%, #2a2a2a 0%, #151515 50%, #0a0a0a 100%);
    border: 2px solid #0a0a0a;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.08),
        inset 0 -1px 2px rgba(0, 0, 0, 0.8),
        0 3px 6px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Power LED indicator */
.tv-power-btn::before {
    content: '';
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #1a3a1a 0%, #0a150a 100%);
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 50, 0, 0.5);
    transition: all 0.4s ease;
}

/* CRT warming up effect on hover */
.tv-power-btn:hover {
    color: var(--pearl);
    background: radial-gradient(circle at 30% 30%, #333 0%, #1a1a1a 50%, #0f0f0f 100%);
    border-color: rgba(100, 200, 140, 0.2);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.8),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(100, 200, 140, 0.08);
}

/* LED lights up on hover */
.tv-power-btn:hover::before {
    background: radial-gradient(circle, #00ff88 0%, #00cc66 50%, #009944 100%);
    box-shadow:
        0 0 4px rgba(0, 255, 136, 0.8),
        0 0 8px rgba(0, 255, 136, 0.4),
        0 0 12px rgba(0, 255, 136, 0.2);
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.8s forwards;
}

.cta {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 1px solid var(--ghost);
    background: transparent;
    color: var(--pearl);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--pink-dim);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta:hover {
    border-color: var(--neon-pink);
    color: var(--light);
    box-shadow: 0 0 20px var(--pink-glow);
}

.cta:hover::before {
    left: 0;
}

.cta-primary {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-orange));
    color: var(--void);
    border: none;
    font-weight: 700;
}

.cta-primary:hover {
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-emerald));
    box-shadow: 0 0 30px var(--orange-glow), 0 0 60px var(--emerald-glow);
    color: var(--void);
}

.cta-primary::before {
    display: none;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards, float 2s ease-in-out infinite 1.2s;
}

.scroll-indicator span {
    display: block;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, var(--neon-emerald), var(--neon-pink), transparent);
    box-shadow: 0 0 10px var(--emerald-glow);
}

/* Philosophy Section */
.section {
    padding: 8rem 2rem;
    position: relative;
    z-index: 1;
}

.section-inner {
    max-width: 800px;
    margin: 0 auto;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--neon-emerald);
    text-shadow: 0 0 10px var(--emerald-glow);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--neon-emerald);
    box-shadow: 0 0 8px var(--emerald-glow);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    color: var(--light);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.section-text {
    font-size: 1rem;
    color: var(--pearl);
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.section-text em {
    color: var(--bone);
    font-style: italic;
}

/* Quote block */
.quote-block {
    border-left: 2px solid var(--neon-orange);
    padding: 2rem;
    margin: 3rem 0;
    background: linear-gradient(135deg, var(--pink-dim) 0%, var(--orange-dim) 100%);
    box-shadow: 0 0 30px rgba(255, 140, 66, 0.1);
}

.quote-block p {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--bone);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.quote-block cite {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--mist);
    letter-spacing: 0.1em;
}

/* Gate Section */
.gate-section {
    background: var(--obsidian);
    border-top: 1px solid var(--ghost);
    border-bottom: 1px solid var(--ghost);
}

.gate-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.gate-icon {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto 2rem;
    transform: rotate(-3deg);
    filter: drop-shadow(0 0 25px var(--pink-glow)) drop-shadow(0 0 37px var(--orange-glow));
    animation: neon-pulse-img 2s ease-in-out infinite;
}

@keyframes neon-pulse-img {
    0%, 100% {
        filter: drop-shadow(0 0 25px var(--pink-glow)) drop-shadow(0 0 37px var(--orange-glow));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 35px var(--pink-glow)) drop-shadow(0 0 57px var(--orange-glow)) drop-shadow(0 0 80px var(--emerald-glow));
        opacity: 0.85;
    }
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 0 0 20px var(--pink-glow), 0 0 40px var(--orange-glow);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 30px var(--pink-glow), 0 0 60px var(--orange-glow), 0 0 80px var(--emerald-glow);
        opacity: 0.85;
    }
}

.gate-title {
    font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', 'Lohit Tamil', serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--neon-orange);
    text-shadow: 0 0 15px var(--orange-glow);
    margin-bottom: 1.5rem;
}

.gate-description {
    font-size: 0.95rem;
    color: var(--pearl);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.gate-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--bone);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.question-number {
    display: inline-block;
    font-family: 'Noto Sans Tamil', sans-serif;
    color: var(--neon-pink);
    margin-right: 0.5rem;
    transform: rotate(-3deg);
    text-shadow: 0 0 8px var(--pink-glow);
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    background: var(--void);
    border: 1px solid var(--ghost);
    color: var(--light);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input[type="email"] {
    min-height: auto;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: 2px solid var(--neon-orange);
    outline-offset: 3px;
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px var(--pink-glow), 0 0 40px var(--orange-glow);
}

.form-group textarea::placeholder,
.form-group input::placeholder {
    color: var(--mist);
}

/* Email section styling */
.email-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ghost);
}

.email-section label {
    color: var(--neon-emerald);
    text-shadow: 0 0 8px var(--emerald-glow);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.submit-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-orange));
    color: var(--void);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-emerald));
    box-shadow: 0 0 30px var(--orange-glow), 0 0 60px var(--emerald-glow);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-btn.loading {
    background: var(--ghost);
    color: var(--pearl);
}

.submit-btn.success {
    background: var(--neon-emerald);
    color: var(--void);
}

/* Status message */
.status-message {
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    border-radius: 2px;
    display: none;
}

.status-message.visible {
    display: block;
}

.status-message.success {
    background: var(--emerald-dim);
    border: 1px solid var(--neon-emerald);
    color: var(--neon-emerald);
}

.status-message.error {
    background: var(--pink-dim);
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
}

.status-message.info {
    background: var(--orange-dim);
    border: 1px solid var(--neon-orange);
    color: var(--neon-orange);
}

.accessibility-note {
    font-size: 0.7rem;
    color: var(--mist);
    margin-top: 1.5rem;
    text-align: center;
}

.accessibility-note a {
    color: var(--neon-emerald);
    text-decoration: none;
    text-shadow: 0 0 8px var(--emerald-glow);
}

.accessibility-note a:hover {
    text-decoration: underline;
    color: var(--neon-pink);
    text-shadow: 0 0 8px var(--pink-glow);
}

.encryption-note {
    font-size: 0.65rem;
    color: var(--mist);
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.encryption-note::before {
    content: '🔐';
}

/* Encryption hover popup */
.encryption-hover {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    z-index: 10;
}

.encryption-trigger {
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: grayscale(0.5);
}

.encryption-trigger:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: grayscale(0);
}

.encryption-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 90%;
    max-width: 500px;
    padding: 1.25rem 1.5rem;
    background: var(--obsidian);
    border: 1px solid var(--ghost);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--pearl);
    line-height: 1.7;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.encryption-popup em {
    color: var(--neon-emerald);
    font-style: normal;
}

.encryption-hover:hover .encryption-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Trident/Kalabhairava footnote hover popup */
.trident-hover {
    position: absolute;
    top: 45%;
    left: 2%;
    z-index: 15;
}

.trident-trigger {
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.15;
    transition: opacity 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
    color: #c9a45c;
    text-shadow: 0 0 3px rgba(201, 164, 92, 0.3);
}

.trident-trigger:hover {
    opacity: 0.9;
    transform: scale(1.2);
    text-shadow: 0 0 8px rgba(201, 164, 92, 0.8), 0 0 15px rgba(255, 200, 100, 0.5);
}

.trident-popup {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%) translateX(10px);
    width: 280px;
    max-width: 90vw;
    background: rgba(10, 8, 6, 0.97);
    border: 1px solid rgba(201, 164, 92, 0.3);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.65rem;
    line-height: 1.6;
    color: var(--mist);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(201, 164, 92, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.trident-popup a {
    color: var(--neon-emerald);
    text-decoration: none;
    border-bottom: 1px dotted var(--neon-emerald);
}

.trident-popup a:hover {
    color: #7fff9f;
}

.trident-hover:hover .trident-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(15px);
    pointer-events: auto;
}

/* Hosting blurb - subtle, small */
.hosting-blurb {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.hosting-blurb p {
    font-size: 0.6rem;
    color: var(--mist);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.hosting-blurb a {
    color: var(--mist);
    text-decoration: none;
}

.hosting-blurb a:hover {
    color: var(--pearl);
}

.floki-link {
    display: inline-block;
    margin-top: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.floki-link:hover {
    opacity: 0.8;
}

.floki-logo {
    max-width: 80px;
    height: auto;
}

/* Footer */
footer {
    padding: 4rem 2rem;
    border-top: 1px solid var(--ghost);
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--light);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--mist);
    letter-spacing: 0.05em;
}

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

@keyframes fadeIn {
    to {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.65rem;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .section {
        padding: 5rem 1.5rem;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .cta {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .gate-icon {
        font-size: 4rem;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .neon-watermark {
        font-size: clamp(2rem, 6vw, 3.5rem);
        right: 2%;
        opacity: 0.10;
    }

    .bg-four {
        left: -1em;
        opacity: 0.06;
    }

    /* TV responsive */
    .broadcast-statement {
        font-size: 1rem;
        white-space: normal;
        line-height: 1.5;
        padding: 0 1rem;
    }

    .tv-container {
        max-width: 340px;
    }

    .tv-content .sanskrit {
        font-size: 0.85rem;
    }

    .tv-content .translation {
        font-size: 0.7rem;
    }

    .tv-content .attribution {
        font-size: 0.6rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
