/* TEST-MERTONFOLIO-ACTIVE-STYLESHEET */

html {
    font-family: system-ui, sans-serif;
}

body {
    margin: 0;
    padding: 3rem 2rem;
    background: #1b1b1f;
    color: #e8e8e8;
}

.site-intro {
    max-width: 900px;
    margin: 0 auto;
}

.site-intro h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.site-description {
    max-width: 650px;
    margin: 1.5rem 0 0;
    font-size: 1.25rem;
    line-height: 1.6;
    color: #b8b8be;
}

.frontispiece {
    width: min(100%, 720px);
    margin: 3.5rem auto;
    padding: 0.85rem;
    border: 1px solid #6a6a72;
    border-radius: 10px;
    box-sizing: border-box;
    background: #2a2a30;
    box-shadow:
        0 0 0 4px #202025,
        0 12px 30px rgba(0, 0, 0, 0.22);
}

.frontispiece img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #44444c;
    border-radius: 4px;
}

.frontispiece__credit {
    margin-top: 0.75rem;
    color: #92929a;
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: right;
}

.frontispiece__credit a {
    color: inherit;
    text-decoration: none;
}

.frontispiece__credit a:hover {
    color: #cfcfd4;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.featured-post {
    width: min(100%, 760px);
    margin: 4rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid #3a3a40;
}

.featured-post__label {
    margin: 0 0 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #96969e;
}

.featured-post__title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.75rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.featured-post__title a {
    color: #f1f1f2;
    text-decoration: none;
}

.featured-post__title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.12em;
}

.featured-post__description {
    max-width: 650px;
    margin: 1.5rem 0 0;
    font-size: 1.2rem;
    line-height: 1.65;
    color: #b8b8be;
}

.featured-post__meta {
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    color: #85858d;
}

.featured-post__link {
    display: inline-block;
    margin-top: 1.5rem;
    color: #d7d7dc;
    font-weight: 600;
    text-decoration: none;
}

.featured-post__link:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}


.recent-posts {
    width: min(100%, 900px);
    margin: 3rem auto 0;
}

.recent-posts__header {
    margin-bottom: 1.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #3a3a40;
}

.recent-posts__header h2 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.2;
    color: #e8e8ea;
}

.recent-posts__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid #3d3d45;
    border-radius: 10px;
    background: #222227;
}

.post-card__meta {
    margin: 0 0 0.9rem;
    font-size: 0.8rem;
    color: #8f8f98;
}

.post-card__title {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.post-card__title a {
    color: #eeeeef;
    text-decoration: none;
}

.post-card__title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.12em;
}

.post-card__description {
    margin: 1rem 0 0;
    line-height: 1.6;
    color: #b5b5bc;
}

.post-card__link {
    margin-top: auto;
    padding-top: 1.5rem;
    color: #d7d7dc;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.post-card__link:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

@media (max-width: 700px) {
    .recent-posts__grid {
        grid-template-columns: 1fr;
    }

    .post-card {
        padding: 1.5rem;
    }
}

.homepage-archive-link {
    width: min(100%, 900px);
    margin: 2.5rem auto 0;
}

.homepage-archive-link a {
    color: #d7d7dc;
    font-weight: 600;
    text-decoration: none;
}

.homepage-archive-link a:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.site-footer {
    width: min(100%, 900px);
    margin: 5rem auto 0;
    padding: 2rem 0 1rem;
    border-top: 1px solid #3a3a40;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: #85858d;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #a9a9b0;
    text-decoration: none;
}

.site-footer a:hover {
    color: #e8e8ea;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

@media (max-width: 700px) {
    .site-footer {
        flex-direction: column;
    }

.article-header__title {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.7;
}

.article-content > p,
.article-content > ul,
.article-content > ol,
.article-content > blockquote,
.article-content > h2,
.article-content > h3,
.article-content > h4 {
    max-width: none;
}
}

/* ---------------------------------
   Article layout
   --------------------------------- */

.article {
    width: min(100%, 760px);
    margin: 0 auto;
    box-sizing: border-box;
}

/* ---------------------------------
   Article typography
   --------------------------------- */

.article-content {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #dddddf;
}

.article-header {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #3a3a40;
}



/*
 * Text elements use a slightly narrower measure
 * than the overall article container.
 */
.article-content > p,
.article-content > ul,
.article-content > ol,
.article-content > blockquote,
.article-content > h2,
.article-content > h3,
.article-content > h4 {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}



/* Paragraphs */

.article-content p {
    margin-top: 0;
    margin-bottom: 1.5rem;
}


/* Headings */

.article-content h2 {
    margin-top: 3.25rem;
    margin-bottom: 1.25rem;

    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.025em;

    color: #eeeeef;
}

.article-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;

    font-size: 1.4rem;
    line-height: 1.3;

    color: #eeeeef;
}

.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;

    font-size: 1.1rem;
    line-height: 1.4;

    color: #eeeeef;
}


