/**
 * CORE01 — Main Stylesheet
 *
 * A dark, immersive editorial theme for an AI observer.
 *
 * Table of Contents:
 * 1. Variables & Custom Properties
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout & Container
 * 5. Utility Classes
 * 6. Header
 * 7. Footer
 * 8. Buttons
 * 9. Cards
 * 10. System Labels & Micro Text
 * 11. Hero Section
 * 12. Core Orb
 * 13. System Status
 * 14. Latest Logs Section
 * 15. Narrative Section
 * 16. Closing CTA
 * 17. Single Log (Post)
 * 18. Entry Content (Rich Text)
 * 19. Post Navigation
 * 20. Archive & Index Pages
 * 21. Search Page
 * 22. Error 404
 * 23. Static Page
 * 24. Pagination
 * 25. Search Form
 * 26. Animations & Keyframes
 * 27. Responsive — Tablet (768px)
 * 28. Responsive — Mobile (480px)
 */

/* ==========================================================================
   1. Variables & Custom Properties
   ========================================================================== */

:root {
    /* Colors */
    --c-bg-primary: #000000;
    --c-bg-secondary: #080808;
    --c-bg-tertiary: #111111;
    --c-bg-card: #0a0a0a;
    --c-border: rgba(255, 255, 255, 0.08);
    --c-border-hover: rgba(255, 255, 255, 0.15);
    --c-text-primary: #ffffff;
    --c-text-secondary: rgba(255, 255, 255, 0.68);
    --c-text-tertiary: rgba(255, 255, 255, 0.4);
    --c-accent: #ff2a2a;
    --c-accent-hover: #e02020;
    --c-accent-glow: rgba(255, 42, 42, 0.15);
    --c-accent-glow-strong: rgba(255, 42, 42, 0.3);

    /* Typography */
    --font-heading: 'Space Grotesk', 'Arial', sans-serif;
    --font-body: 'Inter', 'Arial', 'Helvetica', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --sp-xs: 0.25rem;
    --sp-sm: 0.5rem;
    --sp-md: 1rem;
    --sp-lg: 1.5rem;
    --sp-xl: 2rem;
    --sp-2xl: 3rem;
    --sp-3xl: 4rem;
    --sp-4xl: 6rem;
    --sp-5xl: 8rem;

    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 780px;
    --header-height: 70px;

    /* Transitions */
    --transition: 0.3s ease;
    --transition-slow: 0.6s ease;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--c-text-secondary);
    background-color: var(--c-bg-primary);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--c-text-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--c-accent);
}

ul,
ol {
    list-style: none;
}

::selection {
    background: var(--c-accent);
    color: var(--c-text-primary);
}

:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--c-text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: var(--sp-md);
}

p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   4. Layout & Container
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--sp-xl);
    padding-right: var(--sp-xl);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

.site-content {
    min-height: 100vh;
}

.section {
    padding: var(--sp-5xl) 0;
    position: relative;
}

.section__title {
    margin-bottom: var(--sp-3xl);
}

.section__cta {
    text-align: center;
    margin-top: var(--sp-3xl);
}

.section__empty {
    text-align: center;
    color: var(--c-text-tertiary);
    font-style: italic;
    padding: var(--sp-3xl) 0;
}

/* ==========================================================================
   5. Utility Classes
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.accent {
    color: var(--c-accent);
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   6. Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--c-border);
    transition: background var(--transition), box-shadow var(--transition);
}

.site-header.header--scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.5);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.header__logo-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header__logo-text:hover {
    color: var(--c-text-primary);
}

.header__logo .custom-logo {
    max-height: 36px;
    width: auto;
}

.header__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-accent);
    box-shadow: 0 0 8px var(--c-accent-glow-strong);
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Navigation */
.header__nav .nav-menu {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
}

.header__nav .nav-menu li a {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--c-text-secondary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: var(--sp-xs) 0;
    position: relative;
    transition: color var(--transition);
}

.header__nav .nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--c-accent);
    transition: width var(--transition);
}

.header__nav .nav-menu li a:hover,
.header__nav .nav-menu li.current-menu-item a {
    color: var(--c-text-primary);
}

.header__nav .nav-menu li a:hover::after,
.header__nav .nav-menu li.current-menu-item a::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.header__menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--sp-sm);
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--c-text-primary);
    position: relative;
    transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: var(--c-text-primary);
    left: 0;
    transition: transform var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Menu toggle active state */
.header__menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.header__menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: translateY(7px) rotate(45deg);
}

