:root {
    --crimson:      #C0392B;
    --crimson-deep: #922B21;
    --crimson-light:#E74C3C;
    --scarlet:      #E53E3E;
    --amber:        #F6C90E;
    --amber-deep:   #D4A017;
    --amber-pale:   #FFFBEA;
    --saffron:      #F59E0B;
    --coral:        #F97316;
    --bg-base:      #FFFDF7;
    --bg-surface:   #FFF8EE;
    --bg-deep:      #1A0A00;
    --card-bg:      #FFFDF7;
    --card-border:  #F0E2C8;
    --ink:          #1A0A00;
    --ink-2:        #3D1A0A;
    --ink-3:        #7A4A35;
    --ink-4:        #B07A60;
    --line:         rgba(192,57,43,0.13);
    --shadow-sm:    0 2px 12px rgba(192,57,43,0.07);
    --shadow-md:    0 8px 32px rgba(192,57,43,0.12);
    --shadow-lg:    0 20px 60px rgba(192,57,43,0.16);
    --radius:       8px;
    --radius-lg:    14px;
    --radius-xl:    22px;
    --ease: cubic-bezier(.4,0,.2,1);
    --nav-h: 68px;
    --section-y:    clamp(56px, 8vw, 96px);
    --section-x:    clamp(16px, 5%, 64px);
    --content-max:  1140px;
    --gap:          clamp(28px, 5vw, 60px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-base);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 200px; pointer-events: none;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--crimson); border-radius: 3px; }

/* ── NAVBAR ── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 999;
    height: var(--nav-h);
    background: rgba(255,253,247,0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--section-x);
    border-bottom: 2px solid var(--amber);
    box-shadow: 0 2px 14px rgba(192,57,43,0.06);
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; flex-shrink: 0;
}
.nav-brand img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 900; color: var(--crimson);
    letter-spacing: 0.01em; white-space: nowrap; line-height: 1;
}
.nav-logo em { font-style: italic; color: var(--amber-deep); }
.nav-center {
    display: flex; align-items: center;
    gap: clamp(0.8rem, 2vw, 1.8rem);
    list-style: none;
}
.nav-center a {
    color: var(--ink-3); text-decoration: none;
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    transition: color 0.2s var(--ease);
    white-space: nowrap; position: relative; padding-bottom: 3px;
}
.nav-center a::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 0; height: 2px; background: var(--crimson);
    border-radius: 2px; transition: width 0.2s var(--ease);
}
.nav-center a:hover, .nav-center a.active { color: var(--crimson); }
.nav-center a:hover::after, .nav-center a.active::after { width: 100%; }
.nav-cta {
    background: linear-gradient(135deg, var(--crimson), var(--scarlet));
    color: #fff; padding: 9px 22px; border-radius: 40px;
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
    text-decoration: none; border: none; flex-shrink: 0;
    box-shadow: 0 3px 14px rgba(192,57,43,0.26);
    transition: all 0.2s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 7px 22px rgba(192,57,43,0.36); filter: brightness(1.06); }
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 6px; flex-shrink: 0;
}
.hamburger span {
    display: block; width: 24px; height: 2px;
    background: var(--crimson); border-radius: 2px; transition: all 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-nav {
    display: none; position: fixed;
    top: var(--nav-h); left: 0; right: 0; z-index: 998;
    background: rgba(255,253,247,0.98);
    backdrop-filter: blur(18px);
    padding: 8px var(--section-x) 16px;
    border-bottom: 2px solid var(--amber);
    flex-direction: column; gap: 0;
    box-shadow: 0 8px 24px rgba(192,57,43,0.1);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: var(--ink-2); text-decoration: none;
    font-size: 0.85rem; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 13px 0; border-bottom: 1px solid var(--line);
    transition: color 0.2s, padding-left 0.2s;
}
.mobile-nav a:last-child {
    border-bottom: none; color: #fff;
    background: linear-gradient(135deg, var(--crimson), var(--scarlet));
    margin-top: 10px; padding: 11px 18px; border-radius: 40px;
    text-align: center; letter-spacing: 0.07em;
}
.mobile-nav a:not(:last-child):hover { color: var(--crimson); padding-left: 4px; }

/* ── PAGE HERO ── */
.page-hero {
    padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 72px));
    padding-bottom: clamp(40px, 6vw, 64px);
    padding-left: var(--section-x); padding-right: var(--section-x);
    background: linear-gradient(150deg, var(--bg-deep) 0%, #3D1A0A 100%);
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; top: -60px; right: -60px;
    width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(246,201,14,0.07) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero-inner { max-width: var(--content-max); margin: 0 auto; }
.page-hero .section-label { display: inline-flex; align-items: center; gap: 10px; font-size: 0.67rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-bottom: 0.75rem; }
.page-hero .section-label::before { content: ''; width: 16px; height: 2px; background: linear-gradient(90deg, var(--amber), transparent); flex-shrink: 0; }
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; color: #fff; line-height: 1.08; margin-bottom: 0.9rem; }
.page-hero h1 em { font-style: italic; color: var(--amber); }
.page-hero p { color: rgba(255,253,247,0.55); font-size: clamp(0.86rem, 1.4vw, 1rem); line-height: 1.75; max-width: 520px; font-weight: 300; }

/* ── RULE ── */
.rule-gradient { height: 3px; background: linear-gradient(90deg, transparent, var(--crimson), var(--amber), transparent); }

/* ── MAIN CONTENT ── */
.articles-section { padding: var(--section-y) var(--section-x); }
.container { max-width: var(--content-max); margin: 0 auto; }

/* ── SEARCH + FILTER BAR ── */
.search-bar-wrap {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px);
}
.search-input-wrap {
    flex: 1; min-width: 220px;
    position: relative;
}
.search-input-wrap svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--ink-4); pointer-events: none;
}
.search-input {
    width: 100%; padding: 11px 14px 11px 42px;
    background: var(--card-bg); border: 1.5px solid var(--card-border);
    border-radius: 40px; font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem; color: var(--ink); outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s;
}
.search-input:focus { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(192,57,43,0.08); }
.search-input::placeholder { color: var(--ink-4); }
.sort-select {
    padding: 11px 36px 11px 14px;
    background: var(--card-bg); border: 1.5px solid var(--card-border);
    border-radius: 40px; font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem; color: var(--ink-2); outline: none; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A4A35' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    transition: border-color 0.2s var(--ease);
}
.sort-select:focus { border-color: var(--crimson); }
.search-count { font-size: 0.78rem; color: var(--ink-4); font-weight: 500; white-space: nowrap; }

