/* styles.css — joost.com.ua — dark slate + muted amber / editorial tech */

:root {
    color-scheme: dark;

    /* Palette */
    --bg: #111419;
    --surface: #161a21;
    --card: #1c212a;
    --raised: #222833;
    --code-bg: #0d1014;
    --text: #dcdfe4;
    --heading: #eef0f3;
    --muted: #a1a9b4;
    --subtle: #8a93a0;
    --accent: #d9a55b;
    --accent-hover: #e8bb7a;
    --accent-visited: #c79a6a;
    --accent-soft: rgba(217, 165, 91, 0.12);
    --accent-line: rgba(217, 165, 91, 0.38);
    --accent2: #8fbcaa;
    --accent2-soft: rgba(143, 188, 170, 0.12);
    --warning: #e39a7c;
    --warning-soft: rgba(227, 154, 124, 0.12);
    --border: #262c36;
    --border-strong: #333a46;
    --selection: rgba(217, 165, 91, 0.32);
    --focus: #f0c688;

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: "Iowan Old Style", "Charter", "Georgia", "Times New Roman", serif;
    --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --fs-base: 1rem;
    --fs-sm: 0.875rem;
    --fs-xs: 0.75rem;
    --lh-body: 1.72;
    --lh-head: 1.3;
    --measure: 70ch;

    /* Spacing scale */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;

    --space-sm: var(--s-2);
    --space-md: var(--s-4);
    --space-lg: var(--s-6);

    /* Shape */
    --radius: 10px;
    --radius-sm: 6px;
    --radius-pill: 999px;
    --bw: 1px;

    --container: 1200px;
    --gutter: 16px;
    --header-h: 60px;
    --ease: 0.18s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + var(--s-4));
    background-color: var(--bg);
    scrollbar-color: var(--border-strong) var(--bg);
    scrollbar-width: thin;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: radial-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text);
    font-family: var(--font-main);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: var(--lh-body);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--selection);
    color: var(--heading);
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border: 2px solid var(--bg);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: #454d5b; }
::-webkit-scrollbar-corner { background: var(--bg); }

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img, video {
    border-radius: var(--radius-sm);
    filter: brightness(0.92);
}

ul, ol { list-style: none; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--ease), background-color var(--ease), border-color var(--ease);
}

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

:focus { outline: none; }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--heading);
    font-weight: 700;
    line-height: var(--lh-head);
    letter-spacing: -0.005em;
    overflow-wrap: break-word;
    hyphens: auto;
}

strong, b { font-weight: 600; color: var(--heading); }

small { font-size: var(--fs-sm); color: var(--muted); }

mark {
    background: var(--accent-soft);
    color: var(--heading);
    padding: 0 var(--s-1);
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 var(--accent-line);
}

abbr[title] {
    text-decoration: underline dotted var(--subtle);
    cursor: help;
}

/* Forms */
input, textarea, select, button {
    font: inherit;
    color: inherit;
}

input, textarea, select {
    width: 100%;
    min-height: 44px;
    padding: var(--s-3) var(--s-4);
    background: var(--code-bg);
    color: var(--text);
    border: var(--bw) solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--ease);
}

input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }

input:hover, textarea:hover, select:hover { border-color: #454d5b; }

input:focus-visible, textarea:focus-visible, select:focus-visible {
    border-color: var(--accent);
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

textarea { min-height: 120px; resize: vertical; }

input[type="checkbox"], input[type="radio"] {
    width: auto;
    min-height: 0;
    accent-color: var(--accent);
}

button, .button, input[type="submit"], input[type="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    width: auto;
    min-height: 44px;
    padding: var(--s-2) var(--s-5);
    background: var(--raised);
    color: var(--heading);
    border: var(--bw) solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

button:hover, .button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
}

button:active, input[type="submit"]:active {
    background: var(--accent);
    color: #1a1510;
    border-color: var(--accent);
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17, 20, 25, 0.92);
    -webkit-backdrop-filter: saturate(120%) blur(10px);
    backdrop-filter: saturate(120%) blur(10px);
    border-bottom: var(--bw) solid var(--border);
}

.header-inner {
    max-width: var(--container);
    min-height: var(--header-h);
    margin: 0 auto;
    padding: var(--s-2) var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-4);
}

.logo-name {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 44px;
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: 0.005em;
    white-space: nowrap;
}

.logo-name::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

a.logo-name:hover, .logo-name a:hover { color: var(--heading); }

