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

:root {
    --bg: #050608;
    --card-bg: rgba(255, 255, 255, .04);
    --card-bg-hover: rgba(255, 255, 255, .07);
    --border: rgba(255, 255, 255, .08);
    --border-card: rgba(255, 255, 255, .07);
    --border-card-hover: rgba(255, 255, 255, .12);
    --text: #ffffff;
    --text-body: rgba(255, 255, 255, .85);
    --text-secondary: rgba(255, 255, 255, .65);
    --text-tertiary: rgba(255, 255, 255, .45);
    --accent: #e8a34c;
    --font-body: 'Space Grotesk', -apple-system, system-ui, sans-serif;
    --font-display: 'Bricolage Grotesque', 'Space Grotesk', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --max-width: 1440px;
    --gutter: 48px;
    --article-width: 720px;
    --header-height: 64px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #f0b96e; }

img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Kickers (mono data labels) ===== */
.kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
}
.kicker-label {
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
}
.kicker-date {
    font-weight: 400;
    color: rgba(255, 255, 255, .5);
}
.kicker--card { font-size: 11px; }
.kicker--card .kicker-date { font-weight: 600; letter-spacing: .14em; color: var(--accent); }

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

/* On the homepage the header floats transparent over the hero */
body.home .header {
    position: absolute;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}
body.home .header-inner { height: 80px; }

.logo {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 22px;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.logo:hover { color: var(--text); }

.header-right { display: flex; align-items: center; gap: 32px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
    font-weight: 500;
    transition: color .2s;
}
.nav a:hover { color: var(--text); }

.nav-cta {
    background: var(--accent);
    color: var(--bg);
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 600;
    white-space: nowrap;
    transition: filter .2s;
}
.nav-cta:hover { filter: brightness(1.08); color: var(--bg); }

.nav a.lang-switch { letter-spacing: .05em; }

/* Burger */
.burger { display: none; background: none; border: none; cursor: pointer; padding: 10px 6px; }
.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
    transition: .3s;
}
.burger--open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.burger--open span:nth-child(2) { opacity: 0; }
.burger--open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ===== Main ===== */
.main { flex: 1; padding: 2rem 0; }
body.home .main { padding-top: 0; }

/* ===== Home hero — Photo of the Day, full-bleed ===== */
.home-hero {
    position: relative;
    height: min(90vh, 820px);
    overflow: hidden;
    background: var(--bg);
}

.home-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-scrim {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 340px;
    background: linear-gradient(to top, #050608 8%, transparent);
    pointer-events: none;
}

.home-hero-bottom {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    bottom: 48px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.home-hero-caption {
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -0.025em;
}
.home-hero-title a { color: var(--text); }
.home-hero-title a:hover { color: var(--text); }

.home-hero-dek {
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 560px;
}

.ghost-pill {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .3);
    padding: 12px 22px;
    border-radius: 100px;
    white-space: nowrap;
    transition: border-color .2s;
}
.ghost-pill:hover { border-color: rgba(255, 255, 255, .6); color: var(--text); }

/* ===== Section head ===== */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding: 64px 0 28px;
}
body:not(.home) .section-head { padding-top: 16px; }

.section-head-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 32px;
    letter-spacing: -0.02em;
}

.section-head-meta {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* ===== Home grid: feature + compact stack ===== */
.home-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}

.feature-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 520px;
    background: var(--card-bg);
}

.feature-card-link { display: block; height: 100%; }

.feature-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease-out;
}
.feature-card:hover .feature-card-img { transform: scale(1.03); }

.feature-card-scrim {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(5, 6, 8, .95) 15%, transparent);
    pointer-events: none;
}

.feature-card-body {
    position: absolute;
    left: 32px; right: 32px; bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-card-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--text);
}

.feature-card-dek {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .6);
}

.compact-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.compact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    transition: background .2s, border-color .2s;
}
.compact-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-card-hover);
}

.compact-card-link {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px;
    color: inherit;
    height: 100%;
}
.compact-card-link:hover { color: inherit; }

.compact-thumb {
    flex: none;
    width: 120px;
    height: 88px;
    border-radius: 10px;
    object-fit: cover;
}

.compact-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.compact-kicker {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.compact-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    color: var(--text);
}

/* ===== More grid (older articles / inner pages) ===== */
.more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
.more-grid:first-child { margin-top: 0; }

/* ===== Articles grid (tag pages) ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-card);
    transition: background .2s, border-color .2s;
}
.card:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-card-hover);
}

.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }

.card-img-wrap { aspect-ratio: 16/9; overflow: hidden; }
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease-out;
}
.card:hover .card-img { transform: scale(1.03); }

.card-body { padding: 1rem 1.25rem 1.15rem; }

.card-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
}

.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.tag-badge {
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding: 1rem 0;
}

.pagination-link {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: border-color .2s;
}
.pagination-link:hover { border-color: rgba(255, 255, 255, .6); color: var(--text); }

.pagination-info {
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    font-size: 13px;
    letter-spacing: .08em;
}

/* ===== Article Detail ===== */
.article-hero {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #000;
}

.article-hero-img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 1000;
    overflow: auto;
    cursor: zoom-out;
    padding: 3.5rem 1rem 1rem;
    box-sizing: border-box;
    text-align: center;
}
.lightbox.active { display: block; }
.lightbox-img {
    cursor: default;
    display: inline-block;
    max-width: none;
}

.article-container { max-width: var(--article-width); padding-top: 2rem; }

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

.article-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    font-size: 12px;
    letter-spacing: .06em;
}

