/* ---------- Tokens ---------- */
:root {
  --bg: #FBF7F0;
  --bg-alt: #F3EBDC;
  --surface: #FFFFFF;
  --text: #241F1A;
  --text-soft: #5B5248;
  --text-faint: #8A7F70;
  --accent: #D97757;
  --accent-dark: #B85C3E;
  --accent-soft: #FDF1EA;
  --line: #E6DCC8;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px -10px rgba(36, 31, 26, 0.15);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1814;
    --bg-alt: #221D18;
    --surface: #2A241E;
    --text: #F3ECE1;
    --text-soft: #C9BEAF;
    --text-faint: #8A7F70;
    --accent: #E08E6E;
    --accent-dark: #D97757;
    --accent-soft: #332620;
    --line: #3A332B;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 14px; z-index: 999;
}
.skip-link:focus { left: 0; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--text-soft); }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px; display: flex; gap: 10px; flex-wrap: wrap;
}
.eyebrow a { color: var(--accent); }
.eyebrow a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -6px rgba(217,119,87,0.55); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-ghost { color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

.link-arrow { color: var(--accent); font-weight: 600; font-size: 14px; display: inline-block; position: relative; }
.link-arrow::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.link-arrow:hover::after { transform: scaleX(1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.brand-mark { height: 34px; width: auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark { filter: invert(1) brightness(1.6); }
}
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--text-soft); position: relative; padding: 4px 0; transition: color 0.2s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--accent); }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-fun { color: var(--accent) !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 760px) {
  .main-nav { position: fixed; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; padding: 20px 24px; gap: 18px; transform: translateY(-110%); opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease; }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -200px; right: -200px; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%); z-index: -1;
}
.hero-inner { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); margin-bottom: 0.4em; letter-spacing: -0.01em; }
.hero-deck { font-size: 19px; max-width: 540px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.hero-photo { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { max-width: 280px; margin: 0 auto; order: -1; }
}

/* ---------- Featured post ---------- */
.featured-post { padding: 10px 0 70px; }
.featured-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.featured-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: block; }
.featured-img img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform 0.6s ease; }
.featured-img:hover img { transform: scale(1.04); }
.featured-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.featured-copy h2 a:hover { color: var(--accent); }
@media (max-width: 800px) { .featured-inner { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Section title ---------- */
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); text-align: center; }
.section-sub { text-align: center; max-width: 560px; margin: 0 auto 40px; }

/* ---------- Post grid / cards ---------- */
.recent-posts, .topics, .about-section { padding: 80px 0; }
.recent-posts { background: var(--bg-alt); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 30px; }
.post-grid-full { margin-top: 10px; }
.post-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: transform 0.35s ease, box-shadow 0.35s ease; display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .post-card-img img { transform: scale(1.06); }
.post-card-img-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--accent-soft), var(--bg-alt)); }
.post-card-body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.post-card-body h3 { font-size: 1.15rem; margin-bottom: 10px; }
.post-card-body h3 a:hover { color: var(--accent); }
.post-card-body p { font-size: 14.5px; flex: 1; }
.center-cta { text-align: center; margin-top: 44px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- Topics ---------- */
.topics-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.topic-chip {
  padding: 16px 30px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.1rem; transition: all 0.3s ease; cursor: default;
}
.topic-chip:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-4px) rotate(-1deg); }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; }
.about-photo { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; }
.about-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.about-copy .signoff { font-family: var(--serif); font-style: italic; margin-top: 24px; }
@media (max-width: 760px) { .about-inner { grid-template-columns: 1fr; text-align: center; } .about-photo { max-width: 220px; margin: 0 auto; } }

/* ---------- Blog listing ---------- */
.blog-hero { padding: 90px 0 30px; text-align: center; }
.blog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.blog-filters { padding-bottom: 30px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.filter-pill { padding: 9px 20px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text-soft); transition: all 0.25s ease; }
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.blog-list { padding: 10px 0 100px; }
.empty-note { text-align: center; color: var(--text-faint); padding: 60px 0; }

/* ---------- Single post ---------- */
.post-header { padding: 70px 0 30px; text-align: center; }
.post-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: 820px; margin: 0 auto 0.5em; }
.post-meta { color: var(--text-faint); font-size: 14px; }
.post-hero-img { max-width: 1120px; margin: 0 auto 50px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-hero-img img { width: 100%; max-height: 520px; object-fit: cover; }
.post-content { max-width: 720px; margin: 0 auto 30px; font-size: 18px; }
.post-content p { color: var(--text); margin-bottom: 1.3em; }
.post-content h2 { margin-top: 1.8em; font-size: 1.5rem; }
.post-content h3 { margin-top: 1.5em; font-size: 1.25rem; }
.post-content blockquote { margin: 1.8em 0; padding: 0.9em 1.4em; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; font-style: italic; }
.post-content img { border-radius: 10px; margin: 1.6em 0; }
.post-content a { color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--accent); }
.post-content ul, .post-content ol { color: var(--text); padding-left: 1.4em; margin-bottom: 1.3em; }
.post-content strong { color: var(--text); }
.post-tags { max-width: 720px; margin: 0 auto 60px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12px; background: var(--bg-alt); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; color: var(--text-soft); }
.not-found { text-align: center; padding: 100px 0; }

