/* ============================================
   Mediasquid Ghost Theme — v2.0
   ============================================ */

/* --- Self-hosted Fonts (DSGVO-konform) --- */

/* Archivo */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/archivo-v22-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/archivo-v22-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/archivo-v22-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/archivo-v22-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/archivo-v22-latin-800.woff2') format('woff2'); }

/* JetBrains Mono */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-v20-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-v20-latin-500.woff2') format('woff2'); }

/* Bebas Neue */
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/bebas-neue-v14-latin-regular.woff2') format('woff2'); }

:root {
    --ms-bg: #101215;
    --ms-bg-card: #16191d;
    --ms-bg-alt: #0f1215;
    --ms-text: #f4f1ea;
    --ms-text-2: #c9c4b8;
    --ms-text-3: #8b8a82;
    --ms-text-4: #6b6a62;
    --ms-accent: #4fd1c1;
    --ms-accent-hover: #6eddd0;
    --ms-accent-glow: rgba(79,209,193,0.25);
    --ms-accent2: #ff5a2e;
    --ms-border: rgba(255,255,255,0.08);
    --ms-border-hover: rgba(79,209,193,0.45);
    --ms-radius: 14px;
    --ms-font: 'Archivo', sans-serif;
    --ms-mono: 'JetBrains Mono', monospace;
    --ms-heading: 'Bebas Neue', 'Archivo Black', sans-serif;
    --ms-content-w: 720px;
    --ms-wide-w: 1040px;
    --ms-max-w: 1240px;
    --ms-nav-h: 64px;
    --ms-pad: clamp(20px, 5vw, 64px);
}


/* --- Reset --- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ms-bg);
    color: var(--ms-text);
    font-family: var(--ms-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

a { color: var(--ms-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ms-accent-hover); }
::selection { background: var(--ms-accent); color: var(--ms-bg); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--ms-heading); font-weight: 400; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; }


/* --- Film Strips (decorative) --- */

.ms-film-l,
.ms-film-r {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 14px;
    z-index: 40;
    pointer-events: none;
    background-image: repeating-linear-gradient(180deg, rgba(255,255,255,0.07) 0 8px, transparent 8px 22px);
    opacity: 0.35;
}
.ms-film-l { left: 0; }
.ms-film-r { right: 0; }

@media (max-width: 900px) {
    .ms-film-l, .ms-film-r { display: none; }
}


/* --- Navigation --- */

.ms-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 var(--ms-pad);
    height: var(--ms-nav-h);
    background: rgba(16, 18, 21, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ms-border);
}

.ms-nav__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ms-text);
    text-decoration: none;
}
.ms-nav__brand:hover { color: var(--ms-text); }

.ms-nav__logo { width: 28px; height: 28px; }

.ms-nav__name {
    font-family: var(--ms-heading);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ms-nav__badge {
    font-family: var(--ms-mono);
    font-size: 11px;
    color: var(--ms-accent);
    border: 1px solid rgba(79, 209, 193, 0.35);
    border-radius: 4px;
    padding: 2px 7px;
    letter-spacing: 0.06em;
    display: inline-block;
}

.ms-nav__links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 34px);
}

.ms-nav__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 34px);
}

.ms-nav__links li a {
    font-family: var(--ms-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ms-text-2);
    text-decoration: none;
    transition: color 0.2s;
}
.ms-nav__links li a:hover { color: var(--ms-accent); }
.ms-nav__links .nav-current a { color: var(--ms-accent); }

.ms-nav__cta {
    display: inline-flex;
    align-items: center;
    background: var(--ms-accent2);
    color: #08090b;
    font-family: var(--ms-font);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 999px;
    white-space: nowrap;
    transition: all 0.2s;
}
.ms-nav__cta:hover {
    background: #ff7a52;
    color: #08090b;
    box-shadow: 0 0 0 1px rgba(255,90,46,.4), 0 8px 32px -8px rgba(255,90,46,.45);
    transform: translateY(-2px);
}

