/*
Theme Name: SmartEng Brand
Theme URI: https://smarteng.cc
Author: SmartEng 聰明英意
Description: Bespoke editorial brand identity theme for SmartEng (聰明英意). Emerald & warm paper palette, 6-pillar learning hub, spotlight layout, and AdSense-optimized reading experience.
Version: 1.0.0
Text Domain: smarteng-brand
*/

:root {
  --emerald-950: #042F2E;
  --emerald-900: #064E3B;
  --emerald-800: #065F46;
  --emerald-700: #0F766E;
  --emerald-100: #CCFBF1;
  --emerald-50: #F0FDFA;
  --coral-600: #EA580C;
  --coral-700: #C2410C;
  --coral-50: #FFF7ED;
  --cream-100: #F5F5F4;
  --cream-50: #FAFAF9;
  --ink-900: #1C1917;
  --ink-700: #44403C;
  --ink-500: #78716C;
  --border: #E7E5E4;
  --white: #FFFFFF;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 12px 32px rgba(6, 78, 59, 0.09);
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink-900);
  background: var(--cream-50);
  line-height: 1.78;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--emerald-700);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--coral-600);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 20px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-900);
}

.brand-lockup:hover {
  color: var(--ink-900);
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", "Noto Sans TC", sans-serif;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.22);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-primary {
  font-family: "Outfit", "Noto Sans TC", sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: var(--emerald-950);
  letter-spacing: -0.01em;
}

.brand-tagline {
  font-size: 11.5px;
  color: var(--ink-500);
  font-weight: 500;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav li a {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-700);
}

.site-nav li a:hover,
.site-nav li.current-menu-item > a {
  background: var(--emerald-50);
  color: var(--emerald-900);
}

.mobile-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--emerald-950);
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-emerald {
  background: var(--emerald-900);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(6, 78, 59, 0.2);
}

.btn-emerald:hover {
  background: var(--emerald-700);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-coral {
  background: var(--coral-600);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.22);
}

.btn-coral:hover {
  background: var(--coral-700);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--white);
  color: var(--emerald-900);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--emerald-700);
  color: var(--emerald-900);
}

/* ===== Light Editorial Brand Hero ===== */
.smart-hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--cream-50) 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 80px;
}

.smart-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  color: var(--emerald-800);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.smart-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.3vw, 48px);
  font-weight: 900;
  line-height: 1.22;
  color: var(--emerald-950);
  letter-spacing: -0.02em;
}

.smart-hero h1 em {
  font-style: normal;
  color: var(--coral-600);
}

.hero-sub {
  margin: 0 0 30px;
  font-size: 17px;
  color: var(--ink-700);
  max-width: 560px;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-panel {
  background: linear-gradient(145deg, var(--emerald-950), var(--emerald-800));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-md);
}

.hero-panel-kicker {
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5EEAD4;
  font-weight: 700;
  margin: 0 0 14px;
}

.hero-panel h2 {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.38;
  color: var(--white);
}

.hero-checklist {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.hero-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-checklist .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(94, 234, 212, 0.2);
  color: #5EEAD4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 3px;
}

.hero-panel-foot {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}

/* ===== Sections ===== */
.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.kicker {
  display: inline-block;
  font-family: "Outfit", "Noto Sans TC", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral-600);
  margin-bottom: 8px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  color: var(--emerald-950);
  line-height: 1.28;
}

.section-lead {
  margin: 8px 0 0;
  font-size: 15.5px;
  color: var(--ink-700);
  max-width: 640px;
}

/* ===== Spotlight Layout (1 Big + 2 Stacked) ===== */
.spotlight-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 24px;
}

.spotlight-main {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--emerald-700);
}

.spotlight-main h3 {
  margin: 14px 0 14px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 900;
  line-height: 1.35;
  color: var(--emerald-950);
}

.spotlight-main h3 a {
  color: inherit;
}

.spotlight-main h3 a:hover {
  color: var(--coral-600);
}

.spotlight-stack {
  display: grid;
  gap: 20px;
}

.spotlight-mini {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.spotlight-mini h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.42;
  color: var(--emerald-950);
}

.spotlight-mini h3 a {
  color: inherit;
}

.spotlight-mini h3 a:hover {
  color: var(--coral-600);
}

