/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=JetBrains+Mono:wght@400&display=swap');

html {scroll-behavior: smooth;}
html, body {overflow-x:hidden;}
a {display: inline-block; text-align: center;}

:root {
  --bg: #FAF7F2;
  --bg-alt: #F0EBE3;
  --text: #1C1917;
  --text-muted: #57534E;
  --accent: #C2410C;
  --accent-light: #EA580C;
  --accent-bg: #FFF7ED;
  --border: #D6D3D1;
  --border-light: #E7E5E4;
  --heading: #0C0A09;
  --pull-quote: #292524;
  --tag-bg: #FEFCE8;
  --tag-text: #854D0E;
  --nav-bg: rgba(250,247,242,0.95);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.04);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1140px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(1rem, 1.05vw, 1.125rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem var(--gutter);
}
.site-nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}
.site-logo {
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.6rem;
  color: var(--heading); text-decoration: none;
  letter-spacing: -0.03em;
}
.site-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.nav-links a {
  font-size: 0.85rem; text-decoration: none;
  color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

.hero-section {
  padding: 4rem 0 2rem;
  border-bottom: 3px double var(--border);
}
.hero-tag {
  display: inline-block;
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0.3rem 0.8rem; border-radius: 2px;
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900; line-height: 1.12;
  color: var(--heading);
  max-width: 800px;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-meta {
  display: flex; align-items: center; gap: 1.5rem;
  font-size: 0.85rem; color: var(--text-muted);
  flex-wrap: wrap;
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }

.breadcrumb {
  font-size: 0.8rem; color: var(--text-muted);
  padding: 1.2rem 0 0;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.4; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  padding: 2.5rem 0 3rem;
  align-items: start;
}
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700; color: var(--heading);
  margin: 2.5rem 0 0.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  letter-spacing: -0.01em;
}
.article-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  color: var(--heading); margin: 1.8rem 0 0.5rem;
}

.article-body p { margin-bottom: 1.2rem; }

.article-body img {
  width: 100%; height: auto; border-radius: 4px;
  margin: 1.5rem 0;
  box-shadow: var(--card-shadow);
}

.pull-quote {
  margin: 2rem 0; padding: 1.5rem 2rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-bg);
  font-family: var(--font-display);
  font-style: italic; font-size: 1.2rem;
  line-height: 1.5; color: var(--pull-quote);
  position: relative;
}
.pull-quote::before {
  content: '\201C'; font-size: 4rem;
  position: absolute; top: -0.5rem; left: 0.5rem;
  color: var(--accent); opacity: 0.25;
  font-family: var(--font-display);
  line-height: 1;
}

.toc-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
}
.toc-box h4 {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.8rem; color: var(--heading);
}
.toc-box ol {
  list-style: none; counter-reset: toc;
  padding: 0;
}
.toc-box li {
  counter-increment: toc;
  margin-bottom: 0.4rem;
}
.toc-box li::before {
  content: counter(toc, decimal-leading-zero) ' ';
  font-family: var(--font-mono);
  font-size: 0.75rem; color: var(--accent);
  margin-right: 0.3rem;
}
.toc-box a {
  text-decoration: none; color: var(--text);
  font-size: 0.9rem; text-align: left;
  transition: color var(--transition);
}
.toc-box a:hover { color: var(--accent); }

.reading-widget {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent-bg);
  border: 1px solid #FDBA74;
  border-radius: 3px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem; font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
}
.reading-widget svg { width: 16px; height: 16px; }

.sidebar { position: sticky; top: 5rem; }

.sidebar-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1.3rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--card-shadow);
}
.sidebar-card h4 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  margin-bottom: 0.8rem; color: var(--heading);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}
.sidebar-card p {
  font-size: 0.88rem; color: var(--text-muted);
  line-height: 1.6;
}
.sidebar-card a {
  text-align: left;
}

.author-box {
  display: flex; align-items: center; gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #F97316);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900;
  color: #fff; font-size: 1.1rem; flex-shrink: 0;
}
.author-name {
  font-weight: 700; font-size: 0.95rem; color: var(--heading);
}
.author-role { font-size: 0.78rem; color: var(--text-muted); }

.quiz-section {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2rem;
  margin: 2.5rem 0;
}
.quiz-section h3 {
  font-family: var(--font-display);
  font-size: 1.3rem; margin-bottom: 1rem;
}
.quiz-option {
  display: block; width: 100%;
  background: #fff; border: 1px solid var(--border);
  border-radius: 3px; padding: 0.8rem 1.2rem;
  margin-bottom: 0.5rem;
  cursor: pointer; text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem; color: var(--text);
  transition: all var(--transition);
}
.quiz-option:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}
.quiz-result {
  margin-top: 1rem; padding: 1rem;
  background: #fff; border-radius: 3px;
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  display: none;
}