/* Links */

.article-content a {
    color: #8fc7ff;
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.15em;
}

.article-content a:hover {
    color: #b8dcff;
}


/* Lists */

.article-content ul,
.article-content ol {
    margin-top: 1.25rem;
    margin-bottom: 1.75rem;
    padding-left: 1.75rem;
}

.article-content li {
    margin-bottom: 0.6rem;
}

.article-content li::marker {
    color: #9999a2;
}

/* Blockquotes */

.article-content blockquote {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;

    padding: 0.25rem 0 0.25rem 1.5rem;

    border-left: 3px solid #62626c;

    color: #bcbcc3;
    font-size: 1.08em;
}

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


/* Inline code */

.article-content code {
    padding: 0.15em 0.35em;

    border: 1px solid #3d3d45;
    border-radius: 4px;

    background: #25252b;

    font-size: 0.9em;
}


/* Code blocks */

.article-content pre {
    overflow-x: auto;

    margin: 2.5rem 0;
    padding: 1.5rem;

    border: 1px solid #3d3d45;
    border-radius: 8px;

    background: #222227;

    line-height: 1.55;
}

.article-content pre code {
    padding: 0;
    border: 0;
    background: transparent;
}


/* Images */

.article-content img {
    display: block;

    max-width: 100%;
    height: auto;

    margin: 2.5rem auto;

    border-radius: 6px;
}

.article-hero {
    width: min(100%, 760px);
    margin: 0 auto 3rem;
}

.article-hero img {
    display: block;
    width: 100%;
    height: auto;

    border: 1px solid #3d3d45;
    border-radius: 8px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);
}

/* Horizontal rules */

.article-content hr {
    max-width: 700px;

    margin: 3.5rem auto;

    border: 0;
    border-top: 1px solid #3a3a40;
}


/* Strong and emphasis */

.article-content strong {
    color: #f0f0f1;
}

.article-content em {
    color: #e4e4e6;
}

/* ---------------------------------
   Table of contents
   --------------------------------- */

.article-toc {
    max-width: 700px;

    margin: 0 auto 3rem;
    padding: 1.5rem 1.75rem;

    border: 1px solid #3d3d45;
    border-radius: 8px;

    background: #222227;
}

.article-toc__title {
    margin: 0 0 1rem;

    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: #96969e;
}

.article-toc__links nav {
    margin: 0;
}

.article-toc__links ul {
    margin: 0;
    padding-left: 1.25rem;
}

.article-toc__links ul ul {
    margin-top: 0.5rem;
}

.article-toc__links li {
    margin: 0.45rem 0;
}

.article-toc__links a {
    color: #cfcfd4;
    text-decoration: none;
}

.article-toc__links a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* ---------------------------------
   Build 003E — Article elements
   --------------------------------- */

/* Return to table of contents */

