/* ============================================================
   E.M.J. Jordan — site styles
   Palette
     --maroon  #73160d   primary accent, links, headings
     --cream   #ede5d8   page background
     --taupe   #9c7e6f   muted text, borders
     --salmon  #eda492   secondary accent, hovers
     --char    #3b3b3b   body text
   ============================================================ */

:root {
  --maroon: #73160d;
  --cream:  #ede5d8;
  --taupe:  #9c7e6f;
  --salmon: #eda492;
  --char:   #3b3b3b;

  --maroon-dark: #5a1009;
  --cream-deep:  #e3d8c8;

  --measure: 68ch;
  --space:   clamp(1rem, 2.5vw, 2rem);
}

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Inter:wght@400;500;600&display=swap');

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--char);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space);
}

.narrow { max-width: 720px; }

main { padding-block: clamp(2rem, 5vw, 4rem); }

/* ---- Typography ---- */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.15;
  color: var(--maroon);
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a {
  color: var(--maroon);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}
a:hover { color: var(--salmon); text-decoration: underline; }

.eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 0.6rem;
}

.lede { font-size: 1.3rem; color: var(--char); }

hr {
  border: 0;
  border-top: 1px solid var(--cream-deep);
  margin: 2.5rem 0;
}

/* ---- Header / nav ---- */
.site-header {
  border-bottom: 1px solid var(--cream-deep);
  background: var(--cream);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
}
.brand {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--maroon);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--maroon); text-decoration: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  align-items: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav a {
  color: var(--char);
  padding-block: 0.2rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--maroon); text-decoration: none; border-bottom-color: var(--salmon); }
.nav a[aria-current="page"] { color: var(--maroon); border-bottom-color: var(--maroon); }
.nav .ext::after { content: " \2197"; font-size: 0.8em; color: var(--taupe); }

/* ---- Hero ---- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); }
.hero .lede { max-width: 40ch; }

/* ---- Featured posts ---- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--cream-deep);
  padding-bottom: 0.6rem;
}
.section-head h2 { margin: 0; }
.section-head .more {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}

.posts {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.5rem 1.6rem;
  background: #fff8f0;
  border: 1px solid var(--cream-deep);
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -16px rgba(59, 22, 13, 0.45);
  border-color: var(--salmon);
}
.card .meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 0.6rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card h3 a { color: var(--maroon); }
.card h3 a:hover { color: var(--salmon); text-decoration: none; }
.card p { font-size: 1rem; color: var(--char); margin-bottom: 1rem; }
.card .read {
  margin-top: auto;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--maroon);
}

/* ---- Archive list ---- */
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--cream-deep);
}
.archive-list .date {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--taupe);
  min-width: 8.5rem;
}
.archive-list .title { font-size: 1.2rem; }
.archive-list .tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maroon);
  background: var(--cream-deep);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* ---- Article ---- */
.article { max-width: var(--measure); }
.article .meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1.5rem;
}
.article blockquote {
  margin: 1.8rem 0;
  padding-left: 1.3rem;
  border-left: 3px solid var(--salmon);
  font-style: italic;
  color: var(--maroon-dark);
}
.back-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 1.5rem;
}

/* ---- About ---- */
.about-grid {
  display: grid;
  gap: clamp(1.5rem, 5vw, 3rem);
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}
.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: var(--taupe);
  border: 1px solid var(--cream-deep);
}
.portrait-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}
@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 280px; }
}

/* ---- Reel ---- */
.reel-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--cream-deep);
}
.reel-item .meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 0.5rem;
}
.reel-item h3 { margin-bottom: 0.4rem; }
.reel-item .outlet { color: var(--taupe); font-style: italic; }

/* ---- Resume ---- */
.resume-section { margin-bottom: 2.5rem; }
.resume-section > h2 {
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--taupe);
  border-bottom: 1px solid var(--cream-deep);
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
}
.resume-entry { margin-bottom: 1.4rem; }
.resume-entry .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.resume-entry .role { font-weight: 600; color: var(--maroon); font-size: 1.15rem; }
.resume-entry .when {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--taupe);
  white-space: nowrap;
}
.resume-entry .place { color: var(--char); font-style: italic; margin-bottom: 0.3rem; }
.resume-entry p { font-size: 1rem; margin-bottom: 0; }

.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.6rem 1.2rem;
  border-radius: 3px;
  background: var(--maroon);
  color: var(--cream);
  border: 1px solid var(--maroon);
}
.btn:hover { background: var(--maroon-dark); color: var(--cream); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--maroon); }
.btn.ghost:hover { background: var(--cream-deep); color: var(--maroon); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

/* ---- Published work ---- */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--cream-deep);
}
.pub-list .outlet {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 0.3rem;
}
.pub-list h3 { margin-bottom: 0.3rem; font-size: 1.25rem; }
.pub-list p { font-size: 1rem; color: var(--char); margin-bottom: 0; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--cream-deep);
  margin-top: clamp(3rem, 8vw, 6rem);
  background: var(--cream-deep);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}
.site-footer .social { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer .social a { color: var(--char); }
.site-footer .social a:hover { color: var(--maroon); }
.site-footer .copy { color: var(--taupe); }

/* ---- Utility ---- */
.skip-link {
  position: absolute;
  left: -999px;
  background: var(--maroon);
  color: var(--cream);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }

/* ---- Gallery ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(0.6rem, 1.5vw, 1rem);
  margin-top: 1.5rem;
}
.shot {
  margin: 0;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--cream-deep);
  border: 1px solid var(--cream-deep);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}
.shot:hover img { transform: scale(1.05); }
.shot figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.5rem 0.8rem 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--cream);
  background: linear-gradient(transparent, rgba(59, 22, 13, 0.75));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.shot:hover figcaption { opacity: 1; }
.shot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  text-align: center;
  color: var(--taupe);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 4rem);
  background: rgba(40, 12, 6, 0.93);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.lightbox .lb-close {
  position: absolute;
  top: 0.8rem;
  right: 1.2rem;
  background: none;
  border: 0;
  color: var(--cream);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.lightbox .lb-close:hover { color: var(--salmon); }
