/* =========================================================
   The Same Facts - Public stylesheet
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #fbf7f4;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #ececec;
  --primary: #e0457b;       /* warm pink */
  --primary-dark: #b8345f;
  --accent: #f5a623;
  --shadow: 0 6px 24px rgba(0,0,0,.06);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
html[data-theme="dark"] {
  --bg: #14151a;
  --bg-soft: #1c1e25;
  --surface: #1c1e25;
  --text: #f1f1f1;
  --muted: #9aa0a6;
  --border: #2a2d35;
  --primary: #ff7aa8;
  --primary-dark: #e0457b;
  --accent: #ffc875;
  --shadow: 0 6px 24px rgba(0,0,0,.4);
}
html[data-theme="sepia"] {
  --bg: #f5ecd9;
  --bg-soft: #efe4cb;
  --surface: #fbf3df;
  --text: #3a2f1d;
  --muted: #7d6b4d;
  --border: #e2d3b1;
  --primary: #a3522b;
  --primary-dark: #7a3c1f;
  --accent: #b07a2e;
  --shadow: 0 6px 24px rgba(80,50,10,.1);
}

*,*::before,*::after { box-sizing: border-box; }
html,body { margin:0; padding:0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex: 0 0 auto;
}
.icon-meta {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}
.icon-meta span,
.icon-line {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width:min(1200px, 92%); margin: 0 auto; }
.muted { color: var(--muted); }
.button, button.btn {
  display:inline-block; padding: .8em 1.4em; border-radius: 999px;
  background: var(--primary); color:#fff; border:none; cursor:pointer;
  font-weight: 600; font-family: var(--font-body); font-size: .95rem;
  transition: transform .15s, background .15s, box-shadow .15s;
  text-decoration: none;
}
.button:hover, button.btn:hover { background: var(--primary-dark); transform: translateY(-1px); color:#fff; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.button.ghost:hover { background: var(--bg-soft); color: var(--text); }

/* HEADER */
.site-header {
  position: sticky; top:0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display:flex; align-items:center; justify-content:space-between;
  gap: 1rem; padding: .9rem 0;
}
.brand { display:flex; align-items:center; gap:.6rem; font-weight:700; font-size: 1.15rem; color: var(--text); }
.brand-mark {
  display:inline-flex; align-items:center; justify-content:center;
  width: 42px; height:36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color:#fff; font-family: var(--font-display); font-weight:900; font-size: .86rem;
  letter-spacing: 0;
}
.brand-text { font-family: var(--font-display); font-weight: 700; }
.main-nav .nav-list {
  list-style:none; display:flex; gap: 1.6rem; margin:0; padding:0;
}
.main-nav a { color: var(--text); font-weight: 500; }
.main-nav a:hover { color: var(--primary); }
.has-dropdown { position: relative; }
.dropdown {
  position:absolute; top:100%; left:0; min-width: 200px;
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius-sm); padding: .4rem 0; margin: .3rem 0 0;
  list-style:none; box-shadow: var(--shadow);
  opacity:0; visibility:hidden; transform: translateY(6px);
  transition: all .15s;
}
.dropdown li a { display:block; padding: .5rem 1rem; }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity:1; visibility:visible; transform: translateY(0); }
.header-actions { display:flex; align-items:center; gap: .6rem; }
.search-mini { display:flex; }
.search-mini input {
  border:1px solid var(--border); background: var(--bg-soft); color: var(--text);
  padding: .45rem .7rem; border-radius: 999px 0 0 999px; min-width: 0; width: 140px;
  outline: none;
}
.search-mini input:focus { border-color: var(--primary); }
.search-mini button {
  border:1px solid var(--border); border-left: none; background: var(--bg-soft);
  padding: 0 .8rem; border-radius: 0 999px 999px 0; cursor:pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-mini button .icon { width: 1rem; height: 1rem; }
.theme-toggle {
  background: var(--bg-soft); border:1px solid var(--border); border-radius:999px;
  width: 38px; height:38px; cursor:pointer; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle .icon { width: 1.05rem; height: 1.05rem; }
.nav-toggle, .nav-toggle-input { display:none; }

/* HERO */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
  background: radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--primary) 15%, transparent), transparent 60%),
              linear-gradient(180deg, var(--bg-soft), var(--bg));
  text-align:center;
}
.hero h1 { max-width: 22ch; margin: 0 auto .5em; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; margin: 0 auto 1.5em; }
.hero-cta { display:flex; gap: .8rem; justify-content:center; flex-wrap: wrap; }