@media (max-width: 760px) {
    .ms-nav__links { display: none; }
}


/* --- Layout --- */

.ms-main {
    padding-top: var(--ms-nav-h);
    min-height: 100vh;
}

.ms-container {
    max-width: var(--ms-max-w);
    margin: 0 auto;
    padding: 0 var(--ms-pad);
}


/* --- Utilities --- */

.ms-label {
    font-family: var(--ms-mono);
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ms-accent);
    margin: 0;
}

.ms-accent-i {
    color: var(--ms-accent2);
}


/* --- Hero (Blog Home) --- */

.ms-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(80px, 10vw, 140px) var(--ms-pad) clamp(40px, 5vw, 70px);
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 56px 56px;
}

.ms-hero__glow {
    position: absolute;
    top: -180px;
    right: -100px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(79, 209, 193, 0.1), transparent);
}

.ms-hero__glow2 {
    position: absolute;
    bottom: -160px;
    left: -100px;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 90, 46, 0.06), transparent);
}

.ms-hero__inner {
    max-width: var(--ms-max-w);
    margin: 0 auto;
    position: relative;
}

.ms-hero__title {
    font-size: clamp(36px, 5.5vw, 68px);
    line-height: 1.05;
    margin: 16px 0 0;
}

.ms-hero__desc {
    font-size: clamp(17px, 1.4vw, 20px);
    line-height: 1.6;
    color: var(--ms-text-2);
    max-width: 560px;
    margin: 18px 0 0;
    text-wrap: pretty;
}


/* --- Archive Hero (Tag / Author) --- */

.ms-archive-hero {
    padding: clamp(60px, 8vw, 100px) var(--ms-pad) clamp(30px, 4vw, 50px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
}

.ms-archive-hero__inner {
    max-width: var(--ms-max-w);
    margin: 0 auto;
}

.ms-archive-hero__title {
    font-size: clamp(32px, 4.5vw, 56px);
    margin: 12px 0 0;
}

.ms-archive-hero__desc {
    font-size: 18px;
    line-height: 1.6;
    color: var(--ms-text-2);
    margin: 14px 0 0;
    max-width: 600px;
    text-wrap: pretty;
}

.ms-archive-hero__count {
    font-family: var(--ms-mono);
    font-size: 13px;
    color: var(--ms-text-3);
    margin: 18px 0 0;
}

.ms-author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.ms-author-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(79, 209, 193, 0.3);
    object-fit: cover;
}

.ms-author-card__location {
    font-family: var(--ms-mono);
    font-size: 13px;
    color: var(--ms-text-3);
}

.ms-author-card__link {
    font-family: var(--ms-mono);
    font-size: 13px;
}


/* --- Post Grid --- */

.ms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: clamp(20px, 3vw, 28px);
    padding: clamp(40px, 5vw, 70px) 0;
}


/* --- Post Card --- */

.ms-card {
    background: var(--ms-bg-card);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.ms-card:hover {
    color: inherit;
    border-color: var(--ms-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(79, 209, 193, 0.06);
}

.ms-card__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    border-bottom: 1px solid var(--ms-border);
    background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 8px, transparent 8px 22px);
    background-size: 22px 5px;
    background-position: 0 3px;
    background-repeat: repeat-x;
}

.ms-card__bar span {
    font-family: var(--ms-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ms-text-4);
    background: var(--ms-bg-card);
    padding: 1px 6px;
}

.ms-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.ms-card__noimg {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(79, 209, 193, 0.04), rgba(255, 90, 46, 0.04));
}

