:root {
    --color-bg-primary: #0a0a0a;
    --color-text-primary: #ffffff;
    --color-text-secondary: #b0b0b0;
    --color-text-tertiary: #707070;

    --gradient-primary: linear-gradient(135deg, #ffffff 0%, #707070 100%);
    --gradient-button: linear-gradient(135deg, #e8e8e8 0%, #a8a8a8 100%);
    --gradient-button-hover: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 60px;
    --radius-md: 12px;

    --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.1), 0 0 80px rgba(255, 255, 255, 0.05);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Space Grotesk", sans-serif;
    background: var(--color-bg-primary);
    color: var(--color-text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.grid-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    perspective: 1200px;
    pointer-events: none;
}
.grid-lines {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(
            0deg,
            transparent 24%,
            rgba(200, 200, 200, 0.03) 25%,
            rgba(200, 200, 200, 0.06) 26%,
            transparent 27%,
            transparent 74%,
            rgba(200, 200, 200, 0.03) 75%,
            rgba(200, 200, 200, 0.06) 76%,
            transparent 77%,
            transparent
        ),
        linear-gradient(
            90deg,
            transparent 24%,
            rgba(200, 200, 200, 0.03) 25%,
            rgba(200, 200, 200, 0.06) 26%,
            transparent 27%,
            transparent 74%,
            rgba(200, 200, 200, 0.03) 75%,
            rgba(200, 200, 200, 0.06) 76%,
            transparent 77%,
            transparent
        );
    background-size: 100px 100px;
    animation: gridMove 25s linear infinite;
    transform: rotateX(65deg) translateZ(-100px);
}
@keyframes gridMove {
    0% {
        transform: rotateX(65deg) translateZ(-100px) translateY(0);
    }
    100% {
        transform: rotateX(65deg) translateZ(-100px) translateY(100px);
    }
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.08;
    z-index: -1;
    animation: floatOrb 20s ease-in-out infinite;
    pointer-events: none;
}
.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    top: -10%;
    right: 20%;
}
.orb-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.3), transparent);
    bottom: 10%;
    left: 10%;
    animation-delay: -5s;
}
@keyframes floatOrb {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, -30px);
    }
}

.glow-line {
    position: fixed;
    z-index: -1;
    filter: blur(1px);
    pointer-events: none;
}
.glow-line-h {
    height: 1px;
    width: 100%;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: glowH 8s infinite;
}
@keyframes glowH {
    0% {
        opacity: 0;
        transform: translateX(-50%);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(50%);
    }
}

.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.top-bar {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-xl);
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}
.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    cursor: pointer;
}
.hex-logo {
    font-size: 28px;
    color: var(--color-text-primary);
    line-height: 0;
    padding-bottom: 4px;
}
.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo span.sub {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    margin-left: 5px;
    -webkit-text-fill-color: initial;
}

.btn {
    padding: 12px 30px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gradient-button);
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.btn:hover {
    background: var(--gradient-button-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.8);
}

.content-wrapper {
    margin-top: 80px;
    flex: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.fade-out {
    opacity: 0;
}

.section-header {
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.section-header h2 {
    font-size: 24px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.header-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: var(--transition-base);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.blog-card:hover {
    transform: translateY(-8px);
    background: rgba(25, 25, 25, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-glow);
}
.blog-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}
.blog-card:hover::after {
    opacity: 0.5;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--color-text-tertiary);
    font-family: monospace;
}
.post-tag {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-tech {
    color: #8abfff;
}
.tag-psych {
    color: #ffb0ff;
}
.tag-soc {
    color: #afffcf;
}
.tag-meta {
    color: #fffca1;
}

.blog-card h3 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.3;
}
.blog-card p {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.read-more::after {
    content: "→";
    transition: transform 0.2s;
}
.blog-card:hover .read-more::after {
    transform: translateX(5px);
}

.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
}
.hero h1 {
    font-size: clamp(60px, 12vw, 140px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
}
.hero p {
    font-size: 24px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    letter-spacing: 0.02em;
}
.latest-posts {
    padding: 0 var(--space-xl) 100px;
    max-width: 1400px;
    margin: 0 auto;
}

.browse-header {
    padding: 80px var(--space-xl) 60px;
    max-width: 1400px;
    margin: 0 auto;
}
.search-container {
    position: relative;
    margin-bottom: 40px;
    max-width: 600px;
}
.search-input {
    width: 100%;
    padding: 20px 20px 20px 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 18px;
    font-family: inherit;
    transition: var(--transition-base);
}
.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
}
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-tertiary);
    font-size: 20px;
}
.filter-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.filter-chip {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    color: var(--color-text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}
.filter-chip:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}
.filter-chip.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    font-weight: 600;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px var(--space-xl) 100px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-tertiary);
    text-decoration: none;
    margin-bottom: 40px;
    font-weight: 500;
    transition: 0.2s;
    cursor: pointer;
}
.back-link:hover {
    color: #fff;
    transform: translateX(-4px);
}
.article-header {
    text-align: center;
    margin-bottom: 60px;
}
.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    color: var(--color-text-tertiary);
    font-family: monospace;
    font-size: 14px;
}
.meta-separator {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}
.article-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 30px;
}
.article-lead {
    font-size: 20px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding-left: 20px;
    text-align: left;
}
.article-body {
    color: #d0d0d0;
    font-size: 18px;
    line-height: 1.8;
}
.article-body p {
    margin-bottom: 24px;
}
.article-body h2 {
    color: #fff;
    font-size: 28px;
    margin: 40px 0 20px;
}
.article-body ul {
    margin-bottom: 24px;
    padding-left: 20px;
}
.article-body li {
    margin-bottom: 10px;
}
.article-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #fff;
}
.article-body blockquote {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 30px;
    margin: 30px 0;
    border-left: 4px solid #fff;
    font-style: italic;
    color: #fff;
}

.footer {
    padding: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 8, 8, 0.8);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: 14px;
    margin-top: auto;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 64px;
    }
    .top-bar {
        padding: 0 20px;
    }
    .latest-posts,
    .article-container,
    .browse-header {
        padding-left: 20px;
        padding-right: 20px;
    }
    .logo span.sub {
        display: none;
    }
}
a {
    color: #1e90ff;
    text-decoration: underline;
}