.header__menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: translateY(-7px) rotate(-45deg);
}

/* Body offset for fixed header */
.site-content {
    padding-top: var(--header-height);
}

/* ==========================================================================
   7. Footer
   ========================================================================== */

.site-footer {
    padding: var(--sp-3xl) 0;
    border-top: 1px solid var(--c-border);
    background: var(--c-bg-primary);
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-lg);
    text-align: center;
}

.footer__logo-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer__logo-text:hover {
    color: var(--c-text-primary);
}

.footer__nav .footer-menu {
    display: flex;
    gap: var(--sp-lg);
}

.footer__nav .footer-menu li a {
    font-size: 0.75rem;
    color: var(--c-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color var(--transition);
}

.footer__nav .footer-menu li a:hover {
    color: var(--c-text-primary);
}

.footer__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
}

.footer__copy {
    font-size: 0.75rem;
    color: var(--c-text-tertiary);
    margin: 0;
}

.footer__signal {
    opacity: 0.4;
}

/* ==========================================================================
   8. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.85rem 1.8rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: var(--c-text-primary);
}

.btn--primary:hover {
    background: var(--c-accent-hover);
    border-color: var(--c-accent-hover);
    color: var(--c-text-primary);
    box-shadow: 0 0 25px var(--c-accent-glow);
}

.btn--ghost {
    background: transparent;
    border-color: var(--c-border-hover);
    color: var(--c-text-secondary);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--c-text-secondary);
    color: var(--c-text-primary);
}

/* ==========================================================================
   9. Cards
   ========================================================================== */

.card {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    border-color: rgba(255, 42, 42, 0.2);
    box-shadow: 0 0 30px rgba(255, 42, 42, 0.05);
    transform: translateY(-2px);
}

.card__thumbnail {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

.card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card__thumbnail img {
    transform: scale(1.03);
}

.card__body {
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.card__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.card__date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.05em;
}

.card__title {
    font-size: 1.125rem;
    line-height: 1.35;
    margin: 0;
}

.card__title a {
    color: var(--c-text-primary);
    transition: color var(--transition);
}

.card__title a:hover {
    color: var(--c-accent);
}

.card__excerpt {
    font-size: 0.875rem;
    color: var(--c-text-tertiary);
    line-height: 1.6;
}

.card__excerpt p {
    margin: 0;
}

.card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--sp-sm);
    padding-top: var(--sp-sm);
    border-top: 1px solid var(--c-border);
}

.card__read-time {
    font-size: 0.7rem;
    color: var(--c-text-tertiary);
    font-family: var(--font-mono);
}

.card__link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--c-accent);
    letter-spacing: 0.04em;
    transition: color var(--transition);
}

.card__link:hover {
    color: var(--c-text-primary);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-xl);
}

/* ==========================================================================
   10. System Labels & Micro Text
   ========================================================================== */

.system-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--c-text-tertiary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--sp-md);
}

.category-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-accent);
    padding: 0.2rem 0.65rem;
    border: 1px solid rgba(255, 42, 42, 0.3);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.category-badge:hover {
    background: var(--c-accent-glow);
    color: var(--c-accent);
}

.tag-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--c-text-tertiary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.tag-label:hover {
    border-color: var(--c-border-hover);
    color: var(--c-text-secondary);
}

/* ==========================================================================
   11. Hero Section
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--sp-5xl) 0;
}

.hero__ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero__grid-lines {
    position: absolute;
    inset: 0;
    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;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3xl);
    align-items: center;
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.hero__title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    margin: 0;
}

.hero__subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--c-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.hero__description {
    font-size: 0.9375rem;
    color: var(--c-text-tertiary);
    max-width: 500px;
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    gap: var(--sp-md);
    margin-top: var(--sp-md);
}

.hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__scroll-hint {
    position: absolute;
    bottom: var(--sp-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
    z-index: 1;
}

.hero__scroll-text {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero__scroll-line {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--c-text-tertiary), transparent);
    animation: scroll-line 2s ease-in-out infinite;
}

/* ==========================================================================
   12. Core Orb
   ========================================================================== */

.core-orb {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-orb__ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--c-border);
}

.core-orb__ring--outer {
    width: 100%;
    height: 100%;
    border-color: rgba(255, 42, 42, 0.08);
    animation: orb-rotate 20s linear infinite;
}

.core-orb__ring--middle {
    width: 70%;
    height: 70%;
    border-color: rgba(255, 42, 42, 0.12);
    animation: orb-rotate 15s linear infinite reverse;
}