.post-nav { border-top: 1px solid var(--line); padding: 30px 0 80px; }
.post-nav-inner { display: flex; justify-content: space-between; gap: 20px; }
.post-nav-link { max-width: 45%; transition: color 0.2s ease; }
.post-nav-link.next { text-align: right; margin-left: auto; }
.post-nav-label { display: block; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.post-nav-title { font-family: var(--serif); font-size: 1.05rem; color: var(--text); }
.post-nav-link:hover .post-nav-title { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: #241F1A; color: #D8CFC2; padding: 64px 0 0; margin-top: 60px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #15110D; } }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-mark { height: 30px; margin-bottom: 16px; }
.footer-brand p { color: #B5AA9A; max-width: 320px; }
.footer-links { display: flex; gap: 60px; }
.footer-links h4 { color: #fff; font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-links a { display: block; color: #B5AA9A; margin-bottom: 10px; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--accent); }
.social-row { display: flex; gap: 12px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 15px; transition: all 0.25s ease; }
.social-row a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; padding: 22px 0; font-size: 13px; color: #8A7F70; }
.footer-sign { font-family: var(--serif); font-style: italic; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Admin shared bits reused by admin.css import ---------- */
.post-content .ng-ai-post { font-size: 17px; line-height: 1.75; color: #3d3a36; }
.post-content .ng-ai-post p { margin-bottom: 1.3rem; }
.post-content .ng-ai-deck { font-style: italic; font-size: 1.2rem; line-height: 1.65; color: #4a4540; border-left: 4px solid #D97757; padding: 0.75rem 0 0.75rem 1.25rem; margin-bottom: 2rem; background: #fdf9f5; }
.post-content .ng-ai-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #D97757; margin-bottom: 0.4rem; display: block; }
.post-content .ng-ai-h2-claude { font-size: 1.7rem; font-weight: 700; color: #D97757; margin: 0.25rem 0 1rem; line-height: 1.2; }
.post-content .ng-ai-h2-openai { font-size: 1.7rem; font-weight: 700; color: #1a1714; margin: 0.25rem 0 1rem; line-height: 1.2; }
.post-content .ng-ai-h2-gemini { font-size: 1.7rem; font-weight: 700; color: #4285F4; margin: 0.25rem 0 1rem; line-height: 1.2; }
.post-content .ng-ai-h2-plain { font-size: 1.7rem; font-weight: 700; color: #1a1714; margin: 0.25rem 0 1rem; line-height: 1.2; }
.post-content .ng-ai-rule { border: none; border-top: 1px solid #e0d9ce; margin: 2.5rem 0; }
.post-content .ng-ai-card { border: 1px solid #e0d9ce; border-radius: 10px; padding: 1.25rem 1.5rem; margin: 1.75rem 0; background: #fff; }
.post-content .ng-ai-card-claude { border-left: 4px solid #D97757; }
.post-content .ng-ai-card-openai { border-left: 4px solid #888; }
.post-content .ng-ai-card-gemini { border-left: 4px solid #4285F4; }
.post-content .ng-ai-card-label { font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.35rem; display: block; }
.post-content .ng-ai-card-label-claude { color: #D97757; }
.post-content .ng-ai-card-label-openai { color: #888; }
.post-content .ng-ai-card-label-gemini { color: #4285F4; }
.post-content .ng-ai-card-title { font-size: 1.05rem; font-weight: 700; color: #1a1714; margin-bottom: 0.6rem; display: block; }
.post-content .ng-ai-card p { margin-bottom: 0; font-size: 15px; color: #4a4540; }
.post-content .ng-ai-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.post-content .ng-ai-list li { padding: 0.3rem 0 0.3rem 1.5rem; position: relative; font-size: 15.5px; color: #4a4540; }
.post-content .ng-ai-list li::before { content: '→'; position: absolute; left: 0; }
.post-content .ng-ai-list-claude li::before { color: #D97757; }
.post-content .ng-ai-list-openai li::before { color: #888; }
.post-content .ng-ai-list-gemini li::before { color: #4285F4; }
.post-content .ng-ai-pullquote { font-size: 1.4rem; font-style: italic; font-weight: 700; color: #1a1714; text-align: center; border-top: 2px solid #D97757; border-bottom: 1px solid #e0d9ce; padding: 1.25rem 1rem; margin: 2rem 0; line-height: 1.4; }
.post-content .ng-ai-table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid #e0d9ce; border-radius: 10px; }
.post-content .ng-ai-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.post-content .ng-ai-table th { padding: 12px 14px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; background: #f5f1eb; border-bottom: 1px solid #e0d9ce; }
.post-content .ng-ai-table th:nth-child(2) { color: #D97757; }
.post-content .ng-ai-table th:nth-child(3) { color: #555; }
.post-content .ng-ai-table th:nth-child(4) { color: #4285F4; }
.post-content .ng-ai-table td { padding: 11px 14px; border-bottom: 1px solid #e0d9ce; color: #4a4540; vertical-align: middle; font-size: 14px; }
.post-content .ng-ai-table tr:last-child td { border-bottom: none; }
.post-content .ng-ai-table td:first-child { font-weight: 600; color: #1a1714; font-size: 13px; }
.post-content .ng-ai-badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.post-content .ng-ai-badge-best { background: #fff0e8; color: #c05e2e; }
.post-content .ng-ai-badge-good { background: #f0f0f0; color: #555; }
.post-content .ng-ai-badge-ok { background: #e8f0fe; color: #3a6fd8; }
.post-content .ng-ai-verdict { background: #1a1714; color: #faf8f4; border-radius: 12px; padding: 2rem 1.75rem; margin: 2.5rem 0 0; text-align: center; }
.post-content .ng-ai-verdict h3 { font-size: 1.5rem; font-weight: 700; color: #D97757; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.post-content .ng-ai-verdict p { color: #b8b0a6; font-size: 15px; margin-bottom: 0; }