/* ── ARTICLES GRID ── */
.articles-masonry {
    columns: 3 280px; column-gap: 22px;
}
@media (max-width: 700px) { .articles-masonry { columns: 1; } }
@media (min-width: 701px) and (max-width: 960px) { .articles-masonry { columns: 2 260px; } }

.article-card {
    break-inside: avoid;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
    animation: cardIn 0.45s var(--ease) both;
    margin-bottom: 22px; cursor: pointer;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.article-img-wrap {
    overflow: hidden; background: linear-gradient(135deg, #F0E2C8, #FAE6D0);
    position: relative; height: 200px;
}
.article-img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.55s var(--ease); display: block;
}
.article-card:hover .article-img-wrap img { transform: scale(1.07); }
.article-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: #E8D5A3;
}

.article-card-body { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.article-date { font-size: 0.68rem; color: var(--ink-4); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.article-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(0.98rem, 2vw, 1.08rem); font-weight: 900;
    color: var(--ink); line-height: 1.2;
}
.article-excerpt {
    font-size: 0.81rem; color: var(--ink-3); line-height: 1.65; font-weight: 300;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-read-more {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.74rem; font-weight: 700; color: var(--crimson);
    margin-top: 4px; letter-spacing: 0.05em;
}
.article-read-more svg { width: 12px; height: 12px; transition: transform 0.2s; }
.article-card:hover .article-read-more svg { transform: translateX(3px); }

/* ── SKELETON ── */
.skeleton-masonry { columns: 3 280px; column-gap: 22px; }
@media (max-width: 700px) { .skeleton-masonry { columns: 1; } }
.skeleton-card { break-inside: avoid; background: var(--card-bg); border-radius: var(--radius-lg); border: 1px solid var(--card-border); overflow: hidden; margin-bottom: 22px; }
.skeleton-img { height: 200px; background: linear-gradient(90deg, #F0E2C8 25%, #F8EDDA 50%, #F0E2C8 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-body { padding: 18px 20px; }
.skeleton-line { height: 11px; border-radius: 6px; background: linear-gradient(90deg, #F0E2C8 25%, #F8EDDA 50%, #F0E2C8 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; margin-bottom: 9px; }
.skeleton-line.short { width: 55%; } .skeleton-line.tall { height: 40px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 80px 20px; color: var(--ink-3); }
.empty-state p { font-size: 0.9rem; line-height: 1.7; }

/* ── ARTICLE DETAIL MODAL ── */
.modal-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(26,10,0,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--card-bg); border-radius: var(--radius-xl);
    width: 100%; max-width: 680px;
    box-shadow: 0 40px 90px rgba(26,10,0,0.5);
    position: relative; animation: modalIn 0.3s var(--ease) both;
    max-height: 92vh; overflow: hidden; display: flex; flex-direction: column;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.93) translateY(18px); } to { opacity:1; transform: scale(1) translateY(0); } }
.modal-img { width: 100%; height: clamp(180px, 28vw, 260px); object-fit: cover; display: block; flex-shrink: 0; }
.modal-img-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, #F0E2C8, #FAE6D0); display: flex; align-items: center; justify-content: center; font-size: 4rem; color: #E8D5A3; flex-shrink: 0; }
.modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 10;
    background: rgba(255,253,247,0.92); backdrop-filter: blur(8px);
    border: none; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; cursor: pointer; color: var(--ink);
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(26,10,0,0.15);
}
.modal-close:hover { background: var(--crimson); color: #fff; }
.modal-body { padding: clamp(18px, 4vw, 32px); overflow-y: auto; flex: 1; }
.modal-date { font-size: 0.68rem; color: var(--ink-4); font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 8px; }
.modal-title { font-family: 'Playfair Display', serif; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 900; color: var(--ink); line-height: 1.15; margin-bottom: 18px; }
.modal-divider { height: 2px; background: linear-gradient(90deg, var(--crimson), var(--amber), transparent); margin-bottom: 18px; }
.modal-content { font-size: 0.93rem; color: var(--ink-2); line-height: 1.85; font-weight: 300; }
.modal-content p { margin-bottom: 1rem; }
.modal-content b, .modal-content strong { color: var(--ink); font-weight: 600; }
.modal-content i, .modal-content em { font-style: italic; }
.modal-content h2, .modal-content h3 { font-family: 'Playfair Display', serif; color: var(--ink); font-weight: 900; margin: 1.2rem 0 0.6rem; }
.modal-content a { color: var(--crimson); }

/* ── FOOTER ── */
footer { background: var(--bg-deep); color: rgba(255,253,247,0.42); padding: clamp(34px,5vw,50px) var(--section-x); border-top: 3px solid var(--amber); }
.footer-inner { max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: clamp(26px,4vw,46px); }
.footer-brand .nav-logo { display: block; margin-bottom: 11px; font-size: 1.15rem; }
.footer-brand p { font-size: 0.8rem; line-height: 1.7; font-weight: 300; max-width: 275px; }
.footer-col h4 { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--amber); margin-bottom: 13px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-links a { color: rgba(255,253,247,0.4); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--amber); }
.footer-bottom { max-width: var(--content-max); margin: 30px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,253,247,0.06); display: flex; align-items: center; justify-content: space-between; font-size: 0.74rem; flex-wrap: wrap; gap: 8px; }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
    .nav-center, .nav-cta { display: none; }
    .hamburger { display: flex; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; gap: 26px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .search-bar-wrap { flex-direction: column; align-items: stretch; }
    .sort-select { width: 100%; }
}