/* GRID */
.section { padding: clamp(2rem, 5vw, 4rem) 0; }
.section-title { display:flex; align-items:end; justify-content: space-between; gap:1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.section-title h2 { margin: 0; }

.card-grid {
  display:grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.post-card {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); overflow:hidden;
  display:flex; flex-direction:column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.post-card .thumb {
  aspect-ratio: 16/10; overflow:hidden; background: var(--bg-soft);
}
.post-card .thumb img { width:100%; height:100%; object-fit:cover; transition: transform .4s; }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .body { padding: 1.1rem 1.2rem 1.3rem; display:flex; flex-direction:column; gap:.5rem; flex:1; }
.post-card .cat {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary); font-weight:600;
}
.post-card h3 { margin: 0; font-size: 1.2rem; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--primary); }
.post-card .meta { color: var(--muted); font-size: .85rem; margin-top:auto; }

/* FEATURED big */
.featured-row {
  display:grid; gap: 1.5rem;
  grid-template-columns: 2fr 1fr;
}
.featured-row .post-card.large .thumb { aspect-ratio: 16/9; }
.featured-row .post-card.large h3 { font-size: 1.7rem; }
.featured-stack { display:flex; flex-direction:column; gap: 1rem; }
.featured-stack .post-card { flex-direction: row; }
.featured-stack .thumb { width: 140px; flex-shrink:0; aspect-ratio: 1/1; }
.featured-stack .body { padding: .8rem 1rem; }
.featured-stack h3 { font-size: 1rem; }
@media (max-width: 800px){
  .featured-row { grid-template-columns: 1fr; }
}