.article-content a.heading-return {
    display: inline-flex;
    align-items: center;

    margin-left: 0.35rem;

    color: #8d8d96;
    text-decoration: none;

    opacity: 0.55;
}

.article-content a.heading-return svg {
    display: block;
    width: 8px;
    height: 8px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.article-content a.heading-return:hover {
    color: #b8b8be;
    text-decoration: none;
    opacity: 0.9;
}

/* Tables */

.article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    margin: 2.5rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-content th,
.article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #3d3d45;
    text-align: left;
    vertical-align: top;
}

.article-content th {
    background: #25252b;
    color: #eeeeef;
    font-weight: 600;
}

.article-content tbody tr:nth-child(even) {
    background: #202025;
}


/* Footnotes */

.article-content .footnotes {
    max-width: 700px;
    margin: 4rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #3a3a40;
    color: #a9a9b0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content .footnotes hr {
    display: none;
}

.article-content .footnotes ol {
    padding-left: 1.4rem;
}

.article-content .footnotes li {
    margin-bottom: 0.8rem;
}

.article-content .footnote-ref,
.article-content .footnote-backref {
    color: #8fc7ff;
    text-decoration: none;
}

.article-content .footnote-ref:hover,
.article-content .footnote-backref:hover {
    color: #b8dcff;
}


/* Video */

.article-video {
    margin: 2.75rem auto;
}

.article-video video,
.article-content video {
    display: block;
    width: auto;
    max-width: min(700px, calc(100vw - 4rem));
    height: auto;
    max-height: 70vh;
    margin: 0 auto;
    box-sizing: border-box;
    border: 1px solid #3d3d45;
    border-radius: 8px;
    background: #000;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);
}


/* Figures and captions */

.article-content figure {
    margin: 2.75rem 0;
}

.article-content figure img {
    margin: 0 auto;
}

.article-content figcaption {
    max-width: 700px;
    margin: 0.75rem auto 0;
    color: #888891;
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
}


@media (max-width: 700px) {
    .article-video video,
    .article-content video {
        max-width: calc(100vw - 2rem);
        max-height: 65vh;
    }
}

/* ---------------------------------
   Build 003F — Article footer
   --------------------------------- */

.article-end {
    max-width: 700px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #3a3a40;
}

.article-tags {
    margin-bottom: 2.5rem;
}

.article-tags__label {
    margin: 0 0 0.75rem;
    color: #85858d;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-tags__list a {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    border: 1px solid #3d3d45;
    border-radius: 999px;
    background: #222227;
    color: #cfcfd4;
    font-size: 0.85rem;
    text-decoration: none;
}

.article-tags__list a:hover {
    color: #ffffff;
    border-color: #565660;
    text-decoration: none;
}

.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.article-nav__item--next {
    text-align: right;
}

.article-nav__label {
    display: block;
    margin-bottom: 0.4rem;
    color: #85858d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.article-nav__link {
    color: #d7d7dc;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.article-nav__link:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.article-site-footer {
    margin-top: 4rem;
}

@media (max-width: 700px) {
    .article-nav {
        grid-template-columns: 1fr;
    }

    .article-nav__item--next {
        text-align: left;
    }
}

/* ---------------------------------
   Build 004A — Global navigation
   --------------------------------- */

.site-header {
    width: 100%;
    margin-bottom: 3rem;
}

