/* ============================================================
   theaielder.ai — shared stylesheet
   All pages link to this file. Edit once, updates everywhere.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg:         #16161a;
  --bg-warm:    #1c1c21;
  --rule:       #3a3a42;
  --cream:      #f0ead8;
  --cream-dim:  #b8b09a;
  --gold:       #c9973a;
  --gold-dim:   #8a6524;
  --white:      #faf8f2;
}

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

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

body {
  background-color: var(--bg);
  color: var(--cream);
  font-family: 'Libre Baskerville', Georgia, serif;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem 4rem;
  -webkit-font-smoothing: antialiased;
}

/* ── Masthead ── */
header {
  width: 100%;
  max-width: 720px;
  padding-top: 4.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  animation: fadeUp 1s ease both;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.header-text { flex: 1; }

.header-image {
  flex-shrink: 0;
  width: 220px;
  margin-top: 0.3rem;
  margin-bottom: 0;
}

.header-image img {
  width: 100%;
  display: block;
  border-radius: 3px;
  opacity: 0.92;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.header-image.small {
  width: 100px;
}

.header-image figcaption {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.62rem;
  font-style: italic;
  color: #7a7468;
  padding: 0.3rem 0.2rem 0;
  line-height: 1.4;
  text-align: right;
}

.site-name {
  display: inline-block;
  text-decoration: none;
}

.kicker {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--white);
}

h1 em {
  font-style: italic;
  color: var(--gold);
}

h1.section-h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.subtitle {
  margin-top: 1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 300;
  color: var(--cream-dim);
  letter-spacing: 0.02em;
}

/* ── Navigation ── */
nav {
  width: 100%;
  max-width: 720px;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0;
  animation: fadeUp 1s 0.1s ease both;
}

nav a {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  padding: 0.15em 0.9em;
  border-right: 1px solid var(--rule);
  transition: color 0.2s ease;
}

nav a:first-child { padding-left: 0; }
nav a:last-child  { border-right: none; }
nav a:hover       { color: var(--gold); }
nav a.active      { color: var(--gold); }

/* ── Main content ── */
main {
  width: 100%;
  max-width: 720px;
  padding-top: 3rem;
}

.section-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
  animation: fadeUp 1s 0.15s ease both;
}

h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 1.6rem;
  animation: fadeUp 1s 0.2s ease both;
}

/* ── Essay body text ── */
.essay p {
  font-size: 0.97rem;
  color: var(--cream);
  margin-bottom: 1.3em;
  animation: fadeUp 1s 0.3s ease both;
}

.essay p + p            { animation-delay: 0.35s; }
.essay p:nth-child(3)   { animation-delay: 0.40s; }
.essay p:nth-child(4)   { animation-delay: 0.45s; }
.essay p:nth-child(5)   { animation-delay: 0.50s; }
.essay p:nth-child(6)   { animation-delay: 0.55s; }
.essay p:nth-child(7)   { animation-delay: 0.60s; }

/* ── Pull quotes / maxims ── */
.maxim-block {
  margin: 2.6rem 0;
  padding: 1.6rem 2rem;
  border-left: 3px solid var(--gold);
  background: var(--bg-warm);
  animation: fadeUp 1s 0.5s ease both;
}

.maxim {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.18rem;
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.55;
  margin-bottom: 0.65rem;
}

.maxim:last-child { margin-bottom: 0; }
.maxim::before { content: '\201C'; color: var(--gold); }
.maxim::after  { content: '\201D'; color: var(--gold); }

/* ── Post list (section landing pages) ── */
.post-list {
  margin-top: 1rem;
}

.post-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
  animation: fadeUp 1s 0.3s ease both;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.post-item:last-child { border-bottom: none; }

