﻿/* tilegraphicsV3 — monochrome, wide layout */
:root {
    --bg: #ffffff;
    --bg-soft: #f6f6f6;
    --ink: #0a0a0a;
    --ink-2: #555555;
    --ink-3: #8a8a8a;
    --line: #e5e5e5;
    --line-strong: #0a0a0a;
    --radius: 4px;
    --gutter: clamp(1.25rem, 4vw, 4rem);
    --wide: 1760px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.maxwidth {
    width: min(var(--wide), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.brand { display: flex; align-items: center; gap: 0.9rem; }
.brand__mark { display: flex; align-items: center; }
.brand__mark img { height: 32px; width: auto; display: block; }
.brand__initials { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.is-home .brand__text { display: none; }
.brand__title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.brand__tagline { color: var(--ink-2); font-size: 0.8rem; }

.site-header__nav { display: flex; align-items: center; gap: 0.25rem 2rem; font-size: 0.9rem; }
.site-header__link { font-weight: 500; padding: 0.3rem 0; border-bottom: 1px solid transparent; }
.site-header__link:hover, .site-header__link:focus { border-bottom-color: var(--ink); }

.site-main { flex: 1 0 auto; padding-bottom: 6rem; }
.site-content { margin-top: 0; }

.breadcrumbs { padding: 1.5rem 0 0; font-size: 0.8rem; color: var(--ink-2); }
.breadcrumbs ol { list-style: none; display: flex; gap: 0.75rem; padding: 0; margin: 0; flex-wrap: wrap; }
.breadcrumbs li::after { content: '/'; margin-left: 0.75rem; color: var(--ink-3); }
.breadcrumbs li:last-child::after { content: none; }
.breadcrumbs .current { color: var(--ink); font-weight: 500; }

/* Hero */
.hero-band {
    position: relative;
    isolation: isolate;
    background: #2f4a2a url('../img/tile-1794186862350.jpg') repeat left top / 360px 360px;
    color: #fff;
    border-bottom: 1px solid var(--line-strong);
}

.hero-band::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.7) 22%, rgba(0, 0, 0, 0) 55%);
}

.hero {
    padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.hero__text { display: flex; flex-direction: column; gap: 1.25rem; max-width: 900px; }

.hero__eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; color: rgba(255, 255, 255, 0.7); }

.hero__title {
    margin: 0;
    font-size: clamp(2.2rem, 4.8vw, 4.75rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    font-weight: 600;
}

.hero__lead { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; max-width: 46ch; }

.hero__nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.hero__nav a {
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.hero__nav a:hover { border-color: #fff; }
.hero__nav a.is-active { background: #fff; border-color: #fff; color: var(--ink); }

/* Header search */
.header-search { position: relative; display: flex; align-items: center; width: 220px; }
.header-search input {
    width: 100%;
    font: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 2.4rem 0.45rem 0.9rem;
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: border-color 0.2s ease;
}
.header-search input::placeholder { color: var(--ink-3); }
.header-search input:focus { outline: none; border-color: var(--ink); }
.header-search .search-button { width: 32px; height: 32px; right: 0.15rem; }
.header-search .search-button svg { width: 16px; height: 16px; }

a.button {
    background: var(--ink);
    color: var(--bg);
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    transition: background 0.2s ease, color 0.2s ease;
}
a.button:hover { background: var(--bg); color: var(--ink); }

.textcenter { text-align: center; }

/* Search */
.search-form { position: relative; display: flex; align-items: center; width: 100%; }

.search-form input {
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    padding: 0.7rem 3rem 0.7rem 1rem;
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.2s ease;
}
.search-form input::placeholder { color: var(--ink-3); }
.search-form input:focus { outline: none; border-color: var(--ink); }

.search-button {
    position: absolute;
    right: 0.35rem;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.search-button svg { width: 18px; height: 18px; }

/* Section heading (category, tag, search) */
.section-heading {
    padding: clamp(2.5rem, 6vw, 5rem) 0 2rem;
    display: grid;
    gap: 0.6rem;
    border-bottom: 1px solid var(--line-strong);
}
.section-heading__eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.section-heading__title { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.03em; line-height: 1.05; font-weight: 600; }
.section-heading__lead { margin: 0; color: var(--ink-2); max-width: 640px; }

/* Featured post */
.featured {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
}

.featured__image { display: block; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; border-radius: var(--radius); }
.featured__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.featured:hover .featured__image img { transform: scale(1.02); }

.featured__body { display: grid; gap: 1.1rem; align-content: center; }
.featured__label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.featured__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.8rem; color: var(--ink-2); }
.featured__category { color: var(--ink); font-weight: 600; }
.featured__title { margin: 0; font-size: clamp(1.8rem, 3.2vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; }
.featured__title a:hover { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 1px; }
.featured__excerpt { margin: 0; color: var(--ink-2); font-size: 1.05rem; max-width: 52ch; }
.featured__more { font-size: 0.9rem; font-weight: 500; justify-self: start; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* Cards */
.post-feed {
    margin-top: 4rem;
    display: grid;
    gap: 3rem clamp(1.25rem, 2vw, 2.5rem);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.feed-title {
    margin-top: 4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-strong);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
}
.feed-title + .post-feed { margin-top: 2rem; }

.post-card { display: flex; flex-direction: column; gap: 1rem; }

.post-card__image { display: block; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; border-radius: var(--radius); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.post-card:hover .post-card__image img { transform: scale(1.03); }

.post-card__body { display: grid; gap: 0.6rem; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.75rem; color: var(--ink-2); align-items: center; }
.post-card__category { color: var(--ink); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; }
.post-card__title { margin: 0; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.post-card__title a:hover { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 1px; }
.post-card__excerpt { margin: 0; color: var(--ink-2); font-size: 0.92rem; }

.post-card__tags, .article__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.post-card__tags a, .article__tags a {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--ink-2);
    transition: border-color 0.2s ease, color 0.2s ease;
}
.post-card__tags a:hover, .article__tags a:hover { border-color: var(--ink); color: var(--ink); }

.empty-state { grid-column: 1 / -1; padding: 4rem 0; text-align: center; color: var(--ink-2); }

/* Paginator */
.paginator { margin-top: 5rem; display: flex; justify-content: center; }
.paginator ul { display: flex; gap: 0.4rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.paginator li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.85rem;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.paginator li a:hover { border-color: var(--ink); }
.paginator li.active a, .paginator li a.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Article */
.article-layout {
    padding-top: clamp(2rem, 5vw, 4rem);
    display: grid;
    gap: clamp(2rem, 5vw, 6rem);
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
}

.article { min-width: 0; }

.article__header { max-width: 1100px; display: grid; gap: 1.1rem; padding-bottom: 2rem; }
.article__category { justify-self: start; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.article__title { margin: 0; font-size: clamp(2.2rem, 4.5vw, 4.5rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; }
.article__meta { display: flex; gap: 0.3rem 1.4rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-2); }

figure.article__media { margin: 0 0 3rem; padding: 0; }
.article__media img { width: 100%; max-height: 640px; object-fit: cover; display: block; border-radius: var(--radius); }

.article__content { font-size: 1.08rem; line-height: 1.75; }
.article__content > * { margin-top: 0; margin-bottom: 1.25em; }

.article__content h2 { font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1.2; margin: 2.8rem 0 1rem; }
.article__content h3 { font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1.3; margin: 2.2rem 0 0.8rem; }
.article__content h4 { font-size: 1.1rem; margin: 1.8rem 0 0.6rem; }
.article__content a { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
.article__content ul, .article__content ol { padding-left: 1.4em; }
.article__content li { margin-bottom: 0.4em; }
.article__content li::marker { color: var(--ink-3); }

/* Images: keep their own size (thumbnails stay small, full size fills the column) */
.article__content img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }
.article__content > img { display: inline-block; vertical-align: top; margin: 0 0.75rem 0.75rem 0; }

/* Lone images and embeds */
.article__content > p:has(> img:only-child),
.article__content > p:has(> a:only-child > img),
.article__content > p:has(> iframe) { font-size: 1rem; }
.article__content > p:has(> iframe) { display: flex; justify-content: flex-start; }
.article__content > p[style*="text-align: center"]:has(> iframe) { justify-content: center; }
.article__content > p[style*="text-align: right"]:has(> iframe) { justify-content: flex-end; }

/* Image groups (marked by article.js): centred auto-fit grid, cells 220-320px */
.article__content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 320px));
    justify-content: center;
    gap: 1rem;
    font-size: 1rem;
}
.article__content .gallery br { display: none; }
.article__content .gallery a { display: block; }
.article__content .gallery img { width: 100%; height: auto; margin: 0; }

.article__content img.zoomable { cursor: zoom-in; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.94); }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 90vh; width: auto; height: auto; object-fit: contain; border-radius: 0; cursor: default; }
.lightbox__close, .lightbox__nav { position: absolute; background: none; border: none; color: #fff; font-family: inherit; line-height: 1; cursor: pointer; opacity: 0.75; transition: opacity 0.2s ease; }
.lightbox__close:hover, .lightbox__nav:hover { opacity: 1; }
.lightbox__close { top: 1rem; right: 1.25rem; font-size: 2.5rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 4rem; padding: 1rem; }
.lightbox__nav--prev { left: 0.5rem; }
.lightbox__nav--next { right: 0.5rem; }
.lightbox.is-single .lightbox__nav { display: none; }
.lightbox__count { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.7); font-size: 0.8rem; letter-spacing: 0.1em; }
body.lightbox-open { overflow: hidden; }

.article__content figure { margin: 2rem 0; }
.article__content figure img { margin: 0; }
.article__content figcaption { margin-top: 0.6rem; font-size: 0.85rem; color: var(--ink-2); }

.article__content iframe, .article__content video { display: block; max-width: 100%; border: 0; border-radius: var(--radius); }
.article__content iframe { width: 100%; max-width: 760px; }

.article__content blockquote { margin-left: 0; padding-left: 1.5rem; border-left: 2px solid var(--ink); color: var(--ink-2); }
.article__content pre { background: var(--bg-soft); padding: 1.25rem; overflow-x: auto; border-radius: var(--radius); font-size: 0.9rem; max-width: 100%; }
.article__content code { background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.9em; }
.article__content pre code { background: none; padding: 0; }
.article__content table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.article__content th, .article__content td { border-bottom: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; }
.article__content hr { border: none; border-top: 1px solid var(--line); margin: 3rem 0; }

.article__footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.article__sidebar { position: sticky; top: 100px; display: grid; gap: 2rem; }
.article__sidebar .plugin { padding-top: 1rem; border-top: 1px solid var(--line-strong); }
.article__sidebar .plugin-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; margin: 0 0 0.8rem; }
.article__sidebar .plugin-content { color: var(--ink-2); font-size: 0.9rem; }
.article__sidebar ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.article__sidebar a:hover { text-decoration: underline; }

/* Footer */
.site-footer { background: var(--ink); color: #fff; padding: 5rem 0 2rem; }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem 6rem; }
.site-footer__brand { display: grid; gap: 0.8rem; align-content: start; max-width: 340px; }
.site-footer__eyebrow { text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.55); }
.site-footer__copy { margin: 0; line-height: 1.5; color: rgba(255, 255, 255, 0.8); font-size: 1.1rem; }

.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; }
.site-footer__grid h4 { margin: 0 0 1rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; color: rgba(255, 255, 255, 0.55); }
.site-footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.92rem; color: rgba(255, 255, 255, 0.85); }
.site-footer__grid li a:hover { text-decoration: underline; }

.site-footer .search-form input { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.site-footer .search-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.site-footer .search-form input:focus { border-color: #fff; }
.site-footer .search-button { color: #fff; }

.site-footer__meta { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.18); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }
.site-footer__meta a { color: inherit; }

/* Responsive */
@media (max-width: 1100px) {
    .article-layout { grid-template-columns: 1fr; }
    .article__sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .site-footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .featured { grid-template-columns: 1fr; }
    .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 560px) {
    .site-header { position: static; }
    .site-header__nav { flex-wrap: wrap; gap: 0.5rem 1.25rem; }
    .article__content { font-size: 1rem; }
}