.article-source {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.tag-link {
    background: rgba(232, 163, 76, .1);
    color: var(--accent);
    padding: 0.2rem 0.7rem;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
}
.tag-link:hover { background: rgba(232, 163, 76, .2); }

.article-body {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-body);
}
.article-body p { margin-bottom: 1.25rem; }
.article-body a { text-decoration: underline; }
.article-body b, .article-body strong { font-weight: 600; color: var(--text); }

.explore-try-link {
    margin: 1.5rem 0;
    font-size: 1.1rem;
}
.explore-try-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.explore-try-link a:hover { text-decoration: underline; }

/* ===== Photo Detail ===== */
.photo-hero {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #000;
}

.photo-hero-img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.photo-credit {
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    font-size: 10px;
    letter-spacing: .06em;
}

/* ===== Article Nav (prev/next) ===== */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.article-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1.1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    max-width: 48%;
    transition: background .2s, border-color .2s;
}
.article-nav-link:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-card-hover);
}

.article-nav-next { text-align: right; margin-left: auto; }

.article-nav-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.article-nav-title {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
    line-height: 1.4;
}

/* ===== Page Header (tags, archive) ===== */
.page-header { margin-bottom: 2rem; padding-top: 1rem; }
.page-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.section { margin-bottom: 2.5rem; }
.section-title {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

/* ===== Archive ===== */
.archive-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.archive-chip {
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color .2s, border-color .2s;
}
.archive-chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .5); }
.archive-chip.active {
    color: var(--bg);
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}
.archive-chip.active:hover { color: var(--bg); }

.archive-nav { margin-bottom: 2.5rem; }
.archive-nav-year {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.25rem 0;
}
.archive-nav-year-label {
    font-family: var(--font-display);
    font-weight: 800;
    min-width: 3rem;
}
.archive-nav-months {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.85rem;
}
.archive-nav-month {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--text-tertiary);
}
.archive-nav-month:hover { color: var(--accent); }

.archive-month {
    margin-bottom: 2rem;
    scroll-margin-top: var(--header-height);
}
.archive-month-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--accent);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--header-height);
    background: var(--bg);
    z-index: 10;
}

.archive-list { list-style: none; }
.archive-item {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.archive-date {
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    font-size: 12px;
    min-width: 3.5rem;
    padding-top: 2px;
    font-variant-numeric: tabular-nums;
}

.archive-link {
    color: var(--text);
    font-size: 0.95rem;
}
.archive-link:hover { color: var(--accent); }

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem 0;
    font-size: 1.1rem;
}

/* ===== CTA Block ===== */
.cta-block {
    text-align: center;
    padding: 2rem;
    margin: 2.5rem 0;
    background: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: 16px;
}

.cta-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.cta-block .cta-button {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: filter .2s;
}
.cta-block .cta-button:hover { filter: brightness(1.08); color: var(--bg); }

/* ===== Footer ===== */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 28px;
    padding-bottom: 28px;
}

.footer-credit {
    color: rgba(255, 255, 255, .55);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    color: rgba(255, 255, 255, .6);
    font-size: 13px;
    font-weight: 500;
}
.footer-links a:hover { color: var(--text); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}

/* ===== Tablet ===== */
@media (max-width: 1024px) {
    .home-grid { grid-template-columns: 1fr; }
    .feature-card { height: 420px; }
    .home-hero-title { font-size: 40px; }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    :root { --gutter: 20px; --header-height: 56px; }

    .header-inner { height: var(--header-height); }
    body.home .header-inner { height: 64px; }

    .logo { font-size: 18px; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem var(--gutter) 1.25rem;
        gap: 1rem;
    }
    .nav--open { display: flex; }
    .burger { display: block; }

    .header-right { gap: 14px; }
    .nav a { padding: 4px 0; }
    .nav-cta { font-size: 12px; padding: 8px 14px; }

    .home-hero { height: min(78vh, 560px); }
    .home-hero-scrim { height: 300px; }
    .home-hero-bottom {
        bottom: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .home-hero-caption { gap: 10px; }
    .home-hero-title { font-size: 30px; letter-spacing: -0.02em; }
    .home-hero-dek { font-size: 13px; }
    .kicker { font-size: 10px; gap: 10px; }
    .ghost-pill { font-size: 13px; padding: 10px 18px; margin-top: 4px; }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 32px 0 16px;
    }
    .section-head-title { font-size: 24px; }
    .section-head-meta { font-size: 11px; }

    .home-grid { gap: 16px; }
    .feature-card { height: 300px; border-radius: 14px; }
    .feature-card-body { left: 18px; right: 18px; bottom: 18px; gap: 8px; }
    .feature-card-title { font-size: 20px; letter-spacing: -0.01em; }
    .feature-card-dek { display: none; }
    .kicker--card { font-size: 10px; }

    .compact-stack { gap: 12px; }
    .compact-card { border-radius: 12px; }
    .compact-card-link { gap: 12px; padding: 12px; }
    .compact-thumb { width: 92px; height: 72px; border-radius: 8px; }
    .compact-title { font-size: 14px; }
    .compact-kicker { font-size: 9px; }

    .more-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }

    .articles-grid { grid-template-columns: 1fr; gap: 16px; }

    .article-hero { display: block; }
    .article-hero-img { max-height: 60vh; }

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

    .article-nav { flex-direction: column; }
    .article-nav-link { max-width: 100%; }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 22px;
        padding-bottom: 28px;
    }
    .footer-links { gap: 18px; }
    .footer-links a { font-size: 12px; }
}

@media (max-width: 480px) {
    html { font-size: 15px; }
}