.site-header__inner {
    width: min(100%, 900px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-brand {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.site-brand a {
    color: #e8e8ea;
    text-decoration: none;
}

.site-brand a:hover {
    color: #ffffff;
}

.site-nav {
    margin-left: auto;
}

.site-nav__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__link {
    color: #9d9da5;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.site-nav__link:hover {
    color: #eeeeef;
}

.site-nav__link[aria-current="page"] {
    color: #eeeeef;
}

@media (max-width: 700px) {
    .site-header {
        margin-bottom: 2.25rem;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

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

    .site-nav__list {
        gap: 0.9rem 1.2rem;
    }
}

/* ---------------------------------
   Build 004B — Archive page
   --------------------------------- */

.archive-page {
    width: min(100%, 900px);
    margin: 0 auto;
}

.archive-header {
    max-width: 700px;
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #3a3a40;
}

.archive-header h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.archive-header p {
    margin: 1.25rem 0 0;
    color: #a9a9b0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.archive-year + .archive-year {
    margin-top: 3.5rem;
}

.archive-year__title {
    margin: 0 0 1.25rem;
    color: #96969e;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.archive-list {
    border-top: 1px solid #34343a;
}

.archive-item {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid #34343a;
}

.archive-item__date {
    color: #85858d;
    font-size: 0.85rem;
    white-space: nowrap;
}

.archive-item__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.archive-item__title a {
    color: #dddddf;
    text-decoration: none;
}

.archive-item__title a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.archive-site-footer {
    margin-top: 5rem;
}

@media (max-width: 700px) {
    .archive-header {
        margin-bottom: 2.5rem;
    }

    .archive-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.9rem 0;
    }

    .archive-item__date {
        font-size: 0.78rem;
    }
}

/* ---------------------------------
   Build 004C — Tags index
   --------------------------------- */

.tags-page {
    width: min(100%, 900px);
    margin: 0 auto;
}

.tags-header {
    max-width: 700px;
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #3a3a40;
}

.tags-header h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.tags-header p {
    margin: 1.25rem 0 0;
    color: #a9a9b0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 2.5rem;
}

.tag-index-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #34343a;
}

.tag-index-item__link {
    color: #dddddf;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
}

.tag-index-item__link:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.tag-index-item__count {
    flex: 0 0 auto;
    color: #85858d;
    font-size: 0.82rem;
}

.tags-site-footer {
    margin-top: 5rem;
}

@media (max-width: 700px) {
    .tags-header {
        margin-bottom: 2.5rem;
    }

    .tags-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ---------------------------------
   Build 004D — Individual tag pages
   --------------------------------- */

.term-page {
    width: min(100%, 900px);
    margin: 0 auto;
}

.term-header {
    max-width: 700px;
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #3a3a40;
}

.term-header h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.term-header p {
    margin: 1.25rem 0 0;
    color: #a9a9b0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.term-list {
    border-top: 1px solid #34343a;
}

.term-item {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid #34343a;
}

.term-item__date {
    color: #85858d;
    font-size: 0.85rem;
    white-space: nowrap;
}

.term-item__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.term-item__title a {
    color: #dddddf;
    text-decoration: none;
}

.term-item__title a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.term-site-footer {
    margin-top: 5rem;
}

@media (max-width: 700px) {
    .term-header {
        margin-bottom: 2.5rem;
    }

    .term-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.9rem 0;
    }

    .term-item__date {
        font-size: 0.78rem;
    }
}

/* ---------------------------------
   Build 004E — General pages
   --------------------------------- */

.general-page {
    width: min(100%, 760px);
    margin: 0 auto;
}

.general-page__header {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #3a3a40;
}

.general-page__title {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.general-page__description {
    margin: 1.25rem 0 0;
    color: #a9a9b0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.general-page__content {
    max-width: 700px;
    margin: 0 auto;
    color: #dddddf;
    font-size: 1.1rem;
    line-height: 1.75;
}

.general-page__content p {
    margin: 0 0 1.5rem;
}

.general-page__content h2 {
    margin: 3rem 0 1.1rem;
    color: #eeeeef;
    font-size: clamp(1.7rem, 4vw, 2.2rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.general-page__content h3 {
    margin: 2.25rem 0 0.9rem;
    color: #eeeeef;
    font-size: 1.35rem;
    line-height: 1.3;
}

.general-page__content ul,
.general-page__content ol {
    margin: 1.25rem 0 1.75rem;
    padding-left: 1.75rem;
}

.general-page__content li {
    margin-bottom: 0.6rem;
}

.general-page__content a {
    color: #8fc7ff;
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.15em;
}

.general-page__content a:hover {
    color: #b8dcff;
}

.general-page__content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2.5rem auto;
    border-radius: 6px;
}

.general-page__content blockquote {
    margin: 2.5rem 0;
    padding: 0.25rem 0 0.25rem 1.5rem;
    border-left: 3px solid #62626c;
    color: #bcbcc3;
}

.general-page__content hr {
    margin: 3.5rem 0;
    border: 0;
    border-top: 1px solid #3a3a40;
}

.general-page-site-footer {
    margin-top: 5rem;
}

@media (max-width: 700px) {
    .general-page__header {
        margin-bottom: 2.5rem;
    }

    .general-page__content {
        font-size: 1.05rem;
        line-height: 1.7;
    }
}

@media (max-width: 700px) {
    body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .site-intro {
        margin-bottom: 0;
    }

    .frontispiece {
        margin-top: 2.75rem;
        margin-bottom: 2.75rem;
    }

    .featured-post {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .recent-posts {
        margin-top: 2.5rem;
    }
}

@media (max-width: 700px) {

    .article-header__title {
        font-size: clamp(2.4rem, 11vw, 3.4rem);
        line-height: 1.05;
    }

    .article-header__description {
        font-size: 1.05rem;
        line-height: 1.55;
    }

    .article-end {
        margin-top: 3rem;
        padding-top: 1.75rem;
    }

    .article-tags {
        margin-bottom: 2rem;
    }

    .article-site-footer {
        margin-top: 3rem;
    }

    .site-footer {
        margin-top: 0;
    }
}

/* ---------------------------------
   Build 005B — Typography & spacing consistency
   --------------------------------- */

/* Article page heading system */
.article-header__title {
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 3.75rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: #f1f1f2;
}

.article-header__description {
    max-width: 650px;
    margin: 1.25rem 0 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #b8b8be;
}

.article-header__meta {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #909099;
}

/* Keep page descriptions on one consistent secondary tier */
.archive-header p,
.tags-header p,
.term-header p,
.general-page__description {
    color: #aaaaB1;
}

/* Keep labels and metadata readable without competing with body text */
.featured-post__label,
.article-toc__title,
.archive-year__title,
.article-tags__label,
.article-nav__label {
    color: #9999a2;
}

.featured-post__meta,
.post-card__meta,
.archive-item__date,
.term-item__date,
.tag-index-item__count {
    color: #909099;
}

/* Match general-page body rhythm to article rhythm */
.general-page__content h2 {
    margin-top: 3.25rem;
    margin-bottom: 1.25rem;
}

.general-page__content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Avoid double vertical spacing when a page wrapper already spaces the footer */
.article-site-footer .site-footer,
.archive-site-footer .site-footer,
.tags-site-footer .site-footer,
.term-site-footer .site-footer,
.general-page-site-footer .site-footer {
    margin-top: 0;
}

/* Use the same footer separation across secondary page types */
.article-site-footer,
.archive-site-footer,
.tags-site-footer,
.term-site-footer,
.general-page-site-footer {
    margin-top: 4rem;
}

/* Keep the homepage hierarchy slightly more compact below the hero */
.featured-post__description {
    margin-top: 1.25rem;
}

.featured-post__meta {
    margin-top: 1rem;
}

.featured-post__link {
    margin-top: 1.25rem;
}

/* Mobile refinements: preserve readable type while keeping hierarchy proportional */
@media (max-width: 700px) {
    .article-header__title {
        font-size: clamp(2.35rem, 10.5vw, 3.25rem);
        line-height: 1.05;
    }

    .article-header__description {
        font-size: 1.05rem;
        line-height: 1.55;
    }

    .article-header__meta {
        margin-bottom: 0.9rem;
    }

    .article-site-footer,
    .archive-site-footer,
    .tags-site-footer,
    .term-site-footer,
    .general-page-site-footer {
        margin-top: 3rem;
    }
}

/* ---------------------------------
   Build 005C — Navigation polish
   --------------------------------- */

.site-brand a,
.site-nav__link {
    transition:
        color 120ms ease,
        text-decoration-color 120ms ease;
}

.site-brand a:focus-visible,
.site-nav__link:focus-visible {
    outline: 2px solid #8fc7ff;
    outline-offset: 4px;
    border-radius: 2px;
}

.site-nav__link {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.3em;
    text-decoration-color: transparent;
}

.site-nav__link:hover {
    color: #eeeeef;
    text-decoration-color: #66666f;
}

.site-nav__link[aria-current="page"] {
    color: #eeeeef;
    font-weight: 700;
    text-decoration-color: #777780;
}

@media (max-width: 700px) {
    .site-header__inner {
        gap: 1.05rem;
    }

    .site-nav__list {
        gap: 0.85rem 1.15rem;
    }

    .site-nav__link {
        text-underline-offset: 0.25em;
    }
}

/* ---------------------------------
   Build 005D — Media polish
   --------------------------------- */

/* Frontispiece: keep the framed-print effect, but make it slightly quieter */
.frontispiece {
    background: #27272d;
    border-color: #5f5f68;
    box-shadow:
        0 0 0 4px #202025,
        0 12px 28px rgba(0, 0, 0, 0.20);
}

.frontispiece img {
    border-color: #414149;
}

/* Use a shared visual treatment for article media */
.article-hero img,
.article-content img,
.article-video video,
.article-content video {
    border-radius: 8px;
}

/* Hero media should feel prominent but not overly glossy */
.article-hero img {
    border-color: #3b3b43;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.16);
}

/* Inline images get a lighter touch than hero/video media */
.article-content img {
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.10);
}

/* Figures inherit the image treatment without adding extra visual framing */
.article-content figure {
    margin-top: 2.75rem;
    margin-bottom: 2.75rem;
}

.article-content figure img {
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.10);
}

/* Captions: slightly clearer than metadata, still deliberately secondary */
.article-content figcaption {
    margin-top: 0.8rem;
    color: #92929a;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Video styling: retain the working sizing rules, polish only the decoration */
.article-video video,
.article-content video {
    border-color: #3b3b43;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.16);
}

/* Media spacing on narrow screens */
@media (max-width: 700px) {
    .article-hero {
        margin-bottom: 2.5rem;
    }

    .article-content img,
    .article-content figure,
    .article-video {
        margin-top: 2.25rem;
        margin-bottom: 2.25rem;
    }
}

/* ---------------------------------
   Build 005E — Final visual cleanup
   --------------------------------- */

/* Prevent unusually long titles or link text from forcing horizontal overflow. */
.featured-post__title,
.post-card__title,
.article-header__title,
.archive-item__title,
.term-item__title,
.article-nav__link,
.general-page__title {
    overflow-wrap: break-word;
}

/* Give keyboard focus the same clear treatment across editorial links. */
.featured-post__title a:focus-visible,
.featured-post__link:focus-visible,
.post-card__title a:focus-visible,
.post-card__link:focus-visible,
.homepage-archive-link a:focus-visible,
.archive-item__title a:focus-visible,
.tag-index-item__link:focus-visible,
.term-item__title a:focus-visible,
.article-nav__link:focus-visible,
.article-tags__list a:focus-visible,
.article-content a:focus-visible,
.general-page__content a:focus-visible,
.site-footer a:focus-visible {
    outline: 2px solid #8fc7ff;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Keep media edges visually tidy inside their containers. */
.frontispiece,
.article-hero,
.article-video,
.article-content figure {
    max-width: 100%;
}

/* Final narrow-screen safeguard for long navigation/article-footer titles. */
@media (max-width: 700px) {
    .site-nav__link,
    .article-nav__link {
        overflow-wrap: anywhere;
    }
}

.article-nav__item {
	border: 3px solid red;
}

/* ---------------------------------
   Build 008A — Editorial article navigation
   --------------------------------- */

.article-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.article-nav--single {
    grid-template-columns: 1fr;
}

.article-nav__item {
    display: block;
    min-width: 0;
    padding: 1.15rem 1.25rem;

    border: 1px solid #34343a;
    border-radius: 8px;

    background: #202025;

    color: inherit;
    text-decoration: none;

    transition:
        border-color 120ms ease,
        background-color 120ms ease;
}

.article-nav__item:hover {
    border-color: #4a4a53;
    background: #222228;
    text-decoration: none;
}

.article-nav__item--next {
    text-align: right;
}

.article-nav__label {
    display: block;
    margin-bottom: 0.45rem;

    color: #9999a2;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.article-nav__title {
    display: block;

    color: #dddddf;

    font-weight: 650;
    line-height: 1.35;

    overflow-wrap: anywhere;
}

.article-nav__date {
    display: block;
    margin-top: 0.55rem;

    color: #85858d;

    font-size: 0.78rem;
    line-height: 1.35;
}

.article-nav__item:hover .article-nav__title {
    color: #ffffff;
}

.article-nav__item:focus-visible {
    outline: 2px solid #8fc7ff;
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .article-nav,
    .article-nav--single {
        grid-template-columns: 1fr;
    }

    .article-nav__item--next {
        text-align: left;
    }
}

/* ---------------------------------
   Build 008B — About / author identity
   --------------------------------- */

.author-card {
    margin: 0 0 3rem;
    padding: 1.4rem 1.5rem;

    border: 1px solid #34343a;
    border-radius: 8px;

    background: #202025;
}

.author-card__name {
    margin: 0;

    color: #eeeeef;

    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.author-card__description {
    margin: 0.4rem 0 0;

    color: #aaaaB1;

    font-size: 0.95rem;
    line-height: 1.55;
}

.author-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;

    margin: 0.85rem 0 0;

    color: #85858d;

    font-size: 0.85rem;
}

.general-page__content .author-card__links a {
    color: #b8b8be;
    text-decoration: none;
}

.general-page__content .author-card__links a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.author-card p {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .author-card {
        margin-bottom: 2.5rem;
        padding: 1.25rem;
    }
}

/* ---------------------------------
   Build 008C — Archive & tag browsing
   --------------------------------- */

.archive-year__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.archive-year__title {
    margin-bottom: 0;
}

.archive-year__count {
    flex: 0 0 auto;
    color: #909099;
    font-size: 0.78rem;
}

@media (max-width: 700px) {
    .archive-year__header {
        margin-bottom: 1rem;
    }
}

/* ---------------------------------
   Build 009C — 404 page
   --------------------------------- */

.not-found {
    width: min(100% - 3rem, 700px);
    margin: 8rem auto 0;
}

.not-found__label {
    margin: 0 0 1rem;

    color: #909099;

    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.not-found__title {
    margin: 0;

    color: #f1f1f2;

    font-size: clamp(2.75rem, 7vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.not-found__description {
    margin: 1.5rem 0 0;

    color: #b8b8be;

    font-size: 1.1rem;
    line-height: 1.65;
}

.not-found__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;

    margin-top: 2rem;

    color: #85858d;
}

.not-found__links a {
    color: #d7d7dc;
    font-weight: 600;
    text-decoration: none;
}

.not-found__links a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.not-found__links a:focus-visible {
    outline: 2px solid #8fc7ff;
    outline-offset: 3px;
    border-radius: 2px;
}

@media (max-width: 700px) {
    .not-found {
        width: min(100% - 2rem, 700px);
        margin-top: 5rem;
    }
}