/* styles.css — "Ink & Paper" (light editorial/tech) */

:root {
    /* Palette: paper + ink blue + terracotta */
    --paper: #f6f2ea;
    --paper-deep: #efe9dd;
    --surface: #fffdf9;
    --surface-2: #faf7f1;

    --ink: #1b1f27;
    --ink-soft: #2f3440;
    --muted: #5a606b;

    --accent: #1f3a5f;
    --accent-hover: #142a46;
    --accent-soft: rgba(31, 58, 95, 0.08);

    --accent2: #9a4a2c;
    --accent2-soft: rgba(154, 74, 44, 0.09);
    --warn: #8c3f22;
    --warn-soft: rgba(140, 63, 34, 0.09);

    --line: rgba(27, 31, 39, 0.1);
    --line-strong: rgba(27, 31, 39, 0.18);
    --code-bg: #efeadf;
    --focus: #9a4a2c;

    /* Shape & elevation */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-pill: 999px;
    --shadow-soft: 0 1px 2px rgba(27, 31, 39, 0.04), 0 10px 28px -16px rgba(27, 31, 39, 0.14);
    --shadow-lift: 0 2px 4px rgba(27, 31, 39, 0.04), 0 18px 40px -18px rgba(31, 58, 95, 0.22);

    /* Typography */
    --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    /* Spacing scale (mobile-first, grows on larger screens) */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.5rem;
    --s-6: 2rem;
    --s-7: 3rem;
    --s-8: 4rem;

    --space-sm: var(--s-3);
    --space-md: var(--s-5);
    --space-lg: var(--s-7);

    --container: 1200px;
    --header-h: 64px;
}

@media (min-width: 768px) {
    :root {
        --space-sm: var(--s-4);
        --space-md: var(--s-6);
        --space-lg: var(--s-8);
    }
}

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

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

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (min-width: 768px) {
    body {
        font-size: 1.0625rem;
    }
}

@media (min-width: 1280px) {
    body {
        font-size: 1.125rem;
    }
}

img,
video,
iframe,
embed,
object,
svg {
    max-width: 100%;
    height: auto;
}

iframe {
    border: 0;
}

ul,
ol {
    list-style: none;
}

a {
    color: var(--accent);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    text-decoration-color: rgba(31, 58, 95, 0.35);
    overflow-wrap: anywhere;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

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

button {
    cursor: pointer;
    background: none;
    border: 0;
}

:focus {
    outline: none;
}

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

::selection {
    background: rgba(31, 58, 95, 0.16);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ink);
    overflow-wrap: break-word;
    hyphens: auto;
}

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

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(246, 242, 234, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

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

.logo-name {
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.01em;
    min-width: 0;
}

.main-nav {
    order: 3;
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--s-1) var(--s-5);
    overflow-x: auto;
    scrollbar-width: none;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    -webkit-overflow-scrolling: touch;
}

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

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

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

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

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

.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    margin-left: auto;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.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);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(31, 58, 95, 0.22);
}

@media (min-width: 768px) {
    .header-inner {
        flex-wrap: nowrap;
        gap: var(--s-6);
    }

    .main-nav {
        order: 0;
        width: auto;
        overflow: visible;
        gap: var(--s-6);
        font-size: 0.875rem;
        justify-content: center;
        flex: 1;
    }

    .lang-switcher {
        margin-left: 0;
    }
}

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

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

.hero-visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: linear-gradient(160deg, #2a4a72 0%, var(--accent) 60%, #17304f 100%);
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

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

.hero-tag {
    display: inline-block;
    width: fit-content;
    padding: 6px 14px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent2);
    background: var(--accent2-soft);
    border: 1px solid rgba(154, 74, 44, 0.25);
    border-radius: var(--radius-pill);
}

.article-title {
    font-family: var(--font-head);
    font-size: clamp(1.25rem, 1.05rem + 1.2vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.005em;
    color: var(--ink);
    max-width: 30ch;
}

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

.meta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3) var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--line);
}

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

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

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

.meta-divider {
    width: 1px;
    height: 2rem;
    background: var(--line-strong);
}

@media (min-width: 768px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--space-lg);
    }

    .hero-visual {
        aspect-ratio: 4 / 5;
    }
}

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

}

.article-layout {
    min-width: 0;
}

.article-body {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink);
    min-width: 0;
}

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

.article-body h2 {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    margin-top: var(--space-lg);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--line);
}

