/* css/style.css */

/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #FAF7F2;
  --bg-card: #FFFFFF;
  --bg-soft: #F2EDE5;
  --text: #1A1815;
  --text-muted: #6B6560;
  --accent: #D97757;
  --accent-dark: #B85A3D;
  --accent-soft: #F5E3D7;
  --border: #E8E1D8;
  --shadow: 0 2px 8px rgba(45, 42, 38, 0.06);
  --shadow-lg: 0 8px 32px rgba(45, 42, 38, 0.10);
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1100px;
  --reading: 720px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color .15s ease;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 2.4rem; margin-bottom: .8rem; }
h3 { font-size: 1.15rem; margin-top: 1.6rem; margin-bottom: .5rem; }

p {
  margin-bottom: 1rem;
  font-size: 17px;
}

p + p {
  margin-top: 0;
}

ul, ol {
  margin: 0 0 1rem 1.2rem;
}

li {
  margin-bottom: .35rem;
}

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

main {
  flex: 1;
}

/* Top notice bar */
.notice-bar {
  background: var(--text);
  color: #F8EDE3;
  font-size: 14px;
  text-align: center;
  padding: 8px 16px;
}

.notice-bar a {
  color: #FFC9A8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice-bar a:hover {
  color: #FFE0CB;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--accent);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 600;
}

.lang-switch a {
  padding: 6px 12px;
  color: var(--text-muted);
}

.lang-switch a.active {
  background: var(--text);
  color: #F8EDE3;
}

.menu-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    background: var(--bg-card);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    margin: 0;
  }
  .nav-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
  }
  .nav-links a:hover {
    background: var(--bg-soft);
  }
  .menu-toggle {
    display: inline-flex;
  }
  .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hero (home) */
.hero {
  padding: 64px 0 40px;
  text-align: left;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  max-width: 640px;
  font-size: 19px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: #F8EDE3;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
}

.hero-cta:hover {
  background: var(--accent-dark);
  color: #fff;
}

.hero-shape {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-top: 28px;
}

/* Section */
section.block {
  padding: 32px 0 16px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
}

.section-head .tag {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-dark);
}

/* Card grid */
.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-soft);
  color: var(--text);
}

.card .emoji {
  font-size: 34px;
  line-height: 1;
}

.card h3 {
  margin: 0;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.card .more {
  margin-top: 8px;
  font-size: 14px;
  color: var(--accent-dark);
  font-weight: 600;
}

/* Article hero */
.article-hero {
  padding: 56px 0 12px;
}

.bigemoji {
  font-size: 84px;
  line-height: 1;
  display: inline-block;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 14px rgba(217, 119, 87, 0.25));
}

.article-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 14px;
}

.article-hero .lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 720px;
}

.crumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.crumbs a {
  color: var(--text-muted);
}

.crumbs a:hover {
  color: var(--accent);
}

/* Article body */
.article-body {
  max-width: var(--reading);
  margin: 0 auto;
  padding: 8px 0 40px;
}

.article-body img.figure {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 18px 0;
  background: var(--bg-soft);
}

.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 16px;
  color: var(--text);
}

.kicker {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-dark);
  margin-bottom: 6px;
  display: block;
}

/* Author chip */
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  font-size: 14px;
  color: var(--text);
}

.author-chip .avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.author-chip a {
  color: var(--accent-dark);
  font-weight: 600;
}

/* Author block (full) */
.author-block {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 36px 0 0;
}

.author-block .avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
}

.author-block h4 {
  margin: 0 0 4px;
  font-size: 17px;
}

.author-block p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 15px;
}

.author-block a.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: #F8EDE3;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.author-block a.btn-link:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* Related */
.related {
  margin-top: 36px;
}

.related h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

/* Footer */
.site-footer {
  background: var(--text);
  color: #C9C0B5;
  padding: 40px 0 24px;
  margin-top: 60px;
}

.site-footer .wrap {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.2fr 1fr 1fr;
}

@media (max-width: 720px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }
}

.site-footer h5 {
  color: #F8EDE3;
  font-size: 14px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer a {
  color: #DCD2C5;
  display: block;
  padding: 4px 0;
  font-size: 15px;
}

.site-footer a:hover {
  color: #FFC9A8;
}

.foot-bottom {
  border-top: 1px solid #3A3530;
  margin-top: 26px;
  padding-top: 16px;
  font-size: 13px;
  color: #9A8F82;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.foot-bottom a {
  display: inline;
  padding: 0;
}

/* Tag pills */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}

.pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
}

/* Decorative shapes */
.shape-grid {
  position: relative;
}

.shape-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(217,119,87,0.10) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .35;
  z-index: -1;
  border-radius: var(--radius-lg);
}

/* Topic landing band */
.band {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 18px 0;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  p { font-size: 16px; }
  .hero { padding: 40px 0 24px; }
  .article-hero { padding: 36px 0 8px; }
  .bigemoji { font-size: 64px; }
  .author-block { flex-direction: column; }
}

/* Focus ring for a11y */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print friendly */
@media print {
  .site-header, .site-footer, .notice-bar { display: none; }
  body { background: #fff; }
}
