/* styles.css — revit-ukraine.com.ua
   Light editorial / tech theme: fog grey paper + indigo ink + ochre detail */

:root {
    /* Palette */
    --bg: #f0f1f3;
    --bg-alt: #e7e9ee;
    --surface: #ffffff;
    --card: #fbfbfc;
    --text: #1f2230;
    --text-soft: #353a4b;
    --muted: #565c6d;
    --accent: #3a3aa8;
    --accent-strong: #2b2b86;
    --accent-soft: rgba(58, 58, 168, 0.08);
    --accent-line: rgba(58, 58, 168, 0.22);
    --accent2: #92540f;
    --accent2-soft: rgba(146, 84, 15, 0.09);
    --warn: #a3401f;
    --warn-soft: rgba(163, 64, 31, 0.09);
    --border: rgba(31, 34, 48, 0.1);
    --border-strong: rgba(31, 34, 48, 0.18);
    --code-bg: #eceef4;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(31, 34, 48, 0.04), 0 2px 8px rgba(31, 34, 48, 0.04);
    --shadow-md: 0 2px 4px rgba(31, 34, 48, 0.04), 0 10px 28px -10px rgba(31, 34, 48, 0.14);

    /* Radius */
    --radius: 10px;
    --radius-sm: 6px;
    --radius-pill: 999px;

    /* Typography */
    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-head: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --lh-body: 1.7;
    --lh-head: 1.3;
    --measure: 70ch;

    /* Spacing scale */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 72px;
    --gutter: 16px;
    --container: 1200px;
    --header-h: 64px;

    --ease: 0.2s ease;
}

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

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(58, 58, 168, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58, 58, 168, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 400;
    line-height: var(--lh-body);
    overflow-x: hidden;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg, iframe, embed, object {
    display: block;
    max-width: 100%;
}

img, video {
    height: auto;
}

iframe {
    width: 100%;
    border: 0;
}

svg {
    flex-shrink: 0;
}

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

ul, ol {
    list-style: none;
}

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

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

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

p {
    overflow-wrap: break-word;
}

strong, b {
    font-weight: 650;
}

::selection {
    background: rgba(58, 58, 168, 0.18);
    color: var(--text);
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(240, 241, 243, 0.9);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0, var(--accent) 64px, transparent 64px);
}

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

.logo-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--text);
}

.logo-name::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent);
    border-radius: 3px;
    background: linear-gradient(135deg, transparent 50%, var(--accent2) 50%);
    flex-shrink: 0;
}

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

.logo-name a {
    color: inherit;
}

.main-nav {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    gap: var(--space-2xs);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-top: 1px dashed var(--border);
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--space-sm);
    color: var(--muted);
    white-space: nowrap;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: 8px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ease);
}

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

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current="page"]::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.lang-switcher {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lang-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 38px;
    padding: 0 var(--space-xs);
    color: var(--muted);
    border-radius: 4px;
}

.lang-switcher a:hover {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.lang-switcher a.active {
    color: #fff;
    background: var(--accent);
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
main {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-lg) var(--gutter) var(--space-xl);
}

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

.hero-visual {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: calc(var(--radius) - 4px);
    pointer-events: none;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.hero-visual:hover img {
    transform: scale(1.02);
}

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

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 5px 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent2);
    background: var(--accent2-soft);
    border: 1px solid rgba(146, 84, 15, 0.22);
    border-radius: var(--radius-sm);
    overflow-wrap: anywhere;
}

.hero-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent2);
    border-radius: 1px;
    flex-shrink: 0;
}

.article-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text);
    max-width: 32ch;
}

.lead {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--text-soft);
    max-width: var(--measure);
    padding-left: var(--space-sm);
    border-left: 2px solid var(--accent-line);
}

.meta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

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

.meta-item .label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.meta-item .value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

.meta-divider {
    display: none;
    width: 1px;
    align-self: stretch;
    background: var(--border);
}

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

.author-sidebar {
    order: -1;
}

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

.content-body > * + * {
    margin-top: var(--space-md);
}

.content-body p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-soft);
    margin-bottom: var(--space-md);
}

.content-body p + p {
    margin-top: 0;
}

.content-body h2 {
    position: relative;
    font-size: 1.2rem;
    font-weight: 750;
    line-height: 1.35;
    color: var(--text);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

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

.content-body h3 {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--accent-strong);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
}

.content-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
}

.content-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;
}

.content-body a:hover {
    color: var(--accent-strong);
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
}

.content-body ul,
.content-body ol {
    margin: 0 0 var(--space-md);
    padding-left: 1.4em;
}

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

.content-body ul > li {
    position: relative;
}

.content-body ul > li::before {
    content: "";
    position: absolute;
    left: -1.1em;
    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::marker {
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9em;
}

.content-body li {
    line-height: 1.7;
    margin-bottom: var(--space-xs);
}

.content-body li > ul,
.content-body li > ol {
    margin-top: var(--space-xs);
    margin-bottom: 0;
}

.content-body blockquote {
    position: relative;
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 4px);
    background: linear-gradient(90deg, var(--accent-soft), rgba(58, 58, 168, 0.02));
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 1.06rem;
    line-height: 1.65;
    color: var(--text);
}

.content-body blockquote p {
    font-size: inherit;
    color: inherit;
    margin-bottom: var(--space-xs);
}

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