.read-also {
  margin: 2.5rem 0;
  padding-top: 2rem;
  border-top: 3px double var(--border);
}
.read-also h3 {
  font-family: var(--font-display);
  font-size: 1.3rem; margin-bottom: 1.2rem;
}
.read-also-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.read-also-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}
.read-also-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.read-also-card h4 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  margin-bottom: 0.4rem; color: var(--heading);
  text-align: left;
}
.read-also-card p {
  font-size: 0.82rem; color: var(--text-muted);
  text-align: left;
}

.subscribe-section {
  background: var(--heading);
  color: #fff;
  padding: 2.5rem;
  border-radius: 4px;
  margin: 2.5rem 0;
  text-align: center;
}
.subscribe-section h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; margin-bottom: 0.5rem;
}
.subscribe-section p {
  font-size: 0.9rem; opacity: 0.8;
  margin-bottom: 1.5rem;
}
.subscribe-form {
  display: flex; gap: 0.5rem;
  max-width: 440px; margin: 0 auto;
  flex-wrap: wrap; justify-content: center;
}
.subscribe-form input[type="email"] {
  flex: 1; min-width: 200px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  color: #fff; font-family: var(--font-body);
  font-size: 0.95rem;
}
.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.subscribe-form input[type="email"]:focus {
  outline: none; border-color: var(--accent);
}
.subscribe-form button {
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  color: #fff; border: none;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 700; font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
}
.subscribe-form button:hover { background: var(--accent-light); }

.site-footer {
  background: var(--heading);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem var(--gutter) 1.5rem;
  font-size: 0.85rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
}
.footer-top {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 900;
  color: #fff;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  padding-top: 1.2rem;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.footer-disclaimer {
  max-width: 600px;
  line-height: 1.6;
  font-size: 0.75rem;
  margin-top: 1rem;
  color: rgba(255,255,255,0.35);
}

.cookie-modal {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  max-width: 360px; width: calc(100% - 2rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.3rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 9999;
  font-size: 0.85rem;
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-modal h4 {
  font-family: var(--font-display);
  font-size: 1rem; margin-bottom: 0.5rem;
}
.cookie-modal p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5; }
.cookie-btns { display: flex; gap: 0.5rem; }
.cookie-btns button {
  flex: 1; padding: 0.5rem;
  border-radius: 3px; border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.cookie-accept {
  background: var(--accent); color: #fff; border-color: var(--accent) !important;
}
.cookie-accept:hover { background: var(--accent-light); }
.cookie-decline { background: #fff; color: var(--text); }
.cookie-decline:hover { background: var(--bg-alt); }

.page-legal { padding: 3rem 0; }
.page-legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 900; color: var(--heading);
  margin-bottom: 1.5rem;
  border-bottom: 3px double var(--border);
  padding-bottom: 1rem;
}
.page-legal h2 {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  color: var(--heading);
  margin: 2rem 0 0.6rem;
}
.page-legal p, .page-legal li {
  font-size: 0.92rem; color: var(--text-muted);
  margin-bottom: 0.8rem; line-height: 1.7;
}
.page-legal ul { padding-left: 1.5rem; }

.success-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; text-align: center;
  padding: 3rem var(--gutter);
}
.success-content {}
.success-icon {
  width: 80px; height: 80px; margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--accent), #F97316);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.success-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; color: var(--heading);
  margin-bottom: 0.5rem;
}
.success-content p {
  font-size: 1.1rem; color: var(--text-muted);
  margin-bottom: 2rem;
}
.btn-home {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  transition: background var(--transition);
}
.btn-home:hover { background: var(--accent-light); }

.error-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; text-align: center;
  padding: 3rem var(--gutter);
}
.error-content {}
.error-num {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #F97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.error-content h1 {
  font-family: var(--font-display);
  font-size: 1.8rem; margin: 0.5rem 0;
}
.error-content p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.divider-ornament {
  text-align: center; margin: 2rem 0;
  color: var(--border); font-size: 1.5rem;
  letter-spacing: 0.5rem;
}

.highlight-box {
  background: var(--accent-bg);
  border: 1px solid #FDBA74;
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.highlight-box strong { color: var(--accent); }

.home-intro {
  padding: 3rem 0 1rem;
  text-align: center;
}
.home-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900; color: var(--heading);
  margin-bottom: 0.5rem;
}
.home-intro p {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 600px; margin: 0 auto;
}

@media (max-width: 600px) {
  .cookie-modal { right: 0.5rem; bottom: 0.5rem; max-width: calc(100% - 1rem); }
  .subscribe-section { padding: 1.5rem; }
  .quiz-section { padding: 1.2rem; }
}
