/* styles.css */

/* =========================================================
   1. Design tokens
   Theme: deep forest graphite + muted teal, amber as secondary
   ========================================================= */
:root {
    color-scheme: dark;

    /* Palette */
    --bg: #0d1210;
    --bg-deep: #090c0b;
    --surface: #131b17;
    --surface-raised: #1a241f;
    --surface-hover: #202d27;

    --border: #25322b;
    --border-strong: #33443b;

    --text-strong: #eef3ef;
    --text: #dfe5e1;
    --text-body: #c9d2cc;
    --text-muted: #a3aeA7;

    --accent: #5fb8a6;
    --accent-strong: #7fd0bf;
    --accent-soft: rgba(95, 184, 166, 0.12);
    --accent-line: rgba(95, 184, 166, 0.35);

    --accent2: #d4a862;
    --accent2-soft: rgba(212, 168, 98, 0.12);

    --focus: #b4f0e0;
    --selection: rgba(95, 184, 166, 0.28);
    --code-bg: #0a0f0d;

    /* Typography */
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: var(--font-body);
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --fs-small: 0.875rem;
    --fs-xs: 0.75rem;

    --lh-body: 1.7;
    --lh-heading: 1.3;

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

    /* Radii, borders, layout */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --border-width: 1px;

    --container: 1120px;
    --measure: 68ch;
    --tap: 44px;

    --transition: 180ms ease;
}

/* =========================================================
   2. Reset & base
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--bg);
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) var(--bg-deep);
}

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

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

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

::selection {
    background: var(--selection);
    color: var(--text-strong);
}

::-moz-selection {
    background: var(--selection);
    color: var(--text-strong);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 8px;
    border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-line);
}

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

/* =========================================================
   3. Typography
   ========================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: var(--lh-heading);
    letter-spacing: -0.01em;
    color: var(--text-strong);
    overflow-wrap: break-word;
    text-wrap: balance;
}

p {
    color: var(--text-body);
}

small,
.small {
    font-size: var(--fs-small);
    color: var(--text-muted);
}

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

em,
i {
    font-style: italic;
}

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

a:hover {
    color: var(--accent-strong);
    text-decoration-color: currentColor;
}

a:visited {
    color: var(--accent2);
    text-decoration-color: rgba(212, 168, 98, 0.4);
}

a:visited:hover {
    color: #e6bd7e;
    text-decoration-color: currentColor;
}

a:active {
    color: var(--accent-strong);
}

mark {
    background: var(--accent2-soft);
    color: var(--text-strong);
    padding: 0 var(--space-1);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 -0.5em 0 rgba(212, 168, 98, 0.18);
}

kbd {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85em;
    line-height: 1;
    padding: 0.25em 0.5em;
    color: var(--text);
    background: var(--surface-raised);
    border: var(--border-width) solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

hr {
    border: 0;
    height: var(--border-width);
    background: var(--border);
    margin: var(--space-7) 0;
}

/* =========================================================
   4. Lists (global)
   ========================================================= */
ul,
ol {
    list-style: none;
}

/* =========================================================
   5. Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 18, 16, 0.94);
    border-bottom: var(--border-width) solid var(--border);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--tap);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-strong);
    text-decoration: none;
}

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

.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--fs-small);
    font-weight: 500;
}

.lang-switcher a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    min-width: var(--tap);
    justify-content: center;
    padding: var(--space-2) var(--space-3);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: var(--border-width) solid transparent;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.lang-switcher a:visited {
    color: var(--text-muted);
}

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

.lang-switcher a.active,
.lang-switcher a[aria-current="true"],
.lang-switcher a[aria-current="page"] {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-line);
}

/* =========================================================
   6. Main layout
   ========================================================= */
main {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-6) var(--space-4) var(--space-7);
}

.article-title {
    font-size: clamp(1.375rem, 1.05rem + 1.4vw, 2rem);
    line-height: 1.3;
    font-weight: 650;
    max-width: 30em;
    margin-bottom: var(--space-5);
    color: var(--text-strong);
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* =========================================================
   7. Hero
   ========================================================= */
.hero {
    display: grid;
    gap: var(--space-5);
    margin-bottom: var(--space-7);
}

.hero > * {
    min-width: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-4);
}

.hero-content .lead {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 0;
}

.meta-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    font-size: var(--fs-small);
    color: var(--text-muted);
    padding-top: var(--space-4);
    border-top: var(--border-width) solid var(--border);
}

.hero-visual {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--surface);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-lg);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: var(--radius-lg);
    filter: brightness(0.88) saturate(0.9);
}

.visual-texture {
    width: 100%;
    height: 100%;
    background-color: var(--surface);
    background-image:
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.025) 0px,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 14px
        );
}

/* =========================================================
   8. Article content
   ========================================================= */
.content-body {
    max-width: var(--measure);
    margin: 0 auto var(--space-7);
    font-size: 1rem;
    line-height: var(--lh-body);
}

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

.content-body p {
    margin-bottom: var(--space-5);
    color: var(--text-body);
}

.content-body h2,
.content-body h3,
.content-body h4 {
    scroll-margin-top: 96px;
}

.content-body h2 {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    margin-top: var(--space-7);
    margin-bottom: var(--space-4);
    padding-top: var(--space-5);
    border-top: var(--border-width) solid var(--border);
}

.content-body h3 {
    font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--accent-strong);
}