/* SINGLE POST */
.post-hero {
  padding: clamp(2rem, 5vw, 4rem) 0 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.post-hero .container { max-width: 820px; }
.post-hero .crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.post-hero h1 { margin-bottom: .4em; }
.post-hero .meta { color: var(--muted); font-size: .9rem; display:flex; gap:1rem; flex-wrap:wrap; }
.post-hero .meta .cat-pill {
  background: var(--primary); color:#fff; padding: .15rem .7rem; border-radius:999px; font-weight:600; font-size: .75rem;
}
.post-cover {
  width: min(1100px, 92%); margin: -1rem auto 2rem;
  aspect-ratio: 16/8; border-radius: var(--radius); overflow:hidden;
  box-shadow: var(--shadow);
}
.post-cover img { width:100%; height:100%; object-fit:cover; }
.post-content {
  max-width: 720px; margin: 0 auto; padding: 0 4%;
  font-size: 1.08rem;
}
.post-content h2 { margin-top: 2em; }
.post-content h3 { margin-top: 1.6em; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: .4rem 0 .4rem 1.2rem; margin: 1.5em 0;
  color: var(--text); font-style: italic; background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li { margin-bottom: .4em; }
.post-content img { border-radius: var(--radius-sm); margin: 1.2em 0; }
.post-tags { display:flex; flex-wrap:wrap; gap:.4rem; margin: 1.5rem 0; }
.tag-chip {
  background: var(--bg-soft); border:1px solid var(--border); padding: .25rem .7rem;
  border-radius:999px; font-size:.8rem; color: var(--muted);
}
.share-row {
  display:flex; gap:.5rem; margin: 1rem 0 2rem;
}
.share-row a {
  display:inline-flex; align-items:center; gap:.3rem; padding: .45rem .9rem;
  background: var(--bg-soft); border:1px solid var(--border);
  color: var(--text); border-radius:999px; font-size:.85rem;
}
.share-row a .icon { width: .95rem; height: .95rem; }
.share-row a:hover { background: var(--primary); color:#fff; border-color: var(--primary); }

/* COMMENTS */
.comments { max-width: 720px; margin: 2rem auto; padding: 0 4%; }
.comment {
  background: var(--surface); border:1px solid var(--border);
  padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: .8rem;
}
.comment .who { font-weight:600; }
.comment .when { color: var(--muted); font-size:.8rem; margin-left:.5rem; }

/* FORMS */
.form-row { margin-bottom: 1rem; display:flex; flex-direction:column; gap:.3rem; }
.form-row label { font-weight: 600; font-size:.9rem; }
input[type="text"], input[type="email"], input[type="search"], input[type="password"],
input[type="url"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%; padding: .7rem .9rem; border-radius: var(--radius-sm);
  border:1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font: inherit; outline: none; transition: border-color .15s;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.spam-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* PAGINATION */
.pagination { display:flex; gap:.4rem; justify-content:center; margin: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: .5rem .9rem; border-radius: var(--radius-sm);
  border:1px solid var(--border); color: var(--text); background: var(--surface);
}
.pagination .current { background: var(--primary); color:#fff; border-color: var(--primary); }

/* FOOTER */
.site-footer { background: var(--bg-soft); border-top:1px solid var(--border); margin-top: 4rem; padding: 3rem 0 1rem; }
.footer-grid {
  display:grid; gap: 2rem; grid-template-columns: 2fr 1fr 1fr 2fr;
}
.footer-grid h4 { font-family: var(--font-display); margin-bottom: .8rem; }
.link-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.4rem; }
.link-list a { color: var(--text); }
.link-list a:hover { color: var(--primary); }
.newsletter { display:flex; gap:.4rem; }
.newsletter input { flex:1; }
.newsletter button {
  background: var(--primary); color:#fff; border:none; padding: 0 1rem;
  border-radius: var(--radius-sm); cursor:pointer; font-weight:600;
}
.footer-bottom {
  display:flex; justify-content:space-between; padding-top: 1.5rem; margin-top: 2rem;
  border-top:1px solid var(--border); color: var(--muted);
}
.footer-bottom a { color: var(--muted); }

/* NOTICES */
.notice { padding: .8rem 1.1rem; border-radius: var(--radius-sm); margin: 1rem 0; border:1px solid var(--border); }
.notice.success { background: #e6f7ec; color:#1f7a3c; border-color: #b9e6c5; }
.notice.error   { background: #fce8ea; color:#a02230; border-color: #f3bfc4; }
html[data-theme="dark"] .notice.success { background:#0f3522; color:#9be7b3; border-color:#1a5538; }
html[data-theme="dark"] .notice.error   { background:#3a1218; color:#f4a8b1; border-color:#5e1e26; }

/* RESPONSIVE NAV */
@media (max-width: 800px) {
  .nav-toggle { display:flex; flex-direction:column; gap:4px; cursor:pointer; padding:8px; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
  .nav-list {
    position: absolute; top:100%; left:0; right:0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; gap:0 !important; padding: .5rem 0;
    display:none;
  }
  .nav-toggle-input:checked ~ .nav-list { display: flex; }
  .nav-list li { padding: 0 1.2rem; }
  .nav-list li a { display:block; padding: .7rem 0; }
  .dropdown { position: static; box-shadow:none; border:none; padding:0; opacity:1; visibility:visible; transform:none; }
  .dropdown li a { padding: .4rem 0 .4rem 1rem; font-size:.95rem; }
  .header-actions .search-mini { display:none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .featured-stack .post-card { flex-direction: column; }
  .featured-stack .thumb { width: 100%; aspect-ratio: 16/10; }
}

/* CONTACT */
.contact-grid {
  display:grid; gap: 2rem; grid-template-columns: 1.2fr 1fr; align-items: start;
}
.info-card {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem;
}
.info-card h3 { margin-top: 0; }
@media (max-width: 800px){ .contact-grid { grid-template-columns: 1fr; } }

/* ABOUT */
.about-hero { display:grid; gap: 2rem; grid-template-columns: 1fr 1fr; align-items:center; }
.about-hero img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 800px){ .about-hero { grid-template-columns: 1fr; } }
.feature-row { display:grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 2rem; }
.feature {
  background: var(--surface); border:1px solid var(--border); padding: 1.2rem; border-radius: var(--radius);
}
.feature-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .7rem;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.feature-icon .icon { width: 1.2rem; height: 1.2rem; }