.ms-card__body {
    padding: clamp(18px, 2vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ms-card__tag {
    align-self: flex-start;
    font-family: var(--ms-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--ms-accent);
    border: 1px solid rgba(79, 209, 193, 0.3);
    background: rgba(79, 209, 193, 0.06);
    border-radius: 5px;
    padding: 4px 9px;
    text-transform: uppercase;
}

.ms-card__title {
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.3;
}

.ms-card__excerpt {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ms-text-2);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* --- Single Post --- */

.ms-post {
    padding: clamp(40px, 5vw, 80px) var(--ms-pad);
}

.ms-post__head {
    max-width: var(--ms-content-w);
    margin: 0 auto clamp(28px, 3.5vw, 44px);
    text-align: center;
}

.ms-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.ms-post__tags a {
    font-family: var(--ms-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ms-accent);
    border: 1px solid rgba(79, 209, 193, 0.3);
    background: rgba(79, 209, 193, 0.06);
    border-radius: 5px;
    padding: 4px 10px;
    text-transform: uppercase;
    transition: background 0.2s;
}

.ms-post__tags a:hover {
    background: rgba(79, 209, 193, 0.12);
}

.ms-post__title {
    font-size: clamp(30px, 4.2vw, 50px);
    line-height: 1.1;
    margin: 0 0 20px;
}

.ms-post__meta {
    font-family: var(--ms-mono);
    font-size: 13px;
    color: var(--ms-text-3);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.ms-post__meta .sep { color: var(--ms-accent); }

.ms-post__feature {
    max-width: var(--ms-wide-w);
    margin: 0 auto clamp(28px, 3.5vw, 44px);
    border-radius: var(--ms-radius);
    overflow: hidden;
    border: 1px solid var(--ms-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.ms-post__feature img { width: 100%; display: block; }

.ms-post__feature figcaption {
    font-family: var(--ms-mono);
    font-size: 13px;
    color: var(--ms-text-3);
    text-align: center;
    padding: 12px 16px;
    background: var(--ms-bg-card);
}


/* --- Post Content --- */

.gh-content {
    max-width: var(--ms-content-w);
    margin: 0 auto;
    font-size: clamp(17px, 1.2vw, 19px);
    line-height: 1.78;
    color: var(--ms-text-2);
    word-break: break-word;
}

.gh-content > * + * { margin-top: 1.5em; }

.gh-content h2 {
    font-family: var(--ms-font);
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--ms-text);
    margin-top: 2.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.gh-content h3 {
    font-family: var(--ms-font);
    font-size: clamp(20px, 1.9vw, 26px);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--ms-text);
    margin-top: 2em;
    margin-bottom: 0.5em;
    line-height: 1.25;
}

.gh-content h4 {
    font-family: var(--ms-font);
    font-size: clamp(18px, 1.5vw, 22px);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--ms-text);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.gh-content p { margin: 0; }
.gh-content strong { color: var(--ms-text); font-weight: 600; }

.gh-content a {
    color: var(--ms-accent);
    text-decoration: underline;
    text-decoration-color: rgba(79, 209, 193, 0.3);
    text-underline-offset: 3px;
}
.gh-content a:hover {
    text-decoration-color: var(--ms-accent);
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.4em;
    margin: 0;
}
.gh-content li { margin-bottom: 0.4em; }
.gh-content li::marker { color: var(--ms-accent); }

.gh-content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    border-left: 3px solid var(--ms-accent2);
    background: var(--ms-bg-card);
    border-radius: 0 12px 12px 0;
    font-size: 1.1em;
    color: var(--ms-text);
    line-height: 1.65;
}
.gh-content blockquote p { margin: 0; }

.gh-content pre {
    margin: 0;
    padding: 22px;
    background: var(--ms-bg-card);
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    overflow-x: auto;
    font-family: var(--ms-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--ms-text);
}

.gh-content code {
    font-family: var(--ms-mono);
    font-size: 0.88em;
    background: var(--ms-bg-card);
    border: 1px solid var(--ms-border);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--ms-accent);
}
.gh-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.gh-content hr {
    border: none;
    height: 1px;
    background: var(--ms-border);
    margin: 3em 0;
}

.gh-content figure { margin: 2em 0; }

.gh-content figcaption {
    font-family: var(--ms-mono);
    font-size: 13px;
    color: var(--ms-text-3);
    text-align: center;
    margin-top: 12px;
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.gh-content th {
    font-family: var(--ms-mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ms-text-3);
    padding: 12px 14px;
    border-bottom: 2px solid var(--ms-border);
    text-align: left;
}

.gh-content td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ms-border);
}


/* --- Ghost Cards --- */

.kg-card { margin: 2em 0; }

.gh-content .kg-image-card img {
    border-radius: 10px;
    margin: 0 auto;
}

.gh-content .kg-width-wide {
    width: 85vw;
    max-width: var(--ms-wide-w);
    margin-left: calc(50% - min(42.5vw, calc(var(--ms-wide-w) / 2)));
    margin-right: calc(50% - min(42.5vw, calc(var(--ms-wide-w) / 2)));
}

.gh-content .kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.gh-content .kg-width-full img { border-radius: 0; }

.gh-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gh-content .kg-gallery-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.gh-content .kg-gallery-image img {
    border-radius: 8px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-content .kg-bookmark-card {
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--ms-bg-card);
    transition: border-color 0.2s;
}
.gh-content .kg-bookmark-card:hover {
    border-color: var(--ms-border-hover);
}

.gh-content .kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.gh-content .kg-bookmark-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gh-content .kg-bookmark-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ms-text);
    line-height: 1.4;
}

