/* styles.css */

/* =============================================
   1. TOKENS
   Палітра: graphite + sage/teal, акцент amber
   ============================================= */
:root {
    color-scheme: dark;

    /* surfaces */
    --c-bg: #0f1114;
    --c-surface: #161a1f;
    --c-raised: #1d2329;
    --c-code: #0b0d10;
    --c-inline-code: #1f262d;

    /* borders */
    --c-border: #2a3139;
    --c-border-soft: #222831;

    /* text */
    --c-text: #e1e5ea;
    --c-heading: #eef1f4;
    --c-muted: #9ca5ae;

    /* accents */
    --c-accent: #7fb8a2;
    --c-accent-rgb: 127, 184, 162;
    --c-accent2: #d6a86e;
    --c-accent2-rgb: 214, 168, 110;
    --c-visited: #c2b4d8;

    /* typography */
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: Georgia, "Iowan Old Style", "Times New Roman", serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --fs-base: 1rem;
    --fs-small: 0.875rem;
    --fs-xs: 0.75rem;
    --lh-body: 1.75;
    --lh-tight: 1.3;

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

    /* radii */
    --r-sm: 6px;
    --r: 12px;
    --r-lg: 16px;

    --gutter: 16px;
    --container: 1160px;
    --sticky-top: 96px;
}

/* =============================================
   2. RESET & BASE
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

*:not(img):not(video):not(svg):not(path) {
    margin: 0;
}

ul,
ol,
figure,
blockquote,
dd,
dl,
pre,
body {
    margin: 0;
    padding: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--c-bg);
}

body {
    min-height: 100vh;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

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

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

svg {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:visited {
    color: inherit;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    color: var(--c-heading);
    line-height: var(--lh-tight);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-wrap: balance;
    overflow-wrap: break-word;
}

p,
li,
td,
th,
figcaption,
blockquote {
    overflow-wrap: break-word;
}

code,
kbd,
pre,
samp,
.meta-item .value {
    overflow-wrap: anywhere;
}

::selection {
    background: rgba(var(--c-accent-rgb), 0.32);
    color: var(--c-heading);
}

/* Scrollbars */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--c-border) var(--c-bg);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--c-border);
    border-radius: 999px;
    border: 2px solid var(--c-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: #3a434d;
}

/* Form controls: no light defaults */
input,
textarea,
select,
button {
    font: inherit;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: var(--s-2) var(--s-3);
    min-height: 44px;
    color-scheme: dark;
}

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

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--c-text);
    -webkit-box-shadow: 0 0 0 1000px var(--c-surface) inset;
    caret-color: var(--c-text);
}

