/* styles.css — gerasjuta.com.ua — Dark Editorial: Slate & Amber */

:root {
    color-scheme: dark;

    --bg: #121418;
    --surface: #181b21;
    --card: #1e222a;
    --text: #dcdfe4;
    --muted: #9ea5b1;
    --accent: #dba765;
    --accent2: #92bba9;

    --heading: #eef0f3;
    --bg-deep: #0e1013;
    --border: #2a2f38;
    --border-strong: #3a414c;
    --accent-hover: #e8bc82;
    --accent-soft: rgba(219, 167, 101, 0.12);
    --accent-line: rgba(219, 167, 101, 0.35);
    --accent-ink: #1a140b;
    --accent2-soft: rgba(146, 187, 169, 0.12);
    --visited: #c3a7cf;
    --warning: #e59c7f;
    --warning-soft: rgba(229, 156, 127, 0.12);
    --focus: #f0c890;

    --font-main: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: "Source Serif Pro", "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

    --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-3);
    --space-md: var(--s-5);
    --space-lg: var(--s-7);

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

    --container: 1200px;
    --measure: 70ch;
    --gutter: 16px;
    --header-h: 64px;

    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
    --t: 0.2s;
}

/* =============================================
   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-5));
    background-color: var(--bg);
    scrollbar-color: var(--border-strong) var(--bg-deep);
    scrollbar-width: thin;
}

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

::selection {
    background: rgba(219, 167, 101, 0.32);
    color: var(--heading);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-pill);
    border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: #4a5260; }
::-webkit-scrollbar-corner { background: var(--bg-deep); }

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

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

svg { fill: currentColor; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) 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);
}

ul, ol { list-style: none; }

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

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

small { font-size: 0.85em; color: var(--muted); }

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

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }

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

hr {
    border: 0;
    height: var(--bw);
    background: var(--border);
    margin: var(--s-7) 0;
}

/* 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(--bg-deep);
    color: var(--text);
    border: var(--bw) solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--t) var(--ease);
}

input::placeholder, textarea::placeholder { color: #7f8793; opacity: 1; }

input:hover, textarea:hover, select:hover { border-color: #4a5260; }

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; }

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

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

[type="submit"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

[type="submit"]:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--accent-ink);
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 20, 24, 0.94);
    border-bottom: var(--bw) solid var(--border);
}

@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
    .site-header {
        background: rgba(18, 20, 24, 0.82);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

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

.logo-name {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 44px;
    font-family: var(--font-head);
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--heading);
    letter-spacing: 0;
}

.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(--accent); }
.logo-name a { color: inherit; }

.main-nav {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    gap: var(--s-1);
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) var(--s-1);
    overflow-x: auto;
    scrollbar-width: none;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-top: var(--bw) solid 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(--s-3);
    white-space: nowrap;
    color: var(--muted);
}

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

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

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

.lang-switcher {
    display: flex;
    gap: var(--s-1);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    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 {
    display: block;
    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-6);
    align-items: center;
    margin-bottom: var(--s-7);
    padding-bottom: var(--s-7);
    border-bottom: var(--bw) solid var(--border);
}

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

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
    transition: transform 0.6s var(--ease);
}

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

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
    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: 0.74rem;
    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: var(--radius-pill);
}

.hero-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

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

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

.meta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--s-3);
    padding-top: var(--s-5);
    border-top: var(--bw) dashed var(--border-strong);
}

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

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

.meta-item .value {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--heading);
    overflow-wrap: anywhere;
}

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

/* =============================================
   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; }

.author-sidebar { order: -1; }

/* =============================================
   ARTICLE CONTENT
   ============================================= */
.content-body {
    max-width: var(--measure);
    width: 100%;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.75;
}

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

.content-body p {
    margin: 0 0 var(--s-5);
    color: var(--text);
    font-size: 1em;
    font-weight: 400;
    line-height: 1.75;
}

.content-body h2 {
    position: relative;
    margin: var(--s-7) 0 var(--s-4);
    padding-top: var(--s-5);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    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: var(--s-6) 0 var(--s-3);
    font-size: 1.14rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--heading);
}

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

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

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

.content-body a:visited { color: var(--visited); text-decoration-color: rgba(195, 167, 207, 0.4); }

/* 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 ol { list-style: decimal; }

.content-body li {
    position: relative;
    margin-bottom: var(--s-2);
    padding-left: var(--s-1);
    line-height: 1.7;
}

.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 > li::marker {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.88em;
    font-weight: 500;
}

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

.content-body li > ul > li::before {
    background: transparent;
    border: 1px solid var(--accent2);
    border-radius: 50%;
    transform: none;
}

/* Blockquote */
.content-body blockquote {
    position: relative;
    margin: var(--s-6) 0;
    padding: var(--s-5) var(--s-5) var(--s-5) 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.08rem;
    line-height: 1.65;
    color: #c9cdd4;
}