.logo-name a { color: inherit; }

.main-nav {
    display: none;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--s-1);
    color: var(--muted);
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active,
.main-nav a[aria-current="page"] {
    color: var(--heading);
    border-bottom-color: var(--accent);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lang-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 var(--s-2);
    color: var(--muted);
    border: var(--bw) solid transparent;
    border-radius: var(--radius-sm);
}

.lang-switcher a:hover {
    color: var(--heading);
    border-color: var(--border-strong);
}

.lang-switcher a.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-line);
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
main {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--s-6) var(--gutter) var(--s-7);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
    align-items: center;
    margin-bottom: var(--s-7);
}

.hero-visual {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    background: var(--card);
    border: var(--bw) solid var(--border);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    min-width: 0;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    width: fit-content;
    max-width: 100%;
    padding: var(--s-1) var(--s-3);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent2);
    background: var(--accent2-soft);
    border: var(--bw) solid rgba(143, 188, 170, 0.3);
    border-radius: var(--radius-pill);
}

.article-title {
    font-family: var(--font-head);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--heading);
    overflow-wrap: break-word;
    hyphens: auto;
}

.lead {
    max-width: var(--measure);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--muted);
}

.meta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3) var(--s-5);
    margin-top: var(--s-2);
    padding-top: var(--s-4);
    border-top: var(--bw) solid var(--border);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.meta-item .label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--subtle);
}

.meta-item .value {
    font-size: var(--fs-sm);
    color: var(--text);
}

.meta-divider {
    display: none;
    width: var(--bw);
    height: 32px;
    background: var(--border-strong);
}

/* =============================================
   CONTENT WRAPPER
   ============================================= */
.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
    align-items: start;
    margin-bottom: var(--s-7);
}

.content-wrapper > * { min-width: 0; }

/* =============================================
   ARTICLE CONTENT
   ============================================= */
.content-body {
    max-width: var(--measure);
    width: 100%;
    margin: 0 auto;
}

.content-body > *:first-child { margin-top: 0; }

.content-body p {
    margin-bottom: var(--s-5);
    color: var(--text);
    font-size: 1em;
    line-height: var(--lh-body);
}

.content-body h2 {
    position: relative;
    margin-top: var(--s-7);
    margin-bottom: var(--s-4);
    padding-top: var(--s-4);
    font-size: 1.25rem;
    color: var(--heading);
    border-top: var(--bw) solid var(--border);
}

.content-body h2::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.content-body h3 {
    margin-top: var(--s-6);
    margin-bottom: var(--s-3);
    font-size: 1.125rem;
    color: var(--heading);
}

.content-body h4 {
    margin-top: var(--s-5);
    margin-bottom: var(--s-2);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
}

/* Links inside content */
.content-body a,
.info-box a,
.author-bio a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.content-body a:visited,
.info-box a:visited { color: var(--accent-visited); }

.content-body a:hover,
.info-box a:hover,
.author-bio a:hover {
    color: var(--accent-hover);
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
}

/* Lists */
.content-body ul,
.content-body ol {
    margin: 0 0 var(--s-5);
    padding-left: var(--s-5);
}

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

.content-body ul > li {
    position: relative;
    padding-left: var(--s-1);
}

.content-body ul > li::before {
    content: "";
    position: absolute;
    left: calc(var(--s-4) * -1);
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--accent);
    transform: rotate(45deg);
}

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

.content-body ol > li { padding-left: var(--s-1); }

.content-body ol > li::marker {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-weight: 600;
}

.content-body li { margin-bottom: var(--s-2); }

.content-body li > ul,
.content-body li > ol {
    margin-top: var(--s-2);
    margin-bottom: var(--s-2);
}

.content-body li li::before {
    background: transparent;
    border: var(--bw) solid var(--accent);
}

/* Blockquote */
.content-body blockquote {
    position: relative;
    margin: var(--s-6) 0;
    padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5);
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-head);
    font-style: italic;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--muted);
}

.content-body blockquote p {
    color: inherit;
    margin-bottom: var(--s-3);
}

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

.content-body blockquote cite {
    display: block;
    margin-top: var(--s-3);
    font-family: var(--font-mono);
    font-style: normal;
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--subtle);
}

.content-body blockquote cite::before { content: "— "; color: var(--accent); }

/* Code */
code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

