/*
Theme Name: ESL AI Teacher
Theme URI: https://eslaiteacher.com
Author: ESL AI Teacher
Description: A clean, AdSense-optimized blog theme for ESL teachers
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: esl-ai-teacher
*/

/* ── TOKENS ── */
:root {
  --ink:        #1c1c1c;
  --ink-soft:   #4a4a4a;
  --ink-muted:  #8a8a8a;
  --bg:         #ffffff;
  --bg-soft:    #f8f8f6;
  --bg-tag:     #f0f4ff;
  --accent:     #1d4ed8;
  --accent-lt:  #dbeafe;
  --rule:       #ebebeb;
  --serif:      'Lora', Georgia, serif;
  --sans:       'Inter', system-ui, sans-serif;
  --max-w:      1120px;
  --radius:     6px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── HEADER ── */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 0 24px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.site-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.site-logo em { font-style: italic; color: var(--accent); }
.site-nav { display: flex; gap: 24px; font-size: 0.83rem; font-weight: 500; }
.site-nav a { color: var(--ink-soft); transition: color 0.15s; }
.site-nav a:hover { color: var(--accent); }

/* ── AD ── */
.ad-wrapper { transition: opacity 0.2s; }
.ad-wrapper.ad-hidden { display: none !important; }
.ad-eyebrow {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 4px;
}
.ad-leaderboard {
  padding: 12px 24px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.ad-leaderboard .adsbygoogle { display: block; margin: 0 auto; }
.ad-inline { margin: 28px 0; text-align: center; }
.ad-end { margin: 36px 0 28px; text-align: center; }
.infeed-ad { padding: 20px 0; border-bottom: 1px solid var(--rule); }

/* ── LAYOUT ── */
.page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}
.main-col { min-width: 0; }

/* ── TAG ── */
.tag {
  display: inline-block;
  background: var(--bg-tag);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

/* ── HOME: HERO ── */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--rule);
  padding: 52px 24px 44px;
  text-align: center;
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 640px;
  margin: 0 auto 16px;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto;
}

/* ── HOME: ARTICLE CARDS ── */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  display: inline-block;
}
.article-card {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.article-card:first-of-type { padding-top: 0; }
.article-card:hover .card-title { color: var(--accent); }
.card-tag { margin-bottom: 8px; }
.card-title {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.card-excerpt { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 10px; }
.card-meta { font-size: 0.72rem; color: var(--ink-muted); display: flex; gap: 8px; }
.card-meta-dot { opacity: 0.4; }
.card-thumb {
  width: 120px;
  height: 90px;
  background: linear-gradient(135deg, var(--accent-lt), #e0f2fe);
  border-radius: var(--radius);
  align-self: center;
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── SINGLE: ARTICLE ── */
.breadcrumb {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { opacity: 0.4; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.article-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.meta-author { font-weight: 600; color: var(--ink-soft); }
.meta-sep { opacity: 0.35; }
.featured-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
}

/* article body */
.entry-content p { margin-bottom: 18px; font-size: 1rem; color: var(--ink); }
.entry-content h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 38px 0 14px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.entry-content h3 { font-size: 1rem; font-weight: 600; margin: 26px 0 10px; color: var(--ink); }
.entry-content strong { font-weight: 600; }
.entry-content ul, .entry-content ol { margin: 0 0 18px 22px; }
.entry-content li { margin-bottom: 7px; font-size: 1rem; }
.entry-content a { color: var(--accent); border-bottom: 1px solid var(--accent-lt); }
.entry-content a:hover { border-color: var(--accent); text-decoration: none; }
.entry-content pre {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.82rem;
  line-height: 1.65;
  overflow-x: auto;
  margin: 18px 0;
  font-family: 'Courier New', monospace;
}
.entry-content hr { border: none; border-top: 1px solid var(--rule); margin: 32px 0; }

/* tool box */
.tool-box {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 11px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
  margin-bottom: 18px;
  color: var(--ink-soft);
}
.tool-box a { color: var(--accent); border: none; }

/* related posts */
.related-section { margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--rule); }
.related-section h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.related-card {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.15s;
}
.related-card:hover { border-color: var(--accent); }
.related-tag { font-size: 0.68rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px; }
.related-title { font-size: 0.85rem; font-weight: 600; color: var(--ink); line-height: 1.4; }

/* ── ARCHIVE: CATEGORY ── */
.cat-hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--rule);
  padding: 36px 24px 32px;
}
.cat-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.cat-hero-eyebrow { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 8px; }
.cat-hero-title {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.cat-hero-desc { font-size: 0.9rem; color: var(--ink-soft); max-width: 500px; }
.cat-article-item {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.cat-article-item:hover .cat-item-title { color: var(--accent); }
.cat-item-tag { margin-bottom: 6px; }
.cat-item-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 7px;
  transition: color 0.15s;
}
.cat-item-excerpt { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.55; margin-bottom: 8px; }
.cat-item-meta { font-size: 0.7rem; color: var(--ink-muted); }
.cat-item-thumb {
  width: 100px;
  height: 75px;
  border-radius: var(--radius);
  overflow: hidden;
  align-self: center;
}
.cat-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── ABOUT ── */
.about-page { max-width: 720px; margin: 0 auto; padding: 60px 24px; }
.about-eyebrow { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px; }
.about-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 32px;
}
.about-title em { font-style: italic; }
.about-body { border-top: 2px solid var(--rule); padding-top: 32px; }
.about-body p { font-size: 1rem; color: var(--ink-soft); line-height: 1.8; margin-bottom: 20px; }
.about-body p strong { color: var(--ink); }
.about-body h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--ink); margin: 36px 0 14px; letter-spacing: -0.02em; }
.about-note {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.7;
}

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 78px; min-width: 0; }
.sidebar-block { margin-bottom: 32px; }
.sidebar-heading {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.popular-list { list-style: none; }
.popular-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: flex-start; }
.popular-item:last-child { border-bottom: none; }
.pop-num { font-family: var(--serif); font-size: 1.1rem; color: var(--accent-lt); font-weight: 600; min-width: 20px; line-height: 1.2; }
.pop-title { font-size: 0.82rem; font-weight: 500; color: var(--ink); line-height: 1.45; }
.pop-title a { color: inherit; }
.pop-title a:hover { color: var(--accent); }
.cat-list { list-style: none; }
.cat-item a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 0.84rem; color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}
.cat-item:last-child a { border-bottom: none; }
.cat-item a:hover { color: var(--accent); }
.cat-count { font-size: 0.7rem; background: var(--bg-soft); padding: 2px 7px; border-radius: 10px; color: var(--ink-muted); }

/* ── FOOTER ── */
.site-footer { border-top: 1px solid var(--rule); padding: 28px 24px; margin-top: 48px; }
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--ink-muted); }
.footer-links a:hover { color: var(--accent); }

/* ── MOBILE ── */
@media (max-width: 860px) {
  .site-nav { display: none; }
  .hero-title { font-size: 1.7rem; }
  .page-body { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .article-title { font-size: 1.6rem; }
  .related-grid { grid-template-columns: 1fr; }
  .article-card { grid-template-columns: 1fr; }
  .card-thumb { display: none; }
  .cat-article-item { grid-template-columns: 1fr; }
  .cat-item-thumb { display: none; }
  .ad-leaderboard { padding: 8px 16px; }
}

/* ── WORDPRESS DEFAULT STYLES ── */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--ink-muted); margin-top: 6px; }
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 16px 16px 0; }
.alignright { float: right; margin: 0 0 16px 16px; }
.screen-reader-text { position: absolute; left: -9999px; }