.tag-chip {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--emerald-50);
  color: var(--emerald-800);
  border: 1px solid var(--emerald-100);
}

.excerpt-txt {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--ink-700);
  line-height: 1.72;
}

.meta-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-500);
  padding-top: 12px;
  border-top: 1px solid var(--cream-100);
}

/* ===== 6-Category Knowledge Hub ===== */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  background: var(--cream-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  color: var(--ink-900);
}

.hub-card:hover {
  background: var(--white);
  border-color: var(--emerald-700);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--ink-900);
}

.hub-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hub-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--emerald-950);
}

.hub-count {
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--coral-50);
  color: var(--coral-700);
}

.hub-card p {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: var(--ink-700);
  flex-grow: 1;
}

.hub-link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--emerald-700);
}

/* ===== 2-Column Editorial Feed ===== */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feed-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.feed-card:hover {
  border-color: var(--emerald-700);
  box-shadow: var(--shadow-md);
}

.feed-card h3 {
  margin: 12px 0 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.44;
  color: var(--emerald-950);
}

.feed-card h3 a {
  color: inherit;
}

.feed-card h3 a:hover {
  color: var(--coral-600);
}

/* ===== Authors / Editors Band ===== */
.editors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.editor-card {
  background: var(--cream-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.editor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 19px;
  flex-shrink: 0;
}

.editor-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--emerald-950);
}

.editor-role {
  font-size: 13px;
  font-weight: 700;
  color: var(--coral-600);
  margin-bottom: 8px;
}

.editor-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-700);
}

/* ===== Page & Archive Hero ===== */
.inner-hero {
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-800));
  color: var(--white);
  padding: 52px 0;
}

.inner-hero .crumb {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
}

.inner-hero .crumb a {
  color: #5EEAD4;
}

.inner-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.28;
}

.inner-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  max-width: 720px;
}

/* ===== Single Article & Page Prose ===== */
.reading-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.reading-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 42px;
  box-shadow: var(--shadow-sm);
}

.reading-header {
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.reading-crumb {
  font-size: 13.5px;
  color: var(--ink-500);
  margin-bottom: 12px;
}

.reading-header h1 {
  margin: 0 0 14px;
  font-size: clamp(25px, 3.4vw, 34px);
  font-weight: 900;
  line-height: 1.32;
  color: var(--emerald-950);
}

.reading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-500);
}

.prose {
  font-size: 16.5px;
  line-height: 1.88;
  color: var(--ink-900);
}

.prose h2 {
  margin: 38px 0 14px;
  font-size: 23px;
  font-weight: 800;
  color: var(--emerald-950);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--emerald-100);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 18.5px;
  font-weight: 800;
  color: var(--emerald-800);
}

.prose p {
  margin: 0 0 18px;
}

.prose ul, .prose ol {
  margin: 0 0 22px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 9px;
}

.prose a {
  color: var(--coral-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  background: var(--emerald-50);
  color: var(--emerald-900);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.92em;
}

.prose blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--cream-50);
  border-left: 4px solid var(--coral-600);
  border-radius: 0 10px 10px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  border: 1px solid var(--border);
  display: block;
  overflow-x: auto;
}

.prose th, .prose td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose thead th {
  background: var(--emerald-900);
  color: var(--white);
  font-weight: 700;
  white-space: nowrap;
}

.prose tbody tr:nth-child(even) {
  background: var(--cream-50);
}

.author-panel {
  margin-top: 40px;
  padding: 24px;
  background: var(--cream-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.author-panel h4 {
  margin: 0 0 6px;
  font-size: 16.5px;
  color: var(--emerald-950);
}

.author-panel p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-700);
}

/* ===== Pagination ===== */
.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--emerald-950);
  font-weight: 600;
  font-size: 14px;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: var(--white);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--emerald-950);
  color: rgba(255, 255, 255, 0.78);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-title {
  font-family: "Outfit", "Noto Sans TC", sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-h {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5EEAD4;
  margin: 0 0 14px;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li {
  margin-bottom: 9px;
}

.footer-list a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14.5px;
}

.footer-list a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.56);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .smart-hero-grid,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 20px;
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }
  .hub-grid,
  .feed-grid,
  .editors-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .reading-card {
    padding: 28px 20px;
  }
  .editor-card,
  .author-panel {
    flex-direction: column;
  }
}