.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: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

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

/* Code */
.content-body code,
.info-box code,
.card code {
    padding: 0.12em 0.4em;
    background: var(--card);
    color: #e9cfa9;
    border: var(--bw) solid var(--border);
    border-radius: 4px;
    font-size: 0.86em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.content-body pre {
    margin: var(--s-5) 0 var(--s-6);
    padding: var(--s-4) var(--s-5);
    background: var(--bg-deep);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--text);
    tab-size: 4;
}

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

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

.content-body thead th {
    background: var(--card);
    color: var(--heading);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: var(--bw) solid var(--border-strong);
}

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

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

/* Figure */
.content-body figure { margin: var(--s-6) 0; }

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

.content-body figcaption {
    margin-top: var(--s-2);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--muted);
}

.content-body figcaption::before {
    content: "↳ ";
    color: var(--accent);
}

/* Info Box */
.info-box {
    margin: var(--s-5) 0 var(--s-6);
    padding: var(--s-5);
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
    position: relative;
}

.info-box::before {
    content: "";
    position: absolute;
    top: -1px;
    left: var(--s-5);
    right: var(--s-5);
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0 48px, transparent 48px);
}

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

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

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

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

/* =============================================
   AUTHOR SIDEBAR
   ============================================= */
.author-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.author-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
}

.author-avatar {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--card);
    border-bottom: 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-5);
    min-width: 0;
}

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

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

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

.author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-2);
    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 svg,
.footer-socials a svg { width: 18px; height: 18px; }

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

/* TOC */
.toc-card {
    padding: var(--s-5);
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
}

.toc-title {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-bottom: var(--s-3);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

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

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

.toc-list li {
    counter-increment: toc-counter;
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
    font-size: 0.92rem;
    color: var(--muted);
    border-bottom: var(--bw) 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.74rem;
    font-weight: 500;
    color: var(--accent);
}

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

.toc-list li a:hover { color: var(--accent); }

/* =============================================
   RELATED
   ============================================= */
.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.2rem;
    font-weight: 600;
    color: var(--heading);
    white-space: normal;
    min-width: 0;
}

.decoder-line {
    flex: 1 1 40px;
    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 {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    min-width: 0;
    padding: var(--s-5);
    background: var(--surface);
    border: var(--bw) solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.card:hover {
    background: var(--card);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

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

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

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

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--s-2);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent2);
    background: var(--accent2-soft);
    border: var(--bw) solid rgba(146, 187, 169, 0.3);
    border-radius: var(--radius-sm);
}

.badge.warning {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: rgba(229, 156, 127, 0.3);
}

.card h4 {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--heading);
    overflow-wrap: break-word;
}

.card p {
    flex-grow: 1;
    font-size: 0.92rem;
    line-height: 1.65;
    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: 0.74rem;
    letter-spacing: 0.03em;
    color: var(--muted);
}

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

/* =============================================
   FOOTER
   ============================================= */
footer {
    margin-top: var(--s-7);
    background: var(--bg-deep);
    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.05rem;
    font-weight: 600;
    color: var(--heading);
}

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

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--s-2);
    margin-left: calc(var(--s-2) * -1);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

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

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

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

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

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

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

.hero-visual { animation: fadeUp 0.5s var(--ease) both; }
.hero-content { animation: fadeUp 0.5s var(--ease) 0.05s both; }
.content-body { animation: fadeUp 0.5s var(--ease) 0.1s both; }

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

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

    .meta-panel { gap: var(--s-4); }

    .meta-divider { display: block; }

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

    .author-avatar {
        aspect-ratio: auto;
        height: 100%;
        min-height: 160px;
}
}

@media (min-width: 640px) {
    :root { --gutter: 24px; }

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

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

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

    .footer-bottom {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: var(--s-2) var(--s-5);
    }
}

@media (min-width: 768px) {
    :root { --gutter: 32px; }

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

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

    .author-avatar { min-height: 200px; }

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

    .footer-nav { margin-left: 0; }
}

@media (min-width: 1024px) {
    :root { --gutter: 40px; }

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

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

    .related-section {
        margin-top: var(--s-8, 96px);
    }

    .footer-inner {
        flex-wrap: nowrap;
        gap: var(--s-6);
    }
}

@media (min-width: 1280px) {
    .article-title { font-size: 2.5rem; }
}

/* =============================================
   HOVER-CAPABLE DEVICES ONLY
   ============================================= */
@media (hover: none) {
    .card:hover {
        transform: none;
        background: var(--surface);
        border-color: var(--border);
    }
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .card:hover { transform: none; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    footer,
    .related-section,
    .footer-socials,
    .decoder-line {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .hero-visual,
    .hero-content,
    .content-body {
        animation: none;
    }

    .card {
        break-inside: avoid;
        border-color: #999;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
===end file===
===end file===
===end file===
===end file===
===end file===
===end file===