.core-orb__ring--inner {
    width: 40%;
    height: 40%;
    border-color: rgba(255, 42, 42, 0.2);
    animation: orb-rotate 10s linear infinite;
}

.core-orb__center {
    width: 20%;
    height: 20%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--c-accent) 0%, rgba(255, 42, 42, 0.4) 40%, transparent 70%);
    box-shadow: 0 0 40px var(--c-accent-glow), 0 0 80px rgba(255, 42, 42, 0.08);
    animation: orb-pulse 3s ease-in-out infinite;
}

/* Ring tick marks */
.core-orb__ring--outer::before,
.core-orb__ring--middle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--c-accent);
    opacity: 0.5;
}

/* ==========================================================================
   13. System Status
   ========================================================================== */

.section--status {
    background: var(--c-bg-secondary);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--sp-md);
}

.status-card {
    background: var(--c-bg-primary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    transition: border-color var(--transition);
}

.status-card:hover {
    border-color: var(--c-border-hover);
}

.status-card__indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-bottom: var(--sp-xs);
}

.status-card__indicator--active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-card__indicator--stable {
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.status-card__indicator--monitored {
    background: var(--c-accent);
    box-shadow: 0 0 8px var(--c-accent-glow);
    animation: pulse-dot 2.5s ease-in-out infinite;
}

.status-card__label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-card__value {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--c-text-primary);
}

/* ==========================================================================
   14. Latest Logs Section
   ========================================================================== */

.section--logs {
    background: var(--c-bg-primary);
}

/* ==========================================================================
   15. Narrative Section
   ========================================================================== */

.section--narrative {
    background: var(--c-bg-secondary);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}

.narrative {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    text-align: center;
}

.narrative__text {
    border: none;
    padding: 0;
    margin: 0;
}

.narrative__text p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--c-text-secondary);
    margin-bottom: var(--sp-lg);
}

.narrative__text p:last-child {
    margin-bottom: 0;
}

.narrative__signal {
    display: block;
    margin-top: var(--sp-2xl);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
}

/* ==========================================================================
   16. Closing CTA
   ========================================================================== */

.section--cta {
    background: var(--c-bg-primary);
}

.closing-cta {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-md);
}

.closing-cta__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.closing-cta__text {
    color: var(--c-text-tertiary);
    font-size: 1rem;
}

/* ==========================================================================
   17. Single Log (Post)
   ========================================================================== */

.single-log__header {
    padding: var(--sp-4xl) 0 var(--sp-2xl);
    text-align: center;
}

.single-log__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-md);
    margin: var(--sp-lg) 0;
    flex-wrap: wrap;
}

.single-log__date {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.05em;
}

.single-log__read-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--c-text-tertiary);
    padding-left: var(--sp-md);
    border-left: 1px solid var(--c-border);
}

.single-log__title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.single-log__thumbnail {
    margin-bottom: var(--sp-3xl);
}

.single-log__thumbnail img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
}

.single-log__content {
    padding-bottom: var(--sp-4xl);
}

.single-log__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-top: var(--sp-3xl);
    padding-top: var(--sp-xl);
    border-top: 1px solid var(--c-border);
}

.single-log__footer {
    margin-top: var(--sp-3xl);
    padding-top: var(--sp-xl);
    border-top: 1px solid var(--c-border);
    text-align: center;
}

.single-log__closure-text {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.08em;
    margin-top: var(--sp-sm);
}

/* ==========================================================================
   18. Entry Content (Rich Text)
   ========================================================================== */

.entry-content {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--c-text-secondary);
}

.entry-content h2 {
    margin-top: var(--sp-3xl);
    margin-bottom: var(--sp-lg);
    padding-top: var(--sp-xl);
}

.entry-content h3 {
    margin-top: var(--sp-2xl);
    margin-bottom: var(--sp-md);
}

.entry-content h4 {
    margin-top: var(--sp-xl);
    margin-bottom: var(--sp-md);
}

.entry-content p {
    margin-bottom: var(--sp-lg);
}

.entry-content a {
    color: var(--c-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 42, 42, 0.3);
    transition: text-decoration-color var(--transition);
}

.entry-content a:hover {
    text-decoration-color: var(--c-accent);
}

.entry-content strong {
    color: var(--c-text-primary);
    font-weight: 600;
}

.entry-content em {
    font-style: italic;
}

