@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,800&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ── Color: "field journal" palette ── */
    --ink: #101B2D;
    --ink-soft: #5B6B67;
    --ink-faint: #8B978F;
    --pine: #123832;
    --pine-deep: #0C2925;
    --pine-light: #1D4B42;
    --paper: #EFF3EE;
    --paper-warm: #E7ECE2;
    --surface: #FFFFFF;
    --line: #DFE6DE;
    --rust: #C4592B;
    --rust-hover: #A84620;
    --rust-dim: #F3DCCB;
    --gold: #B58A22;
    --gold-dim: rgba(181, 138, 34, 0.14);

    --display: 'Fraunces', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Courier New', monospace;

    --radius: 14px;
    --radius-sm: 8px;
    --radius-pill: 999px;
    --max: 1180px;

    --shadow-sm: 0 1px 2px rgba(16, 27, 45, 0.06), 0 1px 1px rgba(16, 27, 45, 0.04);
    --shadow: 0 8px 24px rgba(16, 27, 45, 0.08), 0 2px 6px rgba(16, 27, 45, 0.05);
    --shadow-lg: 0 24px 60px rgba(16, 27, 45, 0.18), 0 6px 16px rgba(16, 27, 45, 0.08);

    --ease: 320ms cubic-bezier(0.22, 1, 0.36, 1);
    --ease-fast: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }

.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: 1.75rem;
}

:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ══════════════════════════════════════
   SHARED — stamps, buttons, eyebrows
══════════════════════════════════════ */
.stamp {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.32rem 0.75rem 0.32rem 0.6rem;
    border-radius: var(--radius-pill);
    border: 1px dashed currentColor;
}

.stamp::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.stamp--hero {
    color: #FCEFE4;
    background: rgba(196, 89, 43, 0.28);
    border-color: rgba(252, 239, 228, 0.45);
}

.stamp--card {
    color: var(--rust);
    background: var(--rust-dim);
    border-color: rgba(196, 89, 43, 0.35);
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rust);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.25rem;
}

.eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-pill);
    transition: background var(--ease-fast), transform var(--ease-fast), box-shadow var(--ease-fast), color var(--ease-fast);
    border: 1px solid transparent;
}

.btn svg { transition: transform var(--ease-fast); flex-shrink: 0; }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
    background: var(--rust);
    color: #fff;
    box-shadow: 0 10px 24px rgba(196, 89, 43, 0.35);
}
.btn--primary:hover { background: var(--rust-hover); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(196, 89, 43, 0.4); }

.btn--ghost {
    color: var(--rust);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0;
}
.btn--ghost:hover { color: var(--rust-hover); }

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(239, 243, 238, 0.78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--pine);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.logo-mark svg { width: 17px; height: 17px; }

.logo-word {
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.nav-list {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0.3rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}

.nav-list a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 0.5rem 1.05rem;
    border-radius: var(--radius-pill);
    transition: color var(--ease-fast), background var(--ease-fast);
}

.nav-list a:hover { color: var(--ink); background: var(--paper); }

.nav-list a[aria-current="page"] {
    color: #fff;
    background: var(--pine);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--surface);
    border: 1px solid var(--line);
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background var(--ease-fast);
}

.hamburger:hover { background: var(--paper); }

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform var(--ease-fast), opacity var(--ease-fast);
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.mobile-nav.is-open { display: block; animation: dropIn var(--ease); }

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav ul { display: flex; flex-direction: column; padding: 1rem 1.75rem 1.5rem; gap: 0.25rem; }

.mobile-nav a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink-soft);
    border-radius: var(--radius-sm);
    transition: color var(--ease-fast), background var(--ease-fast);
}

.mobile-nav a:hover { color: var(--ink); background: var(--paper); }
.mobile-nav a[aria-current="page"] { color: var(--rust); }

/* ══════════════════════════════════════
   HERO — carousel
══════════════════════════════════════ */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--pine-deep);
    color: var(--paper);
}

.hero-track {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.03);
    transition: opacity 700ms var(--ease), transform 900ms var(--ease), visibility 0s 700ms;
    display: flex;
    align-items: center;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition: opacity 700ms var(--ease), transform 900ms var(--ease);
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-slide-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12,41,37,0.94) 8%, rgba(12,41,37,0.72) 42%, rgba(12,41,37,0.28) 75%),
        linear-gradient(0deg, rgba(12,41,37,0.5), transparent 40%);
}

.hero-slide-inner {
    position: relative;
    max-width: 640px;
    padding-block: 6rem;
}

.hero-slide .stamp { margin-bottom: 1.5rem; }

.hero-headline {
    font-family: var(--display);
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1.35rem;
    color: #FBF9F4;
}

.hero-desc {
    font-size: 1.06rem;
    line-height: 1.75;
    color: #C9D6D0;
    margin-bottom: 2.1rem;
    max-width: 52ch;
}

.hero-controls {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding-block: 6rem;
}

