/*
Theme Name: CodeChoVui Substack Paper
Theme URI: https://blog.codechovui.dev
Author: CodeChoVui
Author URI: https://codechovui.dev
Description: Theme WordPress phong cách Substack, hiệu ứng giấy pastel, phông chữ Georgia dành cho blog cá nhân & công nghệ codechovui.dev.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: codechovui
Tags: blog, personal, technology, substack, paper, pastel, georgia, vietnamese
*/

/* Core Theme Custom Properties */
:root {
  /* Paper Palette */
  --bg-paper: #FAF8F5;
  --bg-paper-pattern: radial-gradient(rgba(30, 25, 20, 0.035) 1px, transparent 1px);
  --bg-card: #FFFFFF;
  --bg-card-alt: #F6F3EC;
  --bg-input: #F3EFE7;

  /* Text / Charcoal */
  --text-primary: #1F1E1D;
  --text-secondary: #5A5651;
  --text-muted: #8E877D;

  /* Borders */
  --border-paper: #ECE7DE;
  --border-paper-strong: #DDD6C9;

  /* Pastel Accent Colors */
  --accent-amber: #D97706;
  --accent-amber-bg: #FEF3C7;
  --accent-sage: #059669;
  --accent-sage-bg: #D1FAE5;
  --accent-terracotta: #C2410C;
  --accent-terracotta-bg: #FFEDD5;
  --accent-blue: #0284C7;
  --accent-blue-bg: #E0F2FE;

  /* Typography */
  --font-serif: "Newsreader", "Lora", "Merriweather", "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, Monaco, monospace;

  /* Dimensions & Layout */
  --container-max-width: 1200px;
  --reading-max-width: 1060px;
  --reading-wide-width: 1060px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-paper: 0 2px 10px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
}

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

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

body {
  background-color: var(--bg-paper);
  background-image: var(--bg-paper-pattern);
  background-size: 28px 28px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-paper-strong);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

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

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

/* Accessibility screen-reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}