/* ========================================
   PEXE Lab — Stylesheet
   Earthy, editorial, terrain-inspired
   ======================================== */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300;1,9..144,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=DM+Sans:wght@400;500;600&display=swap');

/* Palette */
:root {
  --stone: #F5F0E8;
  --linen: #D8D0C4;
  --sand: #C4B9A8;
  --forest: #2D4A3E;
  --umber: #7A6F5F;
  --driftwood: #9A8F82;
  --charcoal: #2A2520;
  --cream: #E8E0D4;
  --max-width: 1120px;
  --text-width: 720px;
}

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

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--stone);
  color: var(--charcoal);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--forest);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--charcoal); }

img { max-width: 100%; display: block; }

/* ========================================
   Navigation
   ======================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 22px max(32px, calc((100vw - var(--max-width)) / 2 + 32px));
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: rgba(245, 240, 232, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(216, 208, 196, 0.5);
}

.site-nav__title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.site-nav__title:hover { color: var(--forest); }

.site-nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.site-nav__links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--umber);
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-nav__links a:hover { color: var(--forest); }
.site-nav__links a.active { color: var(--forest); }

/* Mobile nav */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--umber);
}

@media (max-width: 640px) {
  .site-nav { flex-wrap: wrap; }
  .nav-toggle-label { display: block; }
  .site-nav__links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    padding-top: 20px;
  }
  .nav-toggle:checked ~ .site-nav__links { display: flex; }
}

/* ========================================
   Section Label (LATEST FROM PEXE, PEOPLE, etc.)
   ======================================== */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--umber);
  margin-bottom: 40px;
}

/* ========================================
   Homepage — Hero (full-width background)
   ======================================== */
.hero {
  width: 100%;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/hero.jpg') center 40% / cover no-repeat;
  filter: saturate(0.85) brightness(0.95);
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 160px 32px 64px;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* ========================================
   Homepage — Stanza
   ======================================== */
.stanza {
  background: var(--stone);
  border-radius: 12px;
  padding: 48px 40px;
}

.stanza__label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--umber);
  margin-bottom: 28px;
}

.stanza__text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 21px;
  line-height: 1.75;
  color: var(--charcoal);
  font-weight: 300;
}

.stanza__text em {
  font-style: italic;
  font-weight: 400;
}

/* ========================================
   Divider
   ======================================== */
.divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}
.divider::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(to right, var(--sand), transparent);
}

/* ========================================
   Homepage — Feed
   ======================================== */
.feed {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 32px 32px;
}

.feed__frame {
  background: var(--cream);
  border-radius: 12px;
  padding: 44px 40px 40px;
}

.feed-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 24px 0;
  border-bottom: 1px solid var(--linen);
  transition: transform 0.2s ease;
}
.feed-item:hover { transform: translateX(8px); }
.feed-item:first-of-type { border-top: 1px solid var(--linen); }

.feed-item__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.feed-item__badge {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 2px;
  color: var(--cream);
}
.feed-item__badge--podcast { background: var(--forest); }
.feed-item__badge--essay { background: var(--umber); }
.feed-item__badge--roundup { background: var(--driftwood); }

.feed-item__source {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--driftwood);
}

.feed-item__date {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--driftwood);
  margin-left: auto;
}

.feed-item__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.4;
  transition: color 0.2s ease;
}
.feed-item:hover .feed-item__title { color: var(--forest); }

.feed-item__description {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--umber);
  margin-top: 6px;
  max-width: var(--text-width);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-loading {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--driftwood);
  padding: 24px 0;
}

/* ========================================
   Homepage — People (compact)
   ======================================== */
.people-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 48px;
}

.people-grid__header .section-label {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .people-grid { grid-template-columns: 1fr; }
}

.people-grid__header {
  grid-column: 1 / -1;
}

.person-card__name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 4px;
}

.person-card__role {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--umber);
  margin-bottom: 16px;
  line-height: 1.4;
}