.hero-arrow {
    pointer-events: auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(249, 247, 242, 0.1);
    border: 1px solid rgba(249, 247, 242, 0.25);
    color: #FBF9F4;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background var(--ease-fast), transform var(--ease-fast), border-color var(--ease-fast);
}

.hero-arrow:hover { background: rgba(249, 247, 242, 0.2); border-color: rgba(249,247,242,0.5); transform: translateY(-1px); }

.hero-dots {
    pointer-events: auto;
    position: absolute;
    left: 50%;
    bottom: 2.75rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
}

.hero-dot {
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: rgba(249, 247, 242, 0.28);
    border: none;
    transition: background var(--ease-fast);
}

.hero-dot.is-active { background: var(--rust); }

.hero-progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: rgba(249,247,242,0.1);
}

.hero-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--rust);
}

.hero-progress-bar.is-animating { transition: width 6s linear; width: 100%; }

/* ══════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════ */
.site-main { padding: 5.5rem 0 6.5rem; }

.main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4.5rem;
    align-items: start;
}

/* ── Post list: the "route" ── */
.posts-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.posts-list::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 10px;
    bottom: 10px;
    width: 0;
    border-left: 2px dotted var(--ink-faint);
    opacity: 0.5;
}

.post-card {
    position: relative;
    display: grid;
    grid-template-columns: 224px 1fr;
    gap: 1.75rem;
    padding: 1.5rem;
    padding-left: 3.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: box-shadow var(--ease-fast), transform var(--ease-fast), border-color var(--ease-fast);
}

.post-card::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 2.1rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--rust);
    z-index: 1;
}

.post-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    border-color: var(--rust-dim);
}

.post-thumb {
    width: 224px;
    height: 152px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--paper);
    flex-shrink: 0;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms var(--ease);
}

.post-card:hover .post-thumb img { transform: scale(1.05); }

.post-meta { margin-bottom: 0.85rem; }

.post-title {
    font-family: var(--display);
    font-size: 1.32rem;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.post-title a { transition: color var(--ease-fast); }
.post-title a:hover { color: var(--rust); }

.post-excerpt {
    font-size: 0.91rem;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 1.1rem;
    max-width: 54ch;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rust);
    transition: gap var(--ease-fast);
}

.read-more:hover { gap: 0.65rem; }

/* ── Sidebar ── */
.sidebar { position: sticky; top: 106px; }

.sidebar-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-block:last-child { margin-bottom: 0; }

.sidebar-title {
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--ink);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.category-list a {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px dashed var(--ink-faint);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-pill);
    transition: color var(--ease-fast), background var(--ease-fast), border-color var(--ease-fast);
}

.category-list a:hover {
    color: var(--rust);
    background: var(--rust-dim);
    border-color: var(--rust);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
    background: var(--pine-deep);
    color: #A9BDB6;
    padding: 4rem 0 2.25rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: end;
    padding-bottom: 2.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1.75rem;
}

.footer-brand .logo-word { color: #FBF9F4; }
.footer-brand .logo-mark { background: var(--rust); }

.footer-brand p {
    font-size: 0.87rem;
    max-width: 320px;
    line-height: 1.7;
    margin-top: 0.85rem;
    color: #85998F;
}

.social-links { display: flex; gap: 0.65rem; align-items: center; }

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A9BDB6;
    background: rgba(255,255,255,0.03);
    transition: border-color var(--ease-fast), color var(--ease-fast), background var(--ease-fast), transform var(--ease-fast);
}

.social-link:hover {
    border-color: var(--rust);
    color: #FBF9F4;
    background: rgba(196,89,43,0.18);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-family: var(--mono);
    color: #5E7168;
}

.footer-nav { display: flex; gap: 1.75rem; }
.footer-nav a { color: #85998F; transition: color var(--ease-fast); }
.footer-nav a:hover { color: #FBF9F4; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 960px) {
    .hero-track { min-height: 560px; }
    .hero-slide-inner { padding-block: 4.5rem; }
    .hero-controls { padding-block: 4.5rem; }
}

@media (max-width: 860px) {
    .main-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .hamburger { display: flex; }
    .main-nav { display: none; }
    .hero-slide-inner { max-width: 100%; }
    .hero-slide-scrim {
        background:
            linear-gradient(0deg, rgba(12,41,37,0.96) 30%, rgba(12,41,37,0.55) 70%),
            linear-gradient(180deg, rgba(12,41,37,0.55), transparent 40%);
    }
}

@media (max-width: 600px) {
    .post-card {
        grid-template-columns: 1fr;
        padding-left: 1.5rem;
    }
    .post-card::before { display: none; }
    .posts-list::before { display: none; }
    .post-thumb { width: 100%; height: 200px; }

    .hero-track { min-height: 520px; }
    .hero-arrow { width: 40px; height: 40px; }
    .hero-headline { font-size: 1.85rem; }

    .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .hero-slide { transition: opacity 300ms linear !important; transform: none !important; }
}