.post-thumb {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  overflow: hidden;
  border-radius: 2px;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.post-thumb img:hover { opacity: 1; }

.post-content { flex: 1; }

.post-meta {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.5rem;
}

.post-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.post-title a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover { color: var(--gold); }

.post-excerpt {
  font-size: 0.9rem;
  color: var(--cream-dim);
  line-height: 1.65;
}

.post-readmore {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-readmore:hover { color: var(--cream); }

/* Empty state */
.empty-state {
  padding: 2.5rem 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--cream-dim);
}

/* ── Track description ── */
.track-intro {
  font-size: 0.97rem;
  color: var(--cream-dim);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  font-style: italic;
}

/* ── Closing line ── */
.closing {
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  animation: fadeUp 1s 0.65s ease both;
}

.closing-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 300;
  color: var(--cream-dim);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.closing-attr {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

/* ── Footer ── */
footer {
  width: 100%;
  max-width: 720px;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  animation: fadeUp 1s 0.8s ease both;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer span { text-transform: uppercase; letter-spacing: 0.18em; }

footer a {
  color: var(--gold-dim);
  text-decoration: none;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

footer a:hover { color: var(--gold); }

/* ── Article / Post ── */

.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.article-track {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.2rem;
  transition: color 0.2s ease;
}

.article-track:hover { color: var(--cream); }

.article-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.1;
  color: var(--gold);
  margin-bottom: 1rem;
}

.article-deck {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 300;
  font-style: italic;
  color: var(--cream-dim);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.article-date {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

/* ── Article body ── */
.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--cream);
}

.article-body p {
  margin-bottom: 1.5em;
}

.article-body h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--cream-dim);
  margin: 1.6rem 0 0.8rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.8rem 0 0;
}

/* ── Article lead image ── */
figure.article-lead-image {
  width: 100%;
  max-width: 340px;
  margin: 0 0 2rem 2rem;
  float: right;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

figure.article-lead-image img {
  width: 100%;
  display: block;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.92;
}

figure.article-lead-image figcaption {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.68rem;
  font-style: italic;
  color: #7a7468;
  padding: 0.4rem 0.2rem 0;
  line-height: 1.4;
  text-align: right;
}

/* ── Body images ── */
figure.body-image {
  margin: 2rem 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

figure.body-image img {
  width: 100%;
  display: block;
  border-radius: 2px;
  opacity: 0.92;
}

figure.body-image figcaption {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.68rem;
  font-style: italic;
  color: #7a7468;
  padding: 0.4rem 0.2rem 0;
  line-height: 1.4;
  text-align: right;
}

/* ── Article body links ── */
.article-body a         { color: #faf8f2; text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s ease; }
.article-body a:visited  { color: #a0a0a0; }
.article-body a:hover    { color: #c9973a; }

.article-body em { font-style: italic; }

.article-body strong {
  font-weight: 700;
  color: var(--white);
}

/* ── Pull quote within article ── */
.article-body blockquote {
  margin: 2.2rem 0;
  padding: 1.4rem 1.8rem;
  border-left: 3px solid var(--gold);
  background: var(--bg-warm);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--cream);
  line-height: 1.55;
}

/* ── Reply section ── */
.article-reply {
  margin-top: 3.5rem;
  padding: 2rem;
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.article-reply-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.article-reply p {
  font-size: 0.9rem;
  color: var(--cream-dim);
  margin-bottom: 1rem;
  line-height: 1.65;
}

.reply-link {
  display: inline-block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold-dim);
  padding: 0.4em 1.1em;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.reply-link:hover {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}

/* ── Post navigation (prev/next) ── */
.article-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.article-nav a {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-nav a:hover { color: var(--gold); }
.article-nav .nav-next { text-align: right; }

/* ── Animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .header-inner { flex-direction: column-reverse; }
  .header-image { width: 100%; }
  .header-image.small { width: 72px; }
  .maxim-block { padding: 1.2rem 1.2rem; }
  nav a { font-size: 0.68rem; letter-spacing: 0.12em; }
  .post-item { flex-direction: column; align-items: flex-start; }
  .post-thumb { width: 100%; height: 160px; }
  footer { flex-direction: column; align-items: flex-start; }
  figure.article-lead-image {
    float: none;
    max-width: 100%;
    margin: 0 0 1.8rem 0;
  }
}