.person-card__bio {
  font-size: 16px;
  line-height: 1.65;
  color: #4a4440;
  font-weight: 300;
  margin-bottom: 16px;
}

.person-card__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.person-card__link {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--forest);
  font-weight: 500;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--forest);
  padding-bottom: 1px;
}
.person-card__link:hover { color: var(--charcoal); border-color: var(--charcoal); }

/* ========================================
   Footer
   ======================================== */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px;
  border-top: 1px solid var(--linen);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.site-footer__logo {
  width: 200px;
  margin-bottom: 16px;
}

.site-footer__brand-name {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 8px;
}

.site-footer__brand-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--driftwood);
  line-height: 1.5;
}

.site-footer__right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.site-footer__contact {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--forest);
  font-weight: 500;
}

.site-footer__social {
  display: flex;
  gap: 16px;
}

.site-footer__social a {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--driftwood);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.site-footer__social a:hover { color: var(--forest); }

.site-footer__copy {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--sand);
}

/* ========================================
   Page Content (Orientation, People full, Research, The Line)
   ======================================== */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 160px 32px 48px;
}

.page-content__title {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.page-content__title + .person-full {
  margin-top: 24px;
}

.page-content__subtitle {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
  color: var(--umber);
  margin-bottom: 20px;
}

.page-content__body {
  max-width: var(--text-width);
}

.page-content__body h2 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 400;
  margin-top: 40px;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.page-content__body > h2:first-child,
.page-content__body > p:first-child + h2 {
  margin-top: 8px;
}

.page-content__body h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  margin-top: 40px;
  margin-bottom: 16px;
}

.page-content__body p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.page-content__body em { font-style: italic; }
.page-content__body strong { font-weight: 600; }

/* ========================================
   People page — full bios
   ======================================== */
.person-full {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.person-full:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .person-full {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.person-full__photo {
  width: 220px;
  height: 264px;
  object-fit: cover;
  border-radius: 4px;
  filter: grayscale(15%);
}

.person-full__name {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 4px;
}

.person-full__role {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--umber);
  margin-bottom: 20px;
}

.person-full__bio p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
  color: #4a4440;
}

.person-full__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ========================================
   Research page
   ======================================== */
.research-section { margin-bottom: 56px; }

.research-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--linen);
}
.research-item:first-child { border-top: 1px solid var(--linen); }

.research-item__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 6px;
}

.research-item__description {
  font-size: 15px;
  color: var(--umber);
  line-height: 1.6;
}

.research-item__status {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--forest);
  margin-top: 6px;
  display: inline-block;
}

.publication-item {
  padding: 12px 0;
  font-size: 16px;
  line-height: 1.7;
  border-bottom: 1px solid var(--linen);
}
.publication-item:first-child { border-top: 1px solid var(--linen); }

.conference-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--linen);
}
.conference-item:first-child { border-top: 1px solid var(--linen); }

.conference-item__event {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--umber);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.conference-item__title {
  font-size: 16px;
  line-height: 1.5;
  margin-top: 4px;
}

/* ========================================
   The Line page
   ======================================== */
.podcast-hero {
  max-width: var(--text-width);
}

.podcast-hero__description {
  font-size: 18px;
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 32px;
}

.podcast-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.podcast-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--stone);
  background: var(--forest);
  padding: 10px 20px;
  border-radius: 3px;
  transition: background 0.2s ease;
}
.podcast-link:hover { background: var(--charcoal); color: var(--stone); }

.episode-list { margin-top: 20px; }

.episode-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--linen);
}
.episode-item:first-child { border-top: 1px solid var(--linen); }

.episode-item__number {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--driftwood);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.episode-item__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--charcoal);
  transition: color 0.2s ease;
}
.episode-item__title:hover { color: var(--forest); }

.episode-item__date {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--driftwood);
  margin-top: 4px;
}

.episode-item__description {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--umber);
  margin-top: 10px;
  max-width: var(--text-width);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podcast-links {
  margin-bottom: 40px;
}
