:root {
    --bg-color: #050510;
    --text-primary: #F0F0FF;
    --text-secondary: #A0A0B0;
    --accent-blue: #00F3FF;
    --accent-purple: #BC13FE;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Texture */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 0;
}

.patent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/patent-bg.svg');
    background-size: 500px;
    background-repeat: repeat;
    opacity: 0.2;
    /* Subtle visibility */
    pointer-events: none;
    z-index: 1;
    mask-image: radial-gradient(circle, transparent 20%, black 80%);
    /* Fade out inside heavy content areas if needed, or just uniform */
    -webkit-mask-image: radial-gradient(circle, transparent 20%, black 80%);
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.logo .dot {
    color: var(--accent-blue);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-blue);
    text-shadow: 0 0 8px var(--accent-blue);
}

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

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 800px;
}

.subtitle {
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    position: relative;
    color: white;
}

/* Glitch Effect Text */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent-purple);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 var(--accent-blue);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 31px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 86px, 0);
    }

    40% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(12px, 9999px, 25px, 0);
    }

    80% {
        clip: rect(95px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(5px, 9999px, 30px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 90px, 0);
    }

    20% {
        clip: rect(15px, 9999px, 20px, 0);
    }

    40% {
        clip: rect(32px, 9999px, 40px, 0);
    }

    60% {
        clip: rect(85px, 9999px, 95px, 0);
    }

    80% {
        clip: rect(5px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 70px, 0);
    }
}

.description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Button */
.btn-neon {
    display: inline-block;
    padding: 1rem 2.5rem;
    color: var(--accent-blue);
    text-decoration: none;
    border: 1px solid var(--accent-blue);
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.btn-neon:hover {
    background: var(--accent-blue);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--accent-blue), 0 0 40px var(--accent-blue);
}

/* Background Visuals */
/* Background Visuals */
.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-portrait {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 20px;
    filter: sepia(20%) contrast(1.1) grayscale(100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
    transition: filter 0.5s ease;
}

.hero-portrait:hover {
    filter: sepia(0%) contrast(1.2) grayscale(0%);
}

.tesla-coil-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, rgba(5, 5, 16, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.content-section {
    min-height: 100vh;
    padding: 5rem 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Timeline Styles */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #fff, var(--text-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Vertical Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    box-shadow: 0 0 15px var(--accent-blue);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
    opacity: 1;
    /* Visible by default */
    transform: none;
    transition: all 0.6s ease;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    position: relative;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.02);
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.timeline-content h3 {
    color: var(--accent-blue);
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
}

/* Dots */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-blue);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-blue);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}

/* Mobile Responsiveness for Timeline */
@media screen and (max-width: 600px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0%;
    }

    .timeline-dot {
        left: 21px !important;
        /* Force override for mobile */
    }

    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
    }
}

/* Inventions Grid */
.inventions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.invention-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.invention-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.15);
    border-color: var(--accent-blue);
}

/* Neon Glow Effect on Card Border */
.invention-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(0, 243, 255, 0.1), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.invention-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.card-content h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-specs {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

/* Obsessions / Facts Section */
.facts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.fact-item {
    flex: 1 1 250px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 50% 50% 0 0;
    /* Arch shape */
    text-align: center;
    border-bottom: 2px solid var(--accent-purple);
    transition: transform 0.3s ease;
}

.fact-item:hover {
    transform: translateY(-5px);
    background: rgba(188, 19, 254, 0.05);
    /* Proper tint */
}

.fact-number {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--accent-purple);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
}

.fact-item h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.fact-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    padding: 4rem 5% 2rem;
    text-align: center;
    background: linear-gradient(to top, #000, transparent);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quote {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0.8;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.5;
}

.footer-links {
    margin-top: 1rem;
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-blue);
}

/* Checkbox Group - Global */
.checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-blue);
    margin: 0;
    cursor: pointer;
    order: -1;
    /* Ensure checkbox is on the left */
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* General Mobile Adjustments */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
        /* Even smaller to fit */
    }

    .glass-header {
        padding: 0.5rem 5%;
        /* Thinner header */
        background: rgba(5, 5, 16, 0.95);
        /* solid bg */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    nav {
        flex-direction: column;
        align-items: center;
        /* Crucial for centering */
        gap: 0.5rem;
        width: 100%;
    }



    .logo {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
        display: block;
        /* Ensure it takes line */
    }

    .nav-links {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        margin-bottom: 5px;
        padding-left: 0;
        /* Remove default UL padding */
    }

    .nav-links a {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.05);
        /* Button-like feel */
        border-radius: 4px;
    }

    .content-section {
        padding: 3rem 5%;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Hero Fix for Mobile */
    .hero {
        flex-direction: column;
        padding-top: 150px;
        /* MORE Space for fixed header + breathing room */
        height: auto;
        min-height: 100vh;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 2rem;
        order: 1;
        /* Text on top */
    }

    .hero-visual {
        order: 2;
        /* Image bottom */
        margin-bottom: 3rem;
    }

    .hero-portrait {
        max-width: 250px;
        /* Smaller image on mobile */
    }

    .tesla-coil-glow {
        width: 100vw;
        height: 100vw;
    }

    /* FORCE Single Column on Mobile for ALL Grids */
    .inventions-grid,
    .predictions-container,
    .quotes-grid,
    .facts-container {
        grid-template-columns: 1fr !important;
        /* Force override of any 2-column desk rule */
        gap: 2rem;
        padding: 0 10px;
    }

    /* Ensure content doesn't overflow horizontally */
    .invention-card,
    .prediction-card,
    .quote-card,
    .fact-item {
        width: 100%;
        box-sizing: border-box;
    }

    /* Timeline Mobile Fix */
    .timeline {
        padding-left: 10px;
        /* Add margin from screen edge */
    }

    .timeline-item {
        padding-left: 45px;
        /* More space from line */
        padding-right: 10px;
    }

    .timeline::after {
        left: 20px;
        /* Move line slightly inwards */
    }

    .timeline-dot {
        left: 10px !important;
        /* Center on new line position (20px - 10px half width) */
    }

    .quote {
        font-size: 1rem;
    }
}

/* Predictions Section */
.predictions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.prediction-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.prediction-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-5px);
}

.pred-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.prediction-card h3 {
    color: var(--accent-purple);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1rem;
}

.prediction-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
}

/* Lost Files Section */
.files-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.file-text {
    flex: 2;
}

.file-text h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-blue);
    padding-left: 1rem;
}

.file-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-visual {
    flex: 1;
    height: 300px;
    background: url('../images/patent-bg.svg');
    background-size: cover;
    border: 2px solid rgba(255, 0, 0, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(3deg);
}

.classified-stamp {
    color: rgba(255, 0, 0, 0.7);
    font-family: 'Courier New', monospace;
    font-size: 3rem;
    font-weight: 900;
    border: 5px solid rgba(255, 0, 0, 0.7);
    padding: 1rem;
    transform: rotate(-15deg);
    mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"><text x="50%" y="50%" font-family="sans-serif" font-weight="900" font-size="50">TOP SECRET</text></svg>');
    /* Simple text mask not needed, just plain border box style is better for stamp look */
    mask-image: none;
    -webkit-mask-image: none;
    letter-spacing: 5px;
}

/* Mobile adjust for new sections */
@media screen and (max-width: 768px) {
    .files-content {
        flex-direction: column;
    }

    .file-visual {
        width: 100%;
        height: 200px;
    }
}

/* Quotes Section */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tesla-quote {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--accent-blue);
    padding: 2rem 2rem 2rem 3rem;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-primary);
    position: relative;
    border-radius: 0 10px 10px 0;
    transition: transform 0.3s ease;
}

.tesla-quote:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: -5px 0 20px rgba(0, 243, 255, 0.1);
}

.tesla-quote::before {
    content: '"';
    font-size: 5rem;
    color: var(--accent-blue);
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 5px;
    font-family: 'Orbitron', sans-serif;
    line-height: 1;
}

.tesla-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-style: normal;
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.cyber-form {
    background: rgba(255, 255, 255, 0.02);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

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

.form-group label {
    display: block;
    color: var(--accent-blue);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.submit-btn {
    width: 100%;
    cursor: pointer;
    background: transparent;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Mobile adjustments for form */
@media screen and (max-width: 768px) {
    .cyber-form {
        padding: 1.5rem;
    }
}