/*
Theme Name: Teaching & Learning
Theme URI: 
Author: Custom
Description: A clean, minimal theme for educators, edtech writers, and teachers who blog.
Version: 1.0
License: GNU General Public License v2 or later
Tags: blog, education, minimal, clean
*/

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #f5f5f5;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --rule: #dcdcdc;
  --accent: #1c1c1c;
  --accent-light: #efefef;
  --white: #ffffff;
  --max-width: 740px;
  --wide-width: 1100px;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =============================================
   TYPOGRAPHY
============================================= */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
}

h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1.4rem; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--muted);
  font-size: 1.1rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--accent-light);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent);
}

pre {
  background: var(--ink);
  color: #f5f5f5;
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

pre code { background: none; color: inherit; padding: 0; }

/* =============================================
   LAYOUT UTILITIES
============================================= */
.container {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* =============================================
   SITE HEADER
============================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.site-branding { flex-shrink: 0; }

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; color: var(--accent); }

.site-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* NAV */
.main-nav { display: flex; align-items: center; gap: 0.25rem; }

.main-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}


/* Remove browser default list bullets from nav */
.main-nav ul,
.main-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a:hover,
.main-nav a.current {
  color: var(--ink);
  background: var(--cream);
  text-decoration: none;
}

.main-nav .nav-search {
  margin-left: 0.5rem;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--ink);
  cursor: pointer;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 0.25rem;
}

/* =============================================
   HERO / PAGE HEADER
============================================= */
.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 4rem 0 3.5rem;
}

.page-hero--home {
  padding: 5rem 0 4rem;
}

.page-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.page-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.page-hero__bio {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.65;
}

.page-hero__divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 1.5rem 0;
}

/* =============================================
   CATEGORY PILLS
============================================= */
.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.cat-pill {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--rule);
  color: var(--muted);
  background: var(--white);
  transition: all 0.15s ease;
}

.cat-pill:hover,
.cat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  text-decoration: none;
}

/* =============================================
   POST GRID & CARDS
============================================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(26,26,24,0.08);
}

.post-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--accent-light);
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__thumb img { transform: scale(1.03); }

.post-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}

.post-card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--accent); text-decoration: none; }

.post-card__excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.post-card__meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}

.post-card__meta .dot { opacity: 0.4; }

/* Featured post (spans full width) */
.post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  max-height: 320px;
}

.post-card--featured .post-card__thumb {
  width: 42%;
  flex-shrink: 0;
  aspect-ratio: unset;
}

.post-card--featured .post-card__body {
  padding: 2.25rem;
}

.post-card--featured .post-card__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.post-card--featured .post-card__excerpt {
  font-size: 0.95rem;
}

/* =============================================
   SINGLE POST
============================================= */
.post-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 4rem 0 3rem;
}

.post-header__cat {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  display: block;
  margin-bottom: 1rem;
}

.post-header__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.post-header__meta .author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--ink);
}

.post-header__meta .author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.post-body {
  padding: 3.5rem 0;
}

.post-body .container--narrow > * + * { margin-top: 1.4rem; }

.post-body h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.post-body h3 { margin-top: 2rem; margin-bottom: 0.5rem; }

.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.post-body li { margin-bottom: 0.4rem; line-height: 1.7; }

.post-body .wp-block-image { margin: 2.5rem 0; }
.post-body .wp-block-image figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.6rem;
  font-style: italic;
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.post-tags a {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--muted);
  background: var(--white);
}

.post-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* =============================================
   ABOUT / BIO SECTION
============================================= */
.bio-section {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2rem;
  margin: 4rem 0;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.bio-section__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.bio-section__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.bio-section__text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* =============================================
   SIDEBAR
============================================= */
.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
  padding: 3.5rem 0;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.sidebar { padding-top: 0.25rem; }

.widget {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.widget:last-child { border-bottom: none; }

.widget__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.widget-links { list-style: none; }

.widget-links li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.widget-links li:last-child { border-bottom: none; }

.widget-links a { color: var(--ink); font-weight: 500; }
.widget-links a:hover { color: var(--accent); }

/* Newsletter signup widget */
.newsletter-widget {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--white);
}

.newsletter-widget__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.newsletter-widget__text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1rem;
}

.newsletter-widget input[type="email"] {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.9; text-decoration: none; color: var(--white); }
.btn--full { width: 100%; text-align: center; }

/* =============================================
   PAGINATION
============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 4rem;
}

.pagination a, .pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--white);
  transition: all 0.15s ease;
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: #111111;
  color: rgba(245,245,245,0.65);
  padding: 3rem 0 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer-brand__name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #f5f5f5;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-brand__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f5f5f5;
  margin-bottom: 1rem;
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 0.6rem; }

.footer-links a {
  font-size: 0.875rem;
  color: rgba(247,244,239,0.6);
  transition: color 0.15s ease;
}

.footer-links a:hover { color: #f5f5f5; text-decoration: none; }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-social { display: flex; gap: 1rem; }

.footer-social a {
  color: rgba(247,244,239,0.5);
  transition: color 0.15s ease;
  font-size: 0.8rem;
}

.footer-social a:hover { color: #f5f5f5; text-decoration: none; }

/* =============================================
   ABOUT PAGE
============================================= */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: center;
  padding: 5rem 0;
}

.about-hero__img {
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-content { padding: 4rem 0; }
.about-content h2 { margin: 2.5rem 0 1rem; }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .content-sidebar { grid-template-columns: 1fr; gap: 0; }
  .sidebar { border-top: 1px solid var(--rule); padding-top: 2.5rem; }
  .post-card--featured { flex-direction: column; max-height: none; }
  .post-card--featured .post-card__thumb { width: 100%; aspect-ratio: 16/9; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header__inner { padding: 0 1.25rem; }
  .container, .container--narrow { padding: 0 1.25rem; }
  .post-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav.is-open { display: flex; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