.article-body h3 {
    font-size: 1.125rem;
    margin-top: var(--space-md);
}

.article-body h4 {
    font-size: 1rem;
    margin-top: var(--space-md);
    color: var(--muted);
}

.article-body a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-body a:hover {
    color: var(--accent2);
}

.article-body ul,
.article-body ol {
    padding-left: 1.25rem;
    display: grid;
    gap: var(--s-2);
}

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

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

.article-body ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 1px;
    background: var(--accent2);
}

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

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

.article-body strong {
    font-weight: 600;
    color: var(--ink);
}

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

.article-body code,
.article-body kbd,
.article-body pre {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.article-body code {
    font-size: 0.875em;
    padding: 0.1em 0.4em;
    border-radius: var(--radius-sm, 4px);
    background: var(--accent-soft);
    color: var(--accent);
    overflow-wrap: anywhere;
}

.article-body pre {
    padding: var(--space-sm);
    border-radius: var(--radius);
    background: #1d2633;
    color: #e6ebf2;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

.article-body pre code {
    padding: 0;
    background: none;
    color: inherit;
    overflow-wrap: normal;
}

.article-body blockquote {
    margin: var(--space-md) 0;
    padding: var(--s-3) var(--space-md);
    border-left: 3px solid var(--accent2);
    background: var(--accent2-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--ink);
    font-style: italic;
}

.article-body blockquote cite {
    display: block;
    margin-top: var(--s-2);
    font-size: 0.875rem;
    font-style: normal;
    color: var(--muted);
}

.article-body figure {
    margin: var(--space-md) 0;
}

.article-body img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.article-body figcaption {
    margin-top: var(--s-2);
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.5;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    display: block;
    overflow-x: auto;
}

.article-body th,
.article-body td {
    padding: var(--s-2) var(--s-3);
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.article-body th {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom-color: var(--line-strong);
}

.article-body hr {
    border: 0;
    height: 1px;
    margin: var(--space-lg) 0;
    background: var(--line);
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    display: grid;
    gap: var(--space-md);
    min-width: 0;
}

.sidebar-card {
    padding: var(--space-md);
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.sidebar-card h3 {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--s-3);
}

.sidebar-card ul {
    list-style: none;
    display: grid;
    gap: var(--s-1);
}

.sidebar-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    min-height: 44px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.9375rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.sidebar-card a:hover,
.sidebar-card a[aria-current="true"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.sidebar-card a span:last-child {
    font-size: 0.8125rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.sidebar-card .note {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--muted);
}

@media (min-width: 1024px) {
    .content-wrapper {
        grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
        gap: var(--space-xl, 3rem);
    }

    .sidebar {
        position: sticky;
        top: 96px;
    }
}

/* =============================================
   BUTTONS & LINKS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 44px;
    padding: 0 var(--s-5);
    font-family: var(--font-head);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: #fffdf8;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: #17304f;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.btn:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
}

.btn--ghost {
    color: var(--accent);
    background: transparent;
}

.btn--ghost:hover {
    background: var(--accent-soft);
    box-shadow: none;
}

.btn--accent {
    background: var(--accent2);
    border-color: var(--accent2);
}

.btn--accent:hover {
    background: #7d3a22;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    min-height: 44px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.text-link::after {
    content: "→";
    transition: transform 0.2s ease;
}

.text-link:hover::after {
    transform: translateX(4px);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    margin-top: var(--space-xl, 3rem);
    background: var(--ink);
    color: #cfd6e0;
    font-size: 0.875rem;
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
    display: grid;
    gap: var(--space-md);
    min-width: 0;
}

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

.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #e9edf3;
    text-decoration: none;
}

.footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-copy {
    color: #9aa6b6;
    line-height: 1.6;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

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

.skip-link {
    position: absolute;
    left: var(--s-3);
    top: -100px;
    z-index: 200;
    padding: var(--s-2) var(--s-4);
    background: var(--accent);
    color: #fffdf8;
    border-radius: var(--radius-pill);
    text-decoration: none;
}

.skip-link:focus {
    top: var(--s-3);
}

.text-muted {
    color: var(--muted);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

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

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

@media print {
    .site-header,
    .sidebar,
    .site-footer,
    .skip-link {
        display: none;
    }

    main {
        padding: 0;
    }

    .article-body {
        font-size: 11pt;
        color: #000;
    }

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

===end file===
===end file===
===end file===
===end file===
===end file===
===end file===