.content-body blockquote cite {
    display: block;
    margin-top: var(--space-sm);
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.content-body img,
.content-body video,
.content-body iframe {
    border-radius: var(--radius);
    margin: var(--space-lg) 0;
}

.content-body figure {
    margin: var(--space-lg) 0;
}

.content-body figcaption {
    margin-top: var(--space-xs);
    font-size: 0.85rem;
    color: var(--muted);
}

.content-body hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: var(--space-xl) 0;
}

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

:not(pre) > code {
    padding: 0.12em 0.4em;
    background: var(--code-bg);
    color: var(--accent-strong);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

pre {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--code-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent2);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.88rem;
    line-height: 1.6;
    tab-size: 4;
    max-width: 100%;
}

pre code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    white-space: pre;
}

kbd {
    padding: 0.1em 0.4em;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
}

/* Tables */
table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    font-size: 0.92rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

th, td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    min-width: 120px;
}

th {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--bg-alt);
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: var(--card);
}

tbody tr:hover {
    background: var(--accent-soft);
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* Info Box */
.info-box {
    position: relative;
    margin: var(--space-md) 0 var(--space-lg);
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0 70%, var(--accent2) 70% 100%);
}

.info-box ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-box ul li {
    position: relative;
    margin: 0;
    padding-left: 26px;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--text-soft);
}

.info-box ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.45em;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent);
    border-radius: 3px;
    background: var(--accent-soft);
    transform: none;
}

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

/* =============================================
   AUTHOR SIDEBAR
   ============================================= */
.author-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}

.author-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.author-avatar {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-alt);
    overflow: hidden;
}

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

.author-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
}

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

.author-name {
    font-size: 1.12rem;
    font-weight: 750;
    line-height: 1.3;
    color: var(--text);
}

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

.author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-2xs);
    padding-top: var(--space-sm);
    border-top: 1px dashed 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: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

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

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

/* TOC */
.toc-card {
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.toc-title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.toc-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

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

.toc-list li {
    counter-increment: toc-counter;
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    font-size: 0.92rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.toc-list li:last-child {
    border-bottom: 0;
}

.toc-list li::before {
    content: counter(toc-counter, decimal-leading-zero);
    min-width: 22px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent2);
}

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

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

/* =============================================
   RELATED SECTION
   ============================================= */
.related-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.section-header h3 {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--text);
    min-width: 0;
}

.decoder-line {
    flex: 1 1 auto;
    min-width: 24px;
    height: 1px;
    background-image: linear-gradient(90deg, var(--border-strong) 50%, transparent 50%);
    background-size: 8px 1px;
}

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: var(--space-md);
    width: 28px;
    height: 2px;
    background: var(--accent);
    transition: width var(--ease);
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-line);
    box-shadow: var(--shadow-md);
}

.card:hover::before {
    width: 56px;
}

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

.card a {
    color: inherit;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-strong);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 4px;
}

.badge.warning {
    color: var(--warn);
    background: var(--warn-soft);
    border-color: rgba(163, 64, 31, 0.25);
}

.card h4 {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

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

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

.card-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--border);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.status-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent2);
    box-shadow: 0 0 0 3px var(--accent2-soft);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    margin-top: var(--space-xl);
    background: var(--surface);
    border-top: 1px solid var(--border);
}

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

.footer-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.footer-left .brand {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
}

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

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-xs);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

.footer-nav a:first-child {
    padding-left: 0;
}

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

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

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-md) var(--gutter) var(--space-lg);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.footer-bottom p {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.footer-bottom a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* =============================================
   BREAKPOINTS (mobile-first)
   ============================================= */
@media (min-width: 480px) {
    :root {
        --gutter: 20px;
    }

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

    .meta-divider {
        display: block;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    }
}

@media (min-width: 768px) {
    :root {
        --gutter: 28px;
        --radius: 12px;
    }

    .header-inner {
        flex-wrap: nowrap;
    }

    .main-nav {
        order: 0;
        flex: 0 1 auto;
        margin: 0;
        padding: 0;
        border-top: 0;
        justify-content: center;
    }

    main {
        padding-top: var(--space-xl);
    }

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

    .lead {
        font-size: 1.06rem;
    }

    .content-body h2 {
        font-size: 1.32rem;
    }

    .content-body h3 {
        font-size: 1.14rem;
    }

    .content-body blockquote {
        font-size: 1.12rem;
        padding: var(--space-lg);
    }

    .section-header h3 {
        font-size: 1.28rem;
    }

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

    table {
        display: table;
        overflow: visible;
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 106.25%;
    }

    :root {
        --gutter: 32px;
    }

    .hero {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        gap: var(--space-xl);
        margin-bottom: var(--space-2xl);
    }

    .hero-visual {
        aspect-ratio: 4 / 5;
        max-height: 620px;
        width: 100%;
    }

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

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

    .author-sidebar {
        order: 0;
        position: sticky;
        top: calc(var(--header-h) + 24px);
        max-height: calc(100vh - var(--header-h) - 48px);
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .author-avatar {
        aspect-ratio: 4 / 3;
    }

    .content-body {
        margin: 0;
    }
}

@media (min-width: 1280px) {
    .content-wrapper {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

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

/* =============================================
   MOTION
   ============================================= */
@keyframes riseIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.hero-content {
    animation: riseIn 0.45s ease both;
}

.hero-visual {
    animation: riseIn 0.45s ease 0.05s both;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
    }

    .card:hover,
    .hero-visual:hover img {
        transform: none;
    }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    body {
        background: #fff;
    }

    .site-header,
    .author-sidebar,
    .related-section,
    .footer-socials {
        display: none;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }
}