.content-body h4 {
    font-size: 1.0625rem;
    margin-top: var(--space-5);
    margin-bottom: var(--space-2);
}

.content-body h2:first-child,
.content-body h3:first-child {
    margin-top: 0;
}

.content-body blockquote {
    position: relative;
    margin: var(--space-6) 0;
    padding: var(--space-5) var(--space-5) var(--space-5) var(--space-5);
    background: var(--surface);
    border: var(--border-width) solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1.0625rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-muted);
}

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

.content-body blockquote cite,
.content-body blockquote footer {
    display: block;
    margin-top: var(--space-3);
    font-style: normal;
    font-size: var(--fs-small);
    color: var(--text-muted);
}

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

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

.content-body ol {
    list-style: decimal outside;
    padding-left: var(--space-5);
}

.content-body ul > li {
    position: relative;
    padding-left: var(--space-5);
    margin-bottom: var(--space-2);
    color: var(--text-body);
}

.content-body ul > li::before {
    content: "";
    position: absolute;
    left: var(--space-1);
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--accent);
}

.content-body ol > li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-1);
    color: var(--text-body);
}

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

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

.content-body li > ul > li::before {
    background: transparent;
    border: 1px solid var(--accent);
    width: 6px;
    height: 6px;
}

.content-body ul li strong,
.content-body ol li strong {
    color: var(--text-strong);
}

.content-body img {
    margin: var(--space-6) 0;
}

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

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

.content-body figcaption {
    margin-top: var(--space-3);
    font-size: var(--fs-small);
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
}

/* Inline code */
code,
kbd,
samp {
    font-family: var(--font-mono);
}

:not(pre) > code {
    font-size: 0.9em;
    padding: 0.15em 0.4em;
    color: var(--accent-strong);
    background: var(--surface-raised);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-sm);
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Code blocks */
pre {
    position: relative;
    margin: var(--space-6) 0;
    padding: var(--space-4) var(--space-5);
    background: var(--code-bg);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text);
    white-space: pre;
    tab-size: 4;
}

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

/* Tables */
table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: var(--space-6) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: separate;
    border-spacing: 0;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    font-size: var(--fs-small);
    line-height: 1.55;
}

thead {
    background: var(--surface-raised);
}

th,
td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    vertical-align: top;
    border-bottom: var(--border-width) solid var(--border);
    border-right: var(--border-width) solid var(--border);
    min-width: 96px;
    overflow-wrap: anywhere;
}

th:last-child,
td:last-child {
    border-right: 0;
}

th {
    font-weight: 600;
    color: var(--text-strong);
    letter-spacing: 0.01em;
}

td {
    color: var(--text-body);
}

tbody tr {
    transition: background-color var(--transition);
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.012);
}

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

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

caption {
    caption-side: bottom;
    padding: var(--space-3);
    font-size: var(--fs-small);
    color: var(--text-muted);
    text-align: left;
}

/* Quotes inside content (inline) */
q {
    color: var(--text-body);
    font-style: italic;
}

q::before {
    content: "\201C";
    color: var(--accent);
}

q::after {
    content: "\201D";
    color: var(--accent);
}

/* =========================================================
   9. Related materials & cards
   ========================================================= */
.related-materials {
    margin-top: var(--space-8);
}

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

.section-header h2,
.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-strong);
}

.divider-line {
    flex-grow: 1;
    height: var(--border-width);
    background: var(--border);
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.cards-grid > * {
    min-width: 0;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
    background: var(--surface);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

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

.card-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--fs-xs);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    border: var(--border-width) solid var(--accent-line);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
}

.badge.accent-badge {
    background: var(--accent2-soft);
    color: var(--accent2);
    border-color: rgba(212, 168, 98, 0.35);
}

.date {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-variant-numeric: tabular-nums;
}

.card h4 {
    margin-bottom: var(--space-2);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-strong);
}

.card h4 a {
    color: var(--text-strong);
    text-decoration: none;
}

.card h4 a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 0.2em;
}

.card p {
    flex-grow: 1;
    margin-bottom: var(--space-4);
    font-size: var(--fs-small);
    line-height: 1.6;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: var(--space-3);
    border-top: var(--border-width) solid var(--border);
    font-size: var(--fs-small);
}

.card-footer a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 var(--space-2);
    font-weight: 500;
}

/* =========================================================
   10. Footer
   ========================================================= */
footer {
    margin-top: var(--space-8);
    background: var(--bg-deep);
    border-top: var(--border-width) solid var(--border);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

.footer-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2) var(--space-3);
    font-size: var(--fs-small);
    color: var(--text-muted);
}

.footer-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-5);
}

.footer-center a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 var(--space-2);
    font-size: var(--fs-small);
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.footer-center a:visited {
    color: var(--text);
}

.footer-center a:hover {
    color: var(--accent-strong);
    border-bottom-color: var(--accent-line);
}

.dmca-badge {
    display: inline-flex
;
    align-items: center;
    gap: var(--space-2);
    padding: 4px 10px;
    border: var(--border-width) solid var(--border);
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
}

.dmca-badge:hover {
    color: var(--accent-strong);
    border-color: var(--accent-line);
}

.footer-copy {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

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

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

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

::selection {
    background: var(--accent-soft);
    color: var(--text-strong);
}

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

    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .card:hover {
        transform: none;
    }
}

@media print {
    footer,
    .dmca-badge {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }
}
===end file===
===end file===
===end file===
===end file===
===end file===
===end file===