:not(pre) > code {
    padding: 2px 6px;
    background: var(--raised);
    color: #ecd3ac;
    border: var(--bw) solid var(--border-strong);
    border-radius: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

pre {
    max-width: 100%;
    margin: var(--s-5) 0;
    padding: var(--s-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--code-bg);
    color: var(--text);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
    line-height: 1.6;
    tab-size: 4;
}

pre code {
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    font-size: inherit;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
}

kbd {
    display: inline-block;
    padding: 1px 6px;
    background: var(--card);
    color: var(--heading);
    border: var(--bw) solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-size: 0.8em;
    line-height: 1.5;
}

/* Tables */
.content-body table,
table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: var(--s-5) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: var(--fs-sm);
}

th, td {
    padding: var(--s-3) var(--s-4);
    text-align: left;
    vertical-align: top;
    border-bottom: var(--bw) solid var(--border);
    min-width: 120px;
}

th {
    background: var(--card);
    color: var(--heading);
    font-weight: 600;
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
tbody tr:hover { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }

caption {
    padding: var(--s-2) var(--s-4);
    caption-side: bottom;
    text-align: left;
    font-size: var(--fs-xs);
    color: var(--subtle);
}

/* HR, figure */
hr {
    height: 0;
    margin: var(--s-7) 0;
    border: 0;
    border-top: var(--bw) solid var(--border);
    overflow: visible;
    text-align: center;
}

hr::after {
    content: "◆";
    position: relative;
    top: -0.75em;
    padding: 0 var(--s-3);
    background: var(--bg);
    color: var(--accent);
    font-size: 0.75rem;
}

figure { margin: var(--s-6) 0; }

figure img { width: 100%; border: var(--bw) solid var(--border); }

figcaption {
    margin-top: var(--s-2);
    padding-left: var(--s-3);
    border-left: 2px solid var(--accent-line);
    font-size: var(--fs-sm);
    line-height: 1.55;
    color: var(--muted);
}

/* Info Box */
.info-box {
    margin: var(--s-5) 0 var(--s-6);
    padding: var(--s-4);
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-top: 2px solid var(--accent2);
    border-radius: var(--radius);
}

.info-box ul {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin: 0;
    padding: 0;
}

.info-box ul li {
    position: relative;
    margin: 0;
    padding-left: var(--s-5);
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.info-box ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.7em;
    width: 10px;
    height: 2px;
    background: var(--accent);
    border: 0;
    transform: none;
    border-radius: 1px;
}

.info-box ul li strong {
    color: var(--heading);
    font-weight: 600;
}

/* =============================================
   AUTHOR SIDEBAR
   ============================================= */
.author-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
    order: -1;
}

.author-card,
.toc-card {
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
}

.author-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    overflow: hidden;
}

.author-avatar {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: var(--card);
    border-right: var(--bw) solid var(--border);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-4);
    min-width: 0;
}

.author-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent2);
}

.author-name {
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--heading);
}

.author-bio {
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--muted);
}

.author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-1);
    padding-top: var(--s-3);
    border-top: var(--bw) solid var(--border);
}

.author-socials a,
.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--muted);
    background: var(--card);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius-sm);
}

.author-socials a:hover,
.footer-socials a:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-line);
}

.author-socials svg,
.footer-socials svg {
    width: 18px;
    height: 18px;
}

/* TOC */
.toc-card { padding: var(--s-4); }

.toc-title {
    margin-bottom: var(--s-3);
    padding-bottom: var(--s-3);
    border-bottom: var(--bw) solid var(--border);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--subtle);
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    counter-reset: toc-counter;
}

.toc-list li {
    counter-increment: toc-counter;
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
    font-size: var(--fs-sm);
    color: var(--muted);
}

.toc-list li::before {
    content: counter(toc-counter, decimal-leading-zero);
    min-width: 22px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--accent);
}

.toc-list li a {
    display: flex;
    align-items: center;
    flex: 1;
    min-height: 44px;
    padding: var(--s-1) 0;
    color: var(--muted);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.toc-list li a:hover {
    color: var(--heading);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

/* =============================================
   RELATED SECTION
   ============================================= */
.related-section {
    margin-top: var(--s-7);
    padding-top: var(--s-6);
    border-top: var(--bw) solid var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
}

.section-header h3 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading);
    white-space: normal;
}

.decoder-line {
    flex: 1 1 auto;
    min-width: 24px;
    height: var(--bw);
    background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 10px);
}

.cards-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
}

.card {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    min-width: 0;
    padding: var(--s-4);
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--ease), background-color var(--ease);
}