button {
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button:hover {
    border-color: rgba(var(--c-accent-rgb), 0.5);
    color: var(--c-heading);
}

/* Focus */
:focus {
    outline: none;
}

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

/* =============================================
   3. HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 17, 20, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--c-border-soft);
}

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

.logo-name {
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--c-heading);
    letter-spacing: 0.01em;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.main-nav {
    order: 3;
    width: 100%;
    display: flex;
    gap: var(--s-1);
    overflow-x: auto;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    scrollbar-width: none;
    border-top: 1px solid var(--c-border-soft);
    padding-top: var(--s-1);
}

.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);
    color: var(--c-muted);
    white-space: nowrap;
}

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

.main-nav a:hover {
    color: var(--c-heading);
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    margin-left: auto;
}

.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(--c-muted);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--c-accent);
    border-color: rgba(var(--c-accent-rgb), 0.45);
    background: rgba(var(--c-accent-rgb), 0.08);
}

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

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

.hero-visual {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--c-border);
    background: var(--c-raised);
    min-width: 0;
}

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

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

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

.hero-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: var(--s-1) var(--s-3);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-accent2);
    background: rgba(var(--c-accent2-rgb), 0.1);
    border: 1px solid rgba(var(--c-accent2-rgb), 0.3);
    border-radius: 999px;
}

.article-title {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-heading);
    text-wrap: balance;
}

.lead {
    max-width: 65ch;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--c-muted);
    font-weight: 400;
}

.meta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3) var(--s-5);
    padding-top: var(--s-4);
    border-top: 1px solid var(--c-border-soft);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    min-width: 0;
}

.meta-item .label {
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-muted);
}

.meta-item .value {
    font-size: var(--fs-small);
    font-weight: 400;
    color: var(--c-text);
}

.meta-divider {
    display: none;
    width: 1px;
    height: 28px;
    background: var(--c-border);
}

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

.author-sidebar {
    order: -1;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    min-width: 0;
}

/* =============================================
   7. ARTICLE CONTENT
   ============================================= */
.content-body {
    max-width: 70ch;
    min-width: 0;
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: var(--c-text);
}

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

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

.content-body h2 {
    margin-top: var(--s-7);
    margin-bottom: var(--s-4);
    font-size: 1.375rem;
    line-height: 1.3;
    color: var(--c-heading);
}

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

.content-body h4 {
    margin-top: var(--s-6);
    margin-bottom: var(--s-2);
    font-size: 1rem;
    color: var(--c-heading);
}

.content-body strong {
    color: var(--c-heading);
    font-weight: 600;
}

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

.content-body a {
    color: var(--c-accent);
    text-decoration: underline;
    text-decoration-color: rgba(var(--c-accent-rgb), 0.45);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    overflow-wrap: anywhere;
}

.content-body a:visited {
    color: var(--c-visited);
    text-decoration-color: rgba(194, 180, 216, 0.45);
}

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

.content-body ul,
.content-body ol {
    margin-bottom: var(--s-5);
    padding-left: var(--s-5);
    color: var(--c-text);
}

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

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

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

.content-body li::marker {
    color: var(--c-accent);
}

.content-body ul ul,
.content-body ol ol,
.content-body ul ol,
.content-body ol ul {
    margin-top: var(--s-2);
    margin-bottom: 0;
    padding-left: var(--s-5);
}

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

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

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

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

.content-body blockquote {
    margin: var(--s-6) 0;
    padding: var(--s-5) var(--s-5) var(--s-5) var(--s-5);
    background: var(--c-surface);
    border: 1px solid var(--c-border-soft);
    border-left: 2px solid var(--c-
accent-rgb), 0.9);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    color: var(--c-muted);
    font-style: italic;
}

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

.content-body blockquote cite {
    display: block;
    margin-top: var(--s-3);
    font-size: var(--fs-small);
    font-style: normal;
    color: var(--c-heading);
}

.content-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.1em 0.4em;
    color: var(--c-accent2);
    background: rgba(var(--c-accent2-rgb), 0.08);
    border: 1px solid rgba(var(--c-accent2-rgb), 0.2);
    border-radius: var(--r-sm);
    overflow-wrap: anywhere;
}

.content-body pre {
    margin: var(--s-6) 0;
    padding: var(--s-5);
    overflow-x: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border-soft);
    border-radius: var(--r-md);
}

.content-body pre code {
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--c-text);
    background: none;
    border: 0;
    border-radius: 0;
    white-space: pre;
}

.content-body hr {
    height: 1px;
    margin: var(--s-7) 0;
    border: 0;
    background: var(--c-border-soft);
}

.content-body img {
    display: block;
    width: 100%;
    height: auto;
    margin: var(--s-6) 0;
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
}

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

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

.content-body figcaption {
    margin-top: var(--s-2);
    font-size: var(--fs-small);
    color: var(--c-muted);
    text-align: center;
}

.table-wrap {
    width: 100%;
    margin: var(--s-6) 0;
    overflow-x: auto;
    border: 1px solid var(--c-border-soft);
    border-radius: var(--r-md);
}

.content-body table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: var(--fs-small);
}