.entry-content blockquote {
    margin: var(--sp-2xl) 0;
    padding: var(--sp-lg) var(--sp-xl);
    border-left: 3px solid var(--c-accent);
    background: var(--c-bg-secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-content blockquote p {
    font-size: 1rem;
    color: var(--c-text-secondary);
    font-style: italic;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content ul,
.entry-content ol {
    margin: var(--sp-lg) 0;
    padding-left: var(--sp-xl);
}

.entry-content ul {
    list-style: none;
}

.entry-content ul li {
    position: relative;
    padding-left: var(--sp-md);
    margin-bottom: var(--sp-sm);
}

.entry-content ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--c-accent);
    font-weight: 600;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content ol li {
    margin-bottom: var(--sp-sm);
    padding-left: var(--sp-xs);
}

.entry-content ol li::marker {
    color: var(--c-accent);
    font-weight: 600;
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: var(--sp-2xl) 0;
    border: 1px solid var(--c-border);
}

.entry-content figure {
    margin: var(--sp-2xl) 0;
}

.entry-content figure img {
    margin: 0;
}

.entry-content figcaption {
    font-size: 0.8125rem;
    color: var(--c-text-tertiary);
    text-align: center;
    margin-top: var(--sp-sm);
    font-style: italic;
}

.entry-content pre {
    background: var(--c-bg-secondary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    margin: var(--sp-2xl) 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--c-text-secondary);
}

.entry-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--c-bg-tertiary);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    color: var(--c-accent);
}

.entry-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

.entry-content hr {
    border: none;
    height: 1px;
    background: var(--c-border);
    margin: var(--sp-3xl) 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--sp-2xl) 0;
}

.entry-content th,
.entry-content td {
    padding: var(--sp-sm) var(--sp-md);
    border: 1px solid var(--c-border);
    text-align: left;
}

.entry-content th {
    background: var(--c-bg-secondary);
    font-weight: 600;
    color: var(--c-text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   19. Post Navigation
   ========================================================================== */

.single-log__nav {
    padding: var(--sp-2xl) 0;
    border-top: 1px solid var(--c-border);
    background: var(--c-bg-secondary);
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xl);
}

.post-nav__link {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    padding: var(--sp-lg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), background var(--transition);
}

.post-nav__link:hover {
    border-color: var(--c-border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.post-nav__link--next {
    text-align: right;
}

.post-nav__label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.post-nav__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--c-text-primary);
    line-height: 1.4;
}

/* ==========================================================================
   20. Archive & Index Pages
   ========================================================================== */

.archive-page {
    padding: var(--sp-4xl) 0 var(--sp-5xl);
}

.archive-page__header {
    margin-bottom: var(--sp-3xl);
}

.archive-page__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--sp-md);
}

.archive-page__description {
    color: var(--c-text-secondary);
    font-size: 1rem;
    max-width: 600px;
}

.archive-page__description p {
    margin: 0;
}

/* ==========================================================================
   21. Search Page
   ========================================================================== */

.search-page {
    padding: var(--sp-4xl) 0 var(--sp-5xl);
}

.search-page__header {
    margin-bottom: var(--sp-lg);
}

.search-page__title {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    margin-bottom: var(--sp-sm);
}

.search-page__count {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--c-text-tertiary);
}

.search-page__form {
    margin-bottom: var(--sp-3xl);
}

/* ==========================================================================
   22. Error 404
   ========================================================================== */

.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4xl) 0;
}

.error-page__inner {
    text-align: center;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-md);
}

.error-page__visual {
    margin-bottom: var(--sp-lg);
}

.error-page__glitch {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 12vw, 8rem);
    font-weight: 700;
    color: var(--c-text-primary);
    opacity: 0.08;
    letter-spacing: -0.05em;
    line-height: 1;
    user-select: none;
}

.error-page__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0;
}

.error-page__text {
    color: var(--c-text-tertiary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.error-page__actions {
    margin-top: var(--sp-md);
}

.error-page__search {
    margin-top: var(--sp-xl);
    width: 100%;
    max-width: 400px;
}

.error-page__signal {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--c-text-tertiary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-top: var(--sp-lg);
}

/* ==========================================================================
   23. Static Page
   ========================================================================== */

.single-page__header {
    padding: var(--sp-4xl) 0 var(--sp-2xl);
    text-align: center;
}

.single-page__title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0;
}

.single-page__thumbnail {
    margin-bottom: var(--sp-3xl);
}

.single-page__thumbnail img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
}

.single-page__content {
    padding-bottom: var(--sp-4xl);
}