.card:hover {
    background: var(--card);
    border-color: var(--accent-line);
}

.card:focus-within {
    border-color: var(--accent);
}

.card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
}

.badge {
    display: inline-block;
    padding: 2px var(--s-2);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border: var(--bw) solid var(--accent-line);
    border-radius: 4px;
}

.badge.warning {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: rgba(227, 154, 124, 0.35);
}

.card h4 {
    font-family: var(--font-head);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--heading);
}

.card h4 a { color: inherit; }
.card:hover h4 a { color: var(--accent-hover); }

.card p {
    flex-grow: 1;
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--muted);
}

.card-status {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-top: auto;
    padding-top: var(--s-3);
    border-top: var(--bw) solid var(--border);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.03em;
    color: var(--subtle);
}

.status-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent2);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    margin-top: var(--s-7);
    background: var(--surface);
    border-top: var(--bw) solid var(--border);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--s-6) var(--gutter) var(--s-5);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-5);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.footer-left .brand {
    font-family: var(--font-head);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--heading);
}

.footer-left .copy {
    font-size: var(--fs-sm);
    color: var(--muted);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--s-4);
    font-size: var(--fs-sm);
}

.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--muted);
}

.footer-nav a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--s-4) var(--gutter) var(--s-6);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    border-top: var(--bw) solid var(--border);
}

.footer-bottom p {
    font-size: var(--fs-xs);
    line-height: 1.6;
    color: var(--subtle);
    letter-spacing: 0.02em;
}

/* =============================================
   BREAKPOINT ≥ 480px
   ============================================= */
@media (min-width: 480px) {
    :root { --gutter: 20px; }

    .article-title { font-size: 1.5rem; }

    .meta-divider { display: block; }

    .author-card { grid-template-columns: 120px minmax(0, 1fr); }

    .info-box { padding: var(--s-5); }

    .content-body blockquote { padding: var(--s-5) var(--s-5) var(--s-5) var(--s-6); }
}

/* =============================================
   BREAKPOINT ≥ 768px
   ============================================= */
@media (min-width: 768px) {
    :root {
        --gutter: 32px;
        --header-h: 68px;
    }

    body { font-size: 1.0625rem; }

    main { padding-top: var(--s-7); padding-bottom: var(--s-8); }

    .main-nav {
        display: flex;
        align-items: center;
        gap: var(--s-5);
        font-size: var(--fs-sm);
        font-weight: 500;
        letter-spacing: 0.02em;
    }

    .article-title { font-size: 1.625rem; }

    .lead { font-size: 1.125rem; }

    .content-body h2 { font-size: 1.375rem; }
    .content-body h3 { font-size: 1.1875rem; }

    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }

    .card { padding: var(--s-5); }

    .section-header h3 { font-size: 1.375rem; white-space: nowrap; }

    .author-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    pre { padding: var(--s-5); }

    .footer-inner {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .footer-bottom { padding-bottom: var(--s-6); }
}

/* =============================================
   BREAKPOINT ≥ 1024px
   ============================================= */
@media (min-width: 1024px) {
    body { font-size: 1.125rem; }

    .hero {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        gap: var(--s-7);
        margin-bottom: var(--s-8);
    }

  

    .hero-content { gap: var(--s-5); }

    .article-title { font-size: 1.875rem; line-height: 1.28; }

    .content-wrapper {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: var(--s-7);
    }

    .content-body { margin: 0; }

    .author-sidebar {
        order: 0;
        grid-template-columns: minmax(0, 1fr);
        position: sticky;
        top: calc(var(--header-h) + var(--s-5));
        max-height: calc(100vh - var(--header-h) - var(--s-6));
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .author-card { grid-template-columns: minmax(0, 1fr); }

    .author-avatar {
        aspect-ratio: 4 / 3;
        height: auto;
        border-right: 0;
        border-bottom: var(--bw) solid var(--border);
    }

    .author-info { padding: var(--s-5); }

    .toc-card { padding: var(--s-5); }

    .toc-list li a { min-height: 36px; }

    .content-body h2 { font-size: 1.5rem; }
    .content-body h3 { font-size: 1.25rem; }

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

/* =============================================
   BREAKPOINT ≥ 1280px
   ============================================= */
@media (min-width: 1280px) {
    :root { --gutter: 40px; }

    .content-wrapper { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-8); }

    .article-title { font-size: 2rem; }
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    .site-header, .author-sidebar, .related-section, footer { display: none; }
    body { background: #fff; color: #111; }
}