.gh-content .kg-bookmark-description {
    font-size: 14px;
    color: var(--ms-text-2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-content .kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ms-mono);
    font-size: 12px;
    color: var(--ms-text-3);
}

.gh-content .kg-bookmark-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.gh-content .kg-bookmark-thumbnail {
    width: 200px;
    flex-shrink: 0;
}
.gh-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.gh-content .kg-callout-card {
    padding: 20px 24px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--ms-bg-card);
    border: 1px solid var(--ms-border);
}

.gh-content .kg-callout-emoji { font-size: 1.2em; }
.gh-content .kg-callout-text { flex: 1; }

.gh-content .kg-toggle-card {
    background: var(--ms-bg-card);
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    padding: 18px 22px;
}

.gh-content .kg-toggle-heading-text {
    font-weight: 600;
    cursor: pointer;
}

.gh-content .kg-button-card { text-align: center; }

.gh-content .kg-button-card .kg-btn {
    display: inline-flex;
    align-items: center;
    background: var(--ms-accent2);
    color: #08090b;
    font-family: var(--ms-font);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 18px 34px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s;
}
.gh-content .kg-button-card .kg-btn:hover {
    background: #ff7a52;
    box-shadow: 0 0 0 1px rgba(255,90,46,.4), 0 8px 32px -8px rgba(255,90,46,.45);
}

.gh-content .kg-embed-card {
    border-radius: 12px;
    overflow: hidden;
}

.gh-content .kg-embed-card iframe {
    width: 100%;
    border: none;
}


/* --- Post Footer (Prev / Next) --- */

.ms-post-nav {
    max-width: var(--ms-wide-w);
    margin: clamp(50px, 6vw, 80px) auto 0;
    padding: clamp(30px, 4vw, 50px) var(--ms-pad) 0;
    border-top: 1px solid var(--ms-border);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.ms-post-nav a {
    font-family: var(--ms-mono);
    font-size: 13px;
    color: var(--ms-text-3);
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    transition: color 0.2s;
    max-width: 45%;
}
.ms-post-nav a:hover { color: var(--ms-accent); }

.ms-post-nav a span {
    font-family: var(--ms-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--ms-text);
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.ms-post-nav a:hover span { color: var(--ms-accent); }

.ms-post-nav__next {
    text-align: right;
    margin-left: auto;
}


/* --- Pagination --- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 30px 0 clamp(50px, 6vw, 80px);
    font-family: var(--ms-mono);
    font-size: 14px;
}

.pagination a {
    color: var(--ms-accent);
    padding: 10px 20px;
    border: 1px solid rgba(79, 209, 193, 0.3);
    border-radius: 8px;
    transition: all 0.2s;
}
.pagination a:hover {
    background: rgba(79, 209, 193, 0.08);
    border-color: var(--ms-accent);
}

.pagination .page-number {
    color: var(--ms-text-3);
}


/* --- Static Page --- */

.ms-page {
    padding: clamp(40px, 5vw, 80px) var(--ms-pad);
}

.ms-page__head {
    max-width: var(--ms-content-w);
    margin: 0 auto clamp(28px, 3.5vw, 40px);
}

.ms-page__title {
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.1;
}


/* --- Error Page --- */

.ms-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--ms-nav-h));
    padding: 60px var(--ms-pad);
    text-align: center;
    position: relative;
}

.ms-error__code {
    font-family: var(--ms-mono);
    font-size: clamp(80px, 15vw, 180px);
    font-weight: 700;
    color: var(--ms-accent);
    opacity: 0.1;
    line-height: 1;
    position: absolute;
    pointer-events: none;
}

.ms-error__terminal {
    font-family: var(--ms-mono);
    font-size: 15px;
    color: var(--ms-text-4);
    line-height: 2;
    position: relative;
}
.ms-error__terminal .accent { color: var(--ms-accent); }

.ms-error__title {
    font-size: clamp(28px, 4vw, 44px);
    margin: 24px 0 16px;
    position: relative;
}

.ms-error__desc {
    font-size: 18px;
    color: var(--ms-text-2);
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.ms-error__cta {
    display: inline-flex;
    align-items: center;
    background: var(--ms-accent2);
    color: #08090b;
    font-family: var(--ms-font);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 18px 34px;
    border-radius: 999px;
    transition: all 0.2s;
    position: relative;
}
.ms-error__cta:hover {
    background: #ff7a52;
    color: #08090b;
    box-shadow: 0 0 0 1px rgba(255,90,46,.4), 0 8px 32px -8px rgba(255,90,46,.45);
    transform: translateY(-2px);
}


/* --- Footer --- */

.ms-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(50px, 6vw, 80px) var(--ms-pad) 36px;
    background: #08090b;
    color: var(--ms-text-2);
}

.ms-footer__inner {
    max-width: var(--ms-max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(3, auto);
    gap: 64px;
}

.ms-footer__brand {
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ms-footer__brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ms-footer__brand-row img { width: 26px; height: 26px; }
.ms-footer__brand-row span {
    font-family: var(--ms-heading);
    font-weight: 400;
    font-size: 17px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ms-text);
}

.ms-footer__brand p {
    font-size: 14px;
    line-height: 1.65;
    margin: 0;
    color: var(--ms-text-3);
}
.ms-footer__brand strong { color: var(--ms-text-2); font-weight: 700; }

.ms-footer__cols {
    display: flex;
    gap: clamp(40px, 6vw, 80px);
    flex-wrap: wrap;
}

.ms-footer__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: var(--ms-font);
    font-size: 15px;
}

.ms-footer__col-label {
    font-family: var(--ms-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ms-text-4);
}

.ms-footer__col a { color: var(--ms-text-2); }
.ms-footer__col a:hover { color: var(--ms-accent); }

.ms-footer__copy {
    max-width: var(--ms-max-w);
    margin: 48px auto 0;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--ms-mono);
    font-size: 11px;
    color: var(--ms-text-3);
}


/* --- Scroll Reveal --- */

.ms-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.ms-revealed {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive --- */

@media (max-width: 900px) {
    .ms-footer__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .ms-grid {
        grid-template-columns: 1fr;
    }
    .ms-post-nav {
        flex-direction: column;
    }
    .ms-post-nav a {
        max-width: 100%;
    }
    .ms-post-nav__next {
        text-align: left;
    }
    .gh-content .kg-bookmark-container {
        flex-direction: column;
    }
    .gh-content .kg-bookmark-thumbnail {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}
