/* =============================================
   yuongching.com — Main Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=IBM+Plex+Sans:wght@300;400;500&family=IBM+Plex+Mono&display=swap');

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

:root {
  --blue:       #185FA5;
  --blue-light: #E6F1FB;
  --blue-mid:   #B5D4F4;
  --gray-100:   #F1EFE8;
  --gray-400:   #888780;
  --gray-200:   #B4B2A9;
  --gray-100b:  #D3D1C7;
  --red-light:  #FCEBEB;
  --red:        #A32D2D;
  --green-light:#EAF3DE;
  --green:      #3B6D11;
  --text:       #1a1a1a;
  --text-muted: #666;
  --text-faint: #999;
  --border:     rgba(0,0,0,0.1);
  --bg:         #f7f6f3;
  --surface:    #ffffff;
  --surface-2:  #f0ede8;
  --radius:     10px;
}

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

body {
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.nav {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.nav-logo span { color: var(--blue); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: 13px; color: var(--text-muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-lang { font-size: 11px; font-family: 'IBM Plex Mono', monospace; background: var(--surface-2); border: 0.5px solid var(--border); border-radius: 3px; padding: 2px 8px; color: var(--text-muted); }

.hero { background: var(--surface); border-bottom: 0.5px solid var(--border); padding: 2.5rem 2rem 2rem; }
.hero-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--blue); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.75rem; }
.hero-headline { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; color: var(--text); }

.section { padding: 1.75rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; border-bottom: 0.5px solid var(--border); padding-bottom: 0.6rem; }
.section-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--text); }
.section-mono { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--blue); letter-spacing: 0.06em; }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.article-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: border-color 0.15s, box-shadow 0.15s; }
.article-card:hover { border-color: rgba(0,0,0,0.2); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.article-card.featured { border-top: 2px solid var(--blue); grid-column: span 2; }
.article-card a { display: block; }
.article-lang { font-size: 10px; font-family: 'IBM Plex Mono', monospace; color: var(--text-faint); letter-spacing: 0.08em; margin-bottom: 6px; }
.article-headline { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); margin-bottom: 8px; }
.article-headline.large { font-size: 20px; }
.article-summary { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.article-meta { display: flex; align-items: center; gap: 8px; }
.article-date { font-size: 11px; font-family: 'IBM Plex Mono', monospace; color: var(--text-faint); }
.article-topic { font-size: 10px; padding: 2px 7px; border-radius: 3px; background: var(--blue-light); color: var(--blue); font-family: 'IBM Plex Mono', monospace; }

.article-page { max-width: 720px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }
.article-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 0.5px solid var(--border); }
.article-title { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; margin: 0.5rem 0 1rem; }
.article-byline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.article-author { font-size: 12px; color: var(--text-muted); }
.article-body p { font-size: 16px; line-height: 1.8; color: var(--text); margin-bottom: 1.25rem; }
.article-body p.lead { font-size: 18px; font-weight: 300; color: var(--text-muted); line-height: 1.7; margin-bottom: 2rem; }
.article-body h2 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; margin: 2rem 0 0.75rem; }

.chart-block { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.chart-title { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-muted); margin-bottom: 1rem; letter-spacing: 0.04em; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-name { font-size: 12px; color: var(--text-muted); width: 150px; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--surface-2); border-radius: 2px; height: 7px; overflow: hidden; }
.bar-fill { height: 7px; border-radius: 2px; background: var(--blue); }
.bar-fill--neutral { background: var(--gray-400); }
.bar-fill--light { background: var(--gray-200); }
.bar-fill--lighter { background: var(--gray-100b); }
.bar-val { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-muted); width: 34px; text-align: right; flex-shrink: 0; }
.kw-row { display: flex; gap: 6px; margin-top: 1rem; flex-wrap: wrap; }
.kw { font-size: 11px; font-family: 'IBM Plex Mono', monospace; padding: 3px 10px; border-radius: 3px; }
.kw--blue { background: var(--blue-light); color: var(--blue); }
.kw--red { background: var(--red-light); color: var(--red); }
.kw--green { background: var(--green-light); color: var(--green); }
.kw--gray { background: var(--gray-100); color: var(--gray-400); }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.about-bio p { font-size: 15px; line-height: 1.8; color: var(--text); margin-bottom: 1.1rem; }
.contact-link { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--blue); border-bottom: 1px solid var(--blue-mid); padding-bottom: 1px; }
.meta-block { margin-bottom: 1.25rem; }
.meta-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-faint); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.meta-val { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

.footer { background: var(--surface); border-top: 0.5px solid var(--border); padding: 1.25rem 2rem; display: flex; justify-content: space-between; align-items: center; margin-top: 3rem; }
.footer-brand { font-family: 'Playfair Display', serif; font-size: 14px; color: var(--text); }
.footer-mono { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-faint); }

@media (max-width: 640px) {
  .hero-headline { font-size: 26px; }
  .article-card.featured { grid-column: span 1; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .nav { padding: 0 1rem; }
  .section, .article-page { padding-left: 1rem; padding-right: 1rem; }
}