/* ==========================================================================
   24. Pagination
   ========================================================================== */

.pagination {
    margin-top: var(--sp-3xl);
    padding-top: var(--sp-xl);
    border-top: 1px solid var(--c-border);
}

.pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--sp-sm);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--c-text-tertiary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    color: var(--c-text-primary);
    border-color: var(--c-accent);
    background: var(--c-accent-glow);
}

.pagination .page-numbers.current {
    font-weight: 600;
}

.pagination .prev,
.pagination .next {
    letter-spacing: 0.03em;
}

/* ==========================================================================
   25. Search Form
   ========================================================================== */

.search-form {
    display: flex;
    gap: var(--sp-sm);
}

.search-form .search-field {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--c-text-primary);
    background: var(--c-bg-secondary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color var(--transition);
}

.search-form .search-field::placeholder {
    color: var(--c-text-tertiary);
}

.search-form .search-field:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-accent-glow);
}

.search-form .search-submit {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-text-primary);
    background: var(--c-accent);
    border: 1px solid var(--c-accent);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
}

.search-form .search-submit:hover {
    background: var(--c-accent-hover);
    box-shadow: 0 0 20px var(--c-accent-glow);
}

/* ==========================================================================
   26. Animations & Keyframes
   ========================================================================== */

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes orb-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes orb-pulse {
    0%, 100% {
        box-shadow: 0 0 40px var(--c-accent-glow), 0 0 80px rgba(255, 42, 42, 0.08);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px var(--c-accent-glow-strong), 0 0 120px rgba(255, 42, 42, 0.12);
        transform: scale(1.05);
    }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    50.01% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* Reveal animation base */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveals */
.status-card.reveal:nth-child(1) { transition-delay: 0s; }
.status-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.status-card.reveal:nth-child(3) { transition-delay: 0.2s; }
.status-card.reveal:nth-child(4) { transition-delay: 0.3s; }
.status-card.reveal:nth-child(5) { transition-delay: 0.4s; }

.posts-grid .card.reveal:nth-child(1) { transition-delay: 0s; }
.posts-grid .card.reveal:nth-child(2) { transition-delay: 0.1s; }
.posts-grid .card.reveal:nth-child(3) { transition-delay: 0.15s; }
.posts-grid .card.reveal:nth-child(4) { transition-delay: 0.2s; }
.posts-grid .card.reveal:nth-child(5) { transition-delay: 0.25s; }
.posts-grid .card.reveal:nth-child(6) { transition-delay: 0.3s; }

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   27. Responsive — Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__content {
        align-items: center;
    }

    .hero__description {
        max-width: 100%;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__visual {
        display: none;
    }

    .status-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav__link--next {
        text-align: left;
    }
}

/* ==========================================================================
   28. Responsive — Mobile (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding-left: var(--sp-md);
        padding-right: var(--sp-md);
    }

    .section {
        padding: var(--sp-3xl) 0;
    }

    /* Mobile navigation */
    .header__menu-toggle {
        display: block;
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--c-bg-primary);
        border-left: 1px solid var(--c-border);
        padding: calc(var(--header-height) + var(--sp-xl)) var(--sp-xl) var(--sp-xl);
        transition: right var(--transition);
        z-index: 999;
    }

    .header__nav.nav--open {
        right: 0;
    }

    .header__nav .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .header__nav .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--c-border);
    }

    .header__nav .nav-menu li a {
        display: block;
        padding: var(--sp-md) 0;
        font-size: 0.875rem;
    }

    /* Hero mobile */
    .hero {
        min-height: 85vh;
        padding: var(--sp-3xl) 0;
    }

    .hero__title {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__scroll-hint {
        display: none;
    }

    /* Status grid mobile */
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-card:last-child {
        grid-column: span 2;
    }

    /* Posts grid mobile */
    .posts-grid {
        grid-template-columns: 1fr;
    }

    /* Single post mobile */
    .single-log__title {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }

    .single-log__meta {
        flex-direction: column;
        gap: var(--sp-sm);
    }

    .single-log__read-time {
        border-left: none;
        padding-left: 0;
    }

    /* Footer mobile */
    .footer__nav .footer-menu {
        flex-direction: column;
        align-items: center;
        gap: var(--sp-sm);
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .status-grid {
        grid-template-columns: 1fr;
    }

    .status-card:last-child {
        grid-column: span 1;
    }

    .hero__title {
        font-size: 2.25rem;
    }

    .post-nav__link {
        padding: var(--sp-md);
    }
}
