/*
Theme Name: Elite Academia
Theme URI: https://elite-academia.com
Author: Elite Academia
Author URI: https://elite-academia.com
Description: A custom editorial theme for Elite Academia — Philosophy, Education, Strategy. Built for thinkers who refuse to be average.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elite-academia
Tags: editorial, education, magazine, blog, custom-menu, custom-logo, featured-images
*/

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

:root {
  --ink: #0d0d0d;
  --ink-soft: #1a1a1a;
  --ink-muted: #3d3d3d;
  --ink-light: #6b6b6b;
  --cream: #faf8f4;
  --cream-dark: #f0ece4;
  --parchment: #e8e2d6;
  --accent: #8b2500;
  --accent-hover: #a63000;
  --accent-soft: rgba(139, 37, 0, 0.08);
  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.1);
  --rule: rgba(13, 13, 13, 0.12);
  --rule-strong: rgba(13, 13, 13, 0.25);
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

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

/* ========== CATEGORY LABELS ========== */
.cat-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.cat-label--gold { color: var(--gold); }

.cat-label a { color: inherit; }
.cat-label a:hover { opacity: 0.7; }

/* ========== TOPBAR ========== */
.topbar {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar__date { opacity: 0.6; }
.topbar__tagline { font-style: italic; opacity: 0.5; font-family: var(--body); }

/* ========== HEADER ========== */
.site-header {
  padding: 2rem 0 0;
  text-align: center;
  border-bottom: 3px double var(--rule-strong);
}

.site-header__title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.site-header__title a { color: inherit; }

.site-header__subtitle {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ========== NAV ========== */
.main-nav {
  margin-top: 1.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.2s;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { width: 100%; }
.main-nav .current-menu-item a { color: var(--ink); }
.main-nav .current-menu-item a::after { width: 100%; }

/* Remove default WP sub-menu styling */
.main-nav ul ul { display: none; }

/* ========== HERO ========== */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.hero__lead {
  border-right: 1px solid var(--rule);
  padding-right: 2.5rem;
}

.hero__img {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-muted) 60%, var(--accent) 100%);
}

.hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__headline {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0.75rem 0;
  letter-spacing: -0.01em;
}

.hero__headline a:hover { color: var(--accent); transition: color 0.2s; }

.hero__excerpt {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.hero__byline {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-light);
}

.hero__byline a { font-weight: 600; color: var(--ink-muted); }
.hero__byline a:hover { color: var(--accent); }

/* ========== SIDEBAR STORIES ========== */
.hero__sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-story {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.sidebar-story:first-child { padding-top: 0; }
.sidebar-story:last-child { border-bottom: none; }

.sidebar-story__headline {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0.35rem 0;
}

.sidebar-story__headline a:hover { color: var(--accent); transition: color 0.2s; }

.sidebar-story__excerpt {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-story__byline {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 0.5rem;
}

.sidebar-story__byline a { font-weight: 600; color: var(--ink-muted); }

/* ========== SECTION HEADERS ========== */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-top: 2.5rem;
}

.section-header__title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
}

.section-header__rule {
  flex: 1;
  height: 1px;
  background: var(--rule-strong);
}

/* ========== ESSAYS GRID ========== */
.essays-section {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.essays-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.essay-card__img {
  width: 100%;
  aspect-ratio: 3/2;
  margin-bottom: 1rem;
  border-radius: 2px;
  overflow: hidden;
  background: var(--parchment);
}

.essay-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.essay-card:hover .essay-card__img img { transform: scale(1.03); }

/* Fallback gradient when no featured image */
.essay-card__img--no-thumb {
  background: linear-gradient(160deg, #2c1810 0%, #5c3a28 50%, #8b6914 100%);
}

.essay-card:nth-child(2) .essay-card__img--no-thumb {
  background: linear-gradient(160deg, #1a2332 0%, #2d4a5e 50%, #4a7c8f 100%);
}

.essay-card:nth-child(3) .essay-card__img--no-thumb {
  background: linear-gradient(160deg, #2a1f2d 0%, #4a3654 50%, #6b4f7a 100%);
}

.essay-card__headline {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0.4rem 0;
}

.essay-card__headline a:hover { color: var(--accent); transition: color 0.2s; }

.essay-card__excerpt {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.essay-card__byline {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-light);
}

.essay-card__byline a { font-weight: 600; color: var(--ink-muted); }

/* ========== PULL QUOTE ========== */
.pull-quote {
  padding: 3.5rem 0;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.pull-quote::before {
  content: '\201C';
  font-family: var(--display);
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.15;
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}

.pull-quote__text {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  max-width: 48rem;
  margin: 0 auto;
  color: var(--ink-soft);
}

.pull-quote__attr {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-light);
  margin-top: 1.25rem;
  letter-spacing: 0.04em;
}

/* ========== CATEGORIES STRIP ========== */
.categories-strip {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.category-block {
  text-align: center;
  padding: 2rem 1rem;
  border-right: 1px solid var(--rule);
  transition: background 0.3s;
}

.category-block:last-child { border-right: none; }
.category-block:hover { background: var(--accent-soft); }

.category-block__icon { font-size: 1.5rem; margin-bottom: 0.75rem; opacity: 0.7; }

.category-block__name {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.category-block__name a { color: inherit; }

.category-block__count {
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--ink-light);
  font-style: italic;
}

/* ========== LONG READS ========== */
.long-read {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.long-read__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.long-read-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.long-read-card__number {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--parchment);
  line-height: 1;
  flex-shrink: 0;
  width: 3rem;
  text-align: center;
}

.long-read-card__headline {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0.3rem 0;
}

.long-read-card__headline a:hover { color: var(--accent); transition: color 0.2s; }

.long-read-card__meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 0.5rem;
}

.long-read-card__meta a { color: var(--ink-muted); font-weight: 500; }

/* ========== TEAM SECTION ========== */
.team-section {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.team__intro {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.team__intro p {
  font-size: 1.05rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

.team__intro p strong { color: var(--ink-soft); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.team-member {
  padding: 2rem;
  border: 1px solid var(--rule);
  margin-right: -1px;
  margin-bottom: -1px;
  transition: background 0.3s;
}

.team-member:hover { background: rgba(139, 37, 0, 0.03); }

.team-member__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
  overflow: hidden;
}

.team-member__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member__name {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.team-member__role {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.team-member__bio {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.6;
}

.team-member--collab {
  border-style: dashed;
  background: var(--gold-soft);
}

.team-member--collab:hover { background: rgba(184, 134, 11, 0.12); }
.team-member--collab .team-member__role { color: var(--gold); }
.team-member--collab .team-member__avatar { background: var(--gold); }

/* ========== NEWSLETTER ========== */
.newsletter {
  background: var(--ink);
  color: var(--cream);
  padding: 4rem 0;
  text-align: center;
}

.newsletter__kicker {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 1rem;
}

.newsletter__title {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.newsletter__desc {
  font-size: 1rem;
  opacity: 0.55;
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.newsletter__form {
  display: flex;
  justify-content: center;
  max-width: 28rem;
  margin: 0 auto;
}

.newsletter__input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  background: rgba(250, 248, 244, 0.08);
  border: 1px solid rgba(250, 248, 244, 0.15);
  border-right: none;
  color: var(--cream);
  outline: none;
  transition: background 0.3s;
}

.newsletter__input::placeholder { color: rgba(250, 248, 244, 0.3); }
.newsletter__input:focus { background: rgba(250, 248, 244, 0.12); }

.newsletter__btn {
  padding: 0.85rem 2rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--cream);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.3s;
}

.newsletter__btn:hover { background: var(--accent-hover); }

/* ========== FOOTER ========== */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid rgba(250, 248, 244, 0.08);
  padding: 3rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer__brand-name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer__brand-desc {
  font-size: 0.85rem;
  opacity: 0.4;
  line-height: 1.6;
  max-width: 20rem;
}

.footer__col-title {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.35;
  margin-bottom: 1rem;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__links a {
  font-family: var(--sans);
  font-size: 0.85rem;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.footer__links a:hover { opacity: 1; }

.footer__bottom {
  border-top: 1px solid rgba(250, 248, 244, 0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy {
  font-family: var(--sans);
  font-size: 0.75rem;
  opacity: 0.3;
}

.footer__bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer__bottom-links a {
  font-family: var(--sans);
  font-size: 0.75rem;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.footer__bottom-links a:hover { opacity: 0.7; }

/* ========== SINGLE ARTICLE ========== */
.article-header {
  max-width: 48rem;
  margin: 3rem auto 2rem;
  text-align: center;
}

.article-header .cat-label {
  margin-bottom: 1rem;
  display: inline-block;
}

.article-header__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article-header__meta {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
}

.article-header__meta a { color: var(--ink-muted); font-weight: 600; }

.article-header__img {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto 2.5rem;
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: 2px;
}

.article-header__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  max-width: 42rem;
  margin: 0 auto 4rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.article-content p { margin-bottom: 1.5rem; }

.article-content h2 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--ink);
}

.article-content h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink-muted);
}

.article-content ul, .article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content li { margin-bottom: 0.5rem; }

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover { color: var(--accent-hover); }

.article-content img {
  border-radius: 2px;
  margin: 2rem 0;
}

.article-content .wp-caption {
  margin: 2rem 0;
}

.article-content .wp-caption-text {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-light);
  margin-top: 0.5rem;
  text-align: center;
}

/* Article footer / author box */
.article-footer {
  max-width: 42rem;
  margin: 0 auto 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-box__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  overflow: hidden;
}

.author-box__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-box__name {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.author-box__bio {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.55;
}

/* ========== ARCHIVE / CATEGORY PAGE ========== */
.archive-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.archive-header__kicker {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}

.archive-header__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

.archive-header__desc {
  font-size: 1rem;
  color: var(--ink-light);
  max-width: 36rem;
  margin: 0.75rem auto 0;
  line-height: 1.6;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2.5rem 0;
}

/* ========== PAGINATION ========== */
.pagination {
  padding: 2rem 0 3rem;
  text-align: center;
  font-family: var(--sans);
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--rule);
  transition: all 0.2s;
}

.pagination .page-numbers.current {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.pagination .page-numbers:hover:not(.current) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ========== READING TIME HELPER ========== */
.reading-time {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-light);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero, .essays-section, .pull-quote, .team-section, .long-read, .categories-strip {
  animation: fadeUp 0.6s ease forwards;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__lead { border-right: none; padding-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: 2rem; }
  .essays-grid, .archive-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .long-read__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .main-nav ul { gap: 1.25rem; }
  .essays-grid, .archive-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .newsletter__form { flex-direction: column; }
  .newsletter__input { border-right: 1px solid rgba(250,248,244,0.15); border-bottom: none; }
  .footer__bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