.content-body th,
.content-body td {
    padding: var(--s-3) var(--s-4);
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--c-border-soft);
}

.content-body th {
    font-weight: 600;
    color: var(--c-heading);
    background: var(--c-surface);
}

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

.content-body tbody tr:hover td {
    background: rgba(var(--c-accent-rgb), 0.04);
}

/* =============================================
   8. AUTHOR SIDEBAR
   ============================================= */
.author-card {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding: var(--s-5);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
}

.author-card .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--c-accent-rgb), 0.45);
}

.author-card .name {
    font-family: var(--font-head);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--c-heading);
}

.author-card .role {
    font-size: var(--fs-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-accent2);
}

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

.author-card .social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-2);
}

.author-card .social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--c-muted);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
}

.author-card .social a:hover,
.author-card .social a:focus-visible {
    color: var(--c-accent);
    border-color: rgba(var(--c-accent-rgb), 0.45);
}

.toc {
    padding: var(--s-5);
    background: var(--c-surface);
    border: 1px solid var(--c-border-soft);
    border-radius: var(--r-lg);
}

.toc-title {
    margin-bottom: var(--s-3);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-muted);
}

.toc ol {
    margin: 0;
    padding-left: var(--s-4);
    list-style: decimal;
}

.toc li {
    margin-bottom: var(--s-2);
    font-size: var(--fs-small);
}

.toc a {
    color: var(--c-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* =============================================
   9. RELATED
   ============================================= */
.related {
    margin-top: var(--s-8);
    padding-top: var(--s-7);
    border-top: 1px solid var(--c-border-soft);
}

.related-title {
    margin-bottom: var(--s-5);
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c-heading);
}

.related-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--c-surface);
    border: 1px solid var(--c-border-soft);
    border-radius: var(--r-md);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--c-accent-rgb), 0.45);
}

.related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.related-card .body {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-4);
}

.related-card .card-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--c-heading);
}

.related-card .card-date {
    font-size: var(--fs-xs);
    color: var(--c-muted);
}

/* =============================================
   10. FOOTER
   ============================================= */
.site-footer {
    margin-top: var(--s-8);
    padding: var(--s-6) var(--gutter);
    border-top: 1px solid var(--c-border-soft);
    background: var(--c-surface);
    color: var(--c-muted);
    font-size: var(--fs-small);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-5);
}

.footer-nav a {
    color: var(--c-muted);
    text-decoration: none;
}

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

.footer-copy {
    font-size: var(--fs-xs);
    letter-spacing: 0.04em;
}

/* =============================================
   11. UTILITIES
   ============================================= */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: var(--s-2);
    left: var(--s-2);
    z-index: 1000;
    padding: var(--s-2) var(--s-3);
    background: var(--c-accent);
    color: var(--c-bg);
    border-radius: var(--r-sm);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

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

/* =============================================
   12. RESPONSIVE
   ============================================= */
@media (min-width: 640px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .meta-divider {
        display: block;
    }
}

@media (min-width: 960px) {
    .hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s-7);
    }

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

    .author-sidebar {
        order: 0;
        position: sticky;
        top: calc(var(--header-h, 72px) + var(--s-5));
    }

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

@media (max-width: 639px) {
    main {
        padding-top: var(--s-5);
    }

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

    .lang-switcher a {
        padding: 0 var(--s-1);
    }
}

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

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

@media print {
    .site-header,
    .author-sidebar,
    .related,
    .site-footer {
        display: none !important;
    }

    .content-body {
        max-width: none;
        color: #000;
    }

    .content-body a {
        color: #000;
        text-decoration: underline;
    }
}

===end file===
Файл уже завершён: последней строкой стоит `===end file===`, поэтому продолжение не требуется и новых строк я не добавляю.

Если нужно дополнить стили (например, для других компонентов или для тёмной темы), скажите, что именно добавить.
===end file===
===end file===
===end file===
===end file===