:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f0f0f0;
    --gray-mid: #808080;
}

@font-face {
    font-family: 'SpaceMono';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/space-mono/1.0.0/SpaceMono-Regular.ttf') format('truetype');
}

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

body {
    font-family: 'SpaceMono', monospace;
    line-height: 1.6;
    color: var(--black);
    background: var(--white);
}

::selection {
    background: var(--black);
    color: var(--white);
}

header {
    padding: 2rem;
    border-bottom: 2px solid var(--black);
}

.glitch-text {
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: 'CURIOUS SOULS';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--gray-mid);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--gray-light);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(54px, 550px, 60px, 0);
    }
    20% {
        clip: rect(33px, 550px, 98px, 0);
    }
    40% {
        clip: rect(12px, 550px, 43px, 0);
    }
    60% {
        clip: rect(78px, 550px, 85px, 0);
    }
    80% {
        clip: rect(14px, 550px, 56px, 0);
    }
    100% {
        clip: rect(67px, 550px, 95px, 0);
    }
}

nav {
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--black);
}

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

nav a {
    color: var(--black);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--black);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2px;
    background: var(--black);
    padding: 2px;
    margin: 2rem;
}

.article-card {
    background: var(--white);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
    z-index: 1;
}

.article-card:hover::before {
    transform: scaleY(1);
}

.article-card:hover .article-content {
    color: var(--white);
    z-index: 2;
    position: relative;
}

.article-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.ascii-art {
    font-family: monospace;
    white-space: pre;
    font-size: 0.8rem;
    margin: 1rem 0;
    overflow: hidden;
}

footer {
    padding: 2rem;
    border-top: 2px solid var(--black);
    text-align: center;
    margin-top: 2rem;
}

.data-decorator {
    position: fixed;
    top: 0;
    right: 0;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.5;
    pointer-events: none;
}

.content-header {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .glitch-text {
        font-size: 1.8rem;
    }
}

.h2 {
    font-size: 5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.h2 {
    font-size: 4rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.content-container {
    margin: 0.5rem;
    padding: 0.5rem;
    border: 2px solid var(--black);
    min-height: 60vh;
    background: var(--white);
}

.embedded-content {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}