/*
Theme Name: Samara Smith Portfolio
Theme URI: https://samarasmith.com
Description: Custom portfolio theme for Samara Smith
Author: Samara Smith
Version: 1.1.0
*/

/* ─── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=DM+Sans:wght@400;500&family=DM+Serif+Display:ital@0;1&display=swap');

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

/*
  Palette C — deep warm linen
  Contrast ratios against #1e1d1a:
  --ink    #c8c4bc  7.1:1  AAA
  --ink-mid #9e9990  4.6:1  AA
  --ink-muted #6e6a62  3.1:1  AA large text only (used only for decorative labels)
*/
:root {
  --bg:             #0e1412;
  --bg-card:        #141c19;
  --bg-hover:       #1a2420;
  --bg-pill-active: #c8ff00;
  --ink:            #d4e0d8;
  --ink-mid:        #9ab8ae;
  --ink-muted:      #5a7a6e;
  --ink-on-pill:    #0e1412;
  --rule:           rgba(200,255,180,.07);
  --rule-mid:       rgba(200,255,180,.13);
  --focus:          #c8ff00;
  --serif:          'DM Serif Display', Georgia, serif;
  --sans:           'DM Sans', system-ui, sans-serif;
  --condensed:      'Barlow Condensed', Impact, sans-serif;
  --green:          #c8ff00;
  --green-dark:     #0e1412;
  --nav-h:          68px;
}

/* 17px base — above the 16px minimum for comfortable dark-bg reading */
html { font-size: 17px; }

body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ─── Focus ring (keyboard nav) ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── Skip link ──────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: .5rem 1rem;
  font-size: .9375rem;
  font-weight: 500;
  z-index: 9999;
  border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

/* ─── Navigation ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 3rem;
  justify-content: space-between;
}

.site-title {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-decoration: none;
  line-height: 1;
}

.site-title__name {
  font-family: var(--condensed);
  font-size: 1.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green);
  line-height: 1;
  transition: opacity .2s;
}

.site-title__tagline {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .07em;
  color: var(--green);
  opacity: .65;
  line-height: 1;
  transition: opacity .2s;
}

.site-title:hover .site-title__name,
.site-title:hover .site-title__tagline {
  opacity: .75;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.main-navigation a {
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .6;
  padding: .25rem 0;
  position: relative;
  transition: opacity .2s;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  transition: width .25s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
  width: 100%;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  opacity: 1;
}

/* ─── Filter bar ─────────────────────────────────────────── */
.filter-bar {
  padding: .9rem 3rem;
  display: flex;
  gap: .35rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-label {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: .4rem;
}

.filter-pill {
  font-family: var(--sans);
  font-weight: 400;
  font-size: .68rem;
  letter-spacing: .05em;
  padding: .28rem .75rem;
  border: 1px solid var(--rule-mid);
  border-radius: 20px;
  cursor: pointer;
  color: var(--ink-mid);
  background: transparent;
  transition: background .2s, color .2s, border-color .2s;
  min-height: 26px;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.filter-pill:hover:not(.active) {
  color: var(--green);
  border-color: var(--green);
}

.filter-pill.active {
  background: var(--green);
  color: var(--green-dark);
  border-color: var(--green);
  font-weight: 500;
}

/* ─── Projects grid ──────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(200,255,180,.12);
  border-top: 1px solid rgba(200,255,180,.12);
  border-bottom: 1px solid rgba(200,255,180,.12);
  margin: 0 3rem 4rem;
}

.projects-grid:has(.project-card:hover) .project-card:not(:hover) {
  opacity: .35;
  transform: scale(.99);
}

.project-card {
  background: var(--bg-card);
  cursor: pointer;
  transition: background .2s, transform .25s ease, box-shadow .2s ease, opacity .2s ease;
  overflow: hidden;
  transform: scale(1);
  position: relative;
  z-index: 1;
}

.project-card:hover {
  background: var(--bg-hover);
  transform: scale(1.02);
  box-shadow: -3px 0 0 0 var(--green);
  z-index: 2;
}

.project-card:focus-visible {
  background: var(--bg-hover);
  outline: none;
  box-shadow: inset 0 0 0 2px var(--green);
}

.project-card__thumb-wrap {
  overflow: hidden;
  display: block;
}

.project-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  filter: grayscale(10%);
  transition: filter .4s ease, transform .5s ease;
  transform: scale(1);
}

.project-card:hover .project-card__thumb {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.project-card__thumb--placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: .9375rem;
  letter-spacing: .06em;
}

.project-card__body {
  padding: 1.5rem 1.75rem 2rem;
}

.project-card__tag {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .35rem;
  opacity: .7;
}

.project-card__title {
  font-family: var(--condensed);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: .65rem;
  color: var(--ink);
  transition: color .2s;
}

.project-card:hover .project-card__title {
  color: var(--green);
}

.project-card__excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__year {
  font-size: .8125rem;
  color: var(--ink-muted);
  margin-top: 1rem;
  letter-spacing: .06em;
}

/* ─── Lightbox ───────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14,20,18,.97);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}

.lightbox-overlay.open {
  pointer-events: auto;
}

.lightbox-overlay.open {
  display: block;
  animation: lightbox-in .25s ease forwards;
  pointer-events: auto;
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-inner {
  animation: lightbox-slide .3s ease forwards;
}

@keyframes lightbox-slide {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.lightbox-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 0 0;
  animation: none; /* overridden when overlay is open */
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 201;
  transition: color .2s;
  padding: .5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lightbox-close:hover { color: var(--ink); }

.lightbox-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.lightbox-preview {
  padding: 2rem 2.5rem 3rem;
}

.lightbox-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--ink);
}

.lightbox-excerpt {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-mid);
  margin-bottom: 1.75rem;
  max-width: 580px;
}

/* lightbox-cta defined below */

.lightbox-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.lightbox-section-label {
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.2rem;
}

.lightbox-meta {
  font-size: 1rem;
  color: var(--ink-mid);
  line-height: 1.7;
}

.lightbox-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-top: .5rem;
}

.lightbox-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.lightbox-embed { margin-top: .5rem; }

.lightbox-embed iframe,
.lightbox-embed video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.lightbox-embed audio {
  width: 100%;
  margin-top: .5rem;
}

/* ─── Single post fallback ───────────────────────────────── */
.single-project {
  max-width: 860px;
  margin: 0 auto;
  padding: 5rem 2.5rem 6rem;
}

/* ─── Interior pages ─────────────────────────────────────── */
.page-header {
  padding: 4rem 3rem 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.page-header__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 400;
  color: var(--ink);
}

.page-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-mid);
}

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

.page-content h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin: 2.5rem 0 .8rem;
}

.page-content a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-mid);
  transition: text-decoration-color .2s;
}
.page-content a:hover { text-decoration-color: var(--ink); }

/* Writing / Press list */
.post-list {
  list-style: none;
  padding: 0 3rem;
  max-width: 860px;
  margin: 0 auto 6rem;
}

.post-list__item {
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.post-list__title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: .5rem;
  color: var(--ink);
}

.post-list__title a:hover { opacity: .7; }

.post-list__excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-mid);
}

.post-list__date {
  font-size: .8125rem;
  color: var(--ink-muted);
  letter-spacing: .06em;
  white-space: nowrap;
  margin-top: .35rem;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}

.site-footer__name em {
  font-style: italic;
  color: var(--ink-mid);
}

.site-footer__contact a {
  font-size: .9375rem;
  letter-spacing: .04em;
  color: var(--ink-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: text-decoration-color .2s, color .2s;
}

.site-footer__contact a:hover {
  color: var(--ink);
  text-decoration-color: var(--rule-mid);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-header   { padding: 0 1.5rem; }
  .filter-bar    { padding: .9rem 1.5rem; }
  .projects-grid { margin: 0 0 3rem; grid-template-columns: 1fr; }
  .post-list     { padding: 0 1.5rem; }
  .page-header   { padding: 3rem 1.5rem 1.5rem; }
  .page-content  { padding: 0 1.5rem 4rem; }
  .site-footer   { padding: 1.5rem; }
  .main-navigation ul { gap: 1.5rem; }
}

@media (max-width: 520px) {
  .main-navigation { display: none; }

  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--ink);
  }

  .main-navigation.open {
    display: block;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg);
    z-index: 99;
    padding: 2.5rem 2rem;
  }

  .main-navigation.open ul {
    flex-direction: column;
    gap: 2rem;
  }

  .main-navigation.open a {
    font-size: 1.1rem;
    letter-spacing: .06em;
  }
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .project-card__thumb { transform: none !important; }
  .project-card { transform: none !important; }
  .projects-grid:has(.project-card:hover) .project-card:not(:hover) { opacity: 1; }
  .lightbox-overlay.open { animation: none !important; }
  .lightbox-inner { animation: none !important; }
}

/* ─── Single project body & tags ────────────────────────── */
.single-project__body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-mid);
  max-width: 640px;
  margin-bottom: 3rem;
}

.single-project__body p  { margin-bottom: 1.4rem; }
.single-project__body em { color: var(--ink); font-style: italic; }
.single-project__body h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  margin: 2rem 0 .6rem;
}
.single-project__body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-mid);
  transition: text-decoration-color .2s;
}
.single-project__body a:hover { text-decoration-color: var(--ink); }

.single-project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
  margin-top: 1rem;
}

.single-project__tag {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--rule-mid);
  padding: .3rem .75rem;
  border-radius: 20px;
}

/* ─── Green accents: single project page ────────────────── */
.single-project__tag:hover {
  border-color: var(--green);
  color: var(--green);
  transition: color .2s, border-color .2s;
}

/* Lightbox title uses condensed on cards, serif in lightbox — keep serif there */
.lightbox-title {
  font-family: var(--serif);
}

/* site-title hover handled above */

/* ─── Card thumb wrap ────────────────────────────────────── */
.project-card__thumb-wrap {
  position: relative;
  overflow: hidden;
  display: block;
}

/* ─── Title scan line + explore hint ────────────────────── */
.project-card__body {
  position: relative;
}

.project-card__title-wrap {
  position: relative;
  overflow: hidden;
}

/* Green scan line sweeps across the title */
.project-card__title-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent 0%, rgba(200,255,0,.12) 50%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: none;
}

.project-card:hover .project-card__title-wrap::after {
  animation: title-scan .5s ease-out forwards;
}

@keyframes title-scan {
  0%   { left: -100%; opacity: 1; }
  100% { left: 100%;  opacity: 0; }
}

/* project-card__hint defined in enter-cta block */

/* ─── Cursor blink after name ────────────────────────────── */
.site-title__cursor {
  display: inline-block;
  width: 2px;
  height: .9em;
  background: #c8ff00;
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Typewriter tagline ─────────────────────────────────── */
.site-title__tagline {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typewriter .9s steps(44, end) .3s forwards;
}

@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

/* ─── Dot grid — nearly invisible base ───────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(200,255,180,.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

/* Scan reveal — wide diffused glow, no hard center */
body::after {
  content: '';
  position: fixed;
  inset: -120% 0 auto 0;
  height: 240%;
  background: linear-gradient(
    to bottom,
    transparent             0%,
    transparent            20%,
    rgba(200,255,180,.0)   28%,
    rgba(200,255,180,.04)  34%,
    rgba(200,255,180,.09)  40%,
    rgba(200,255,180,.13)  46%,
    rgba(200,255,180,.14)  50%,
    rgba(200,255,180,.13)  54%,
    rgba(200,255,180,.09)  60%,
    rgba(200,255,180,.04)  66%,
    rgba(200,255,180,.0)   72%,
    transparent            80%,
    transparent           100%
  );
  pointer-events: none;
  z-index: 0;
  user-select: none;
  mix-blend-mode: screen;
  animation: scan-reveal 18s linear infinite;
}

@keyframes scan-reveal {
  0%   { transform: translateY(0%); }
  100% { transform: translateY(100%); }
}

.site-header,
.filter-bar,
.projects-grid,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ─── Filter pill ripple ─────────────────────────────────── */
.filter-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #c8ff00;
  border-radius: 20px;
  opacity: 0;
  transform: scale(0);
  transition: transform .35s ease, opacity .35s ease;
  pointer-events: none;
}

.filter-pill.ripple::before {
  transform: scale(2.5);
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
}

/* ─── Lightbox title typewriter ──────────────────────────── */
.lightbox-title.typing {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: lb-type .4s steps(30, end) forwards;
}

@keyframes lb-type {
  from { width: 0; }
  to   { width: 100%; }
}

/* ─── Reduced motion overrides ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .site-title__tagline { animation: none; width: 100%; }
  .site-title__cursor  { animation: none; }
  .project-card__scan  { display: none; }
  .lightbox-title.typing { animation: none; width: 100%; }
  body::before { display: none; }
}

/* glitch block removed — enter/cursor system below */

/* ═══════════════════════════════════════════════════════════
   ENTER / CURSOR SYSTEM — single authoritative block
   ═══════════════════════════════════════════════════════════ */

/* Shared blinking cursor — used after name AND in enter CTAs */
.enter-cursor {
  display: inline-block;
  width: 2px;
  height: .85em;
  background: var(--green);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

/* ── Card hint: types out "enter" + cursor on card hover ─── */
.project-card__hint {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0;
  margin-top: .65rem;
  pointer-events: none;
  white-space: nowrap;
}

.project-card__hint .hint-text {
  display: inline-block;
  overflow: hidden;
  max-width: 0;
  white-space: nowrap;
}

.project-card:hover .project-card__hint {
  opacity: 1;
}

.project-card:hover .project-card__hint .hint-text {
  animation: hint-type .7s steps(5, end) .05s forwards;
}

@keyframes hint-type {
  from { max-width: 0; }
  to   { max-width: 80px; }
}

/* ── Lightbox CTA: types out "enter" + cursor on open ────── */
.lightbox-cta {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  transition: opacity .2s;
  margin-top: .25rem;
}

.lightbox-cta:hover { opacity: .65; }

.lightbox-cta__label {
  display: inline-block;
  overflow: hidden;
  max-width: 0;
  white-space: nowrap;
  animation: cta-type .8s steps(5, end) .6s forwards;
}

@keyframes cta-type {
  from { max-width: 0; }
  to   { max-width: 80px; }
}

/* ═══════════════════════════════════════════════════════════
   ANIMATED DOT GRID
   ═══════════════════════════════════════════════════════════ */


/* ── Reduced motion overrides ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .enter-cursor        { animation: none; opacity: 1; }
  .lightbox-cta__label { max-width: 80px; animation: none; }
  .project-card__hint .hint-text { max-width: 80px; animation: none; }
  body::before         { animation: none; }
  body::after          { display: none; }
  body::before         { background-image: radial-gradient(circle, rgba(200,255,180,.10) 1px, transparent 1px); }
}

/* ═══════════════════════════════════════════════════════════
   SINGLE PROJECT PAGE
   ═══════════════════════════════════════════════════════════ */

.sp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 3rem 6rem;
}

/* Back link */
.sp-back {
  margin-bottom: 2rem;
}

.sp-back a {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .6;
  text-decoration: none;
  transition: opacity .2s;
  position: relative;
  padding-bottom: 2px;
}

.sp-back a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  transition: width .25s ease;
}

.sp-back a:hover { opacity: 1; }
.sp-back a:hover::after { width: 100%; }

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

.sp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .75rem;
}

.sp-cat {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .6;
}

.sp-cat + .sp-cat::before {
  content: '·';
  margin-right: .4rem;
  opacity: .4;
}

.sp-title {
  font-family: var(--condensed);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.0;
  color: var(--ink);
}

/* Body — description left, details right */
.sp-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  margin-bottom: 3rem;
  align-items: start;
}

/* Description */
.sp-description {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-mid);
}

.sp-description p {
  margin-bottom: 1.4rem;
}

.sp-description p:last-child {
  margin-bottom: 0;
}

.sp-description em {
  color: var(--ink);
  font-style: italic;
}

.sp-description a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-mid);
  transition: text-decoration-color .2s;
}

.sp-description a:hover {
  text-decoration-color: var(--ink);
}

/* Embedded media in description — full natural width */
.sp-description img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
}

.sp-description iframe,
.sp-description video {
  max-width: 100%;
  display: block;
  margin: 1.5rem 0;
}

.sp-description audio {
  width: 100%;
  margin: 1rem 0;
}

/* WordPress gallery inside description */
.sp-description .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 1.5rem 0;
}

.sp-description .gallery-item {
  margin: 0;
}

.sp-description .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}

/* Details sidebar — archival label/value pairs */
.sp-details {
  border-left: 1px solid var(--rule);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sp-detail__label {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .55;
  margin-bottom: .3rem;
}

.sp-detail__value {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--ink-mid);
}

.sp-detail__value a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-mid);
  transition: text-decoration-color .2s;
}

.sp-detail__value a:hover {
  text-decoration-color: var(--green);
}

/* Tags at bottom */
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.sp-tag {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--rule-mid);
  padding: .28rem .7rem;
  border-radius: 20px;
  transition: color .2s, border-color .2s;
}

.sp-tag:hover {
  color: var(--green);
  border-color: var(--green);
}

/* Bottom nav */
.sp-nav-bottom {
  padding-top: 1rem;
}

.sp-back-link {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .6;
  text-decoration: none;
  transition: opacity .2s;
  position: relative;
  padding-bottom: 2px;
}

.sp-back-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  transition: width .25s ease;
}

.sp-back-link:hover { opacity: 1; }
.sp-back-link:hover::after { width: 100%; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sp-wrap {
    padding: 1.5rem 1.5rem 4rem;
  }

  .sp-body {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .sp-details {
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 2rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM AUDIO PLAYER
   ═══════════════════════════════════════════════════════════ */
.audio-section-label {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .55;
  margin: 2rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(200,255,180,.06);
}

.audio-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .2s, transform .15s;
}

.audio-play:hover  { opacity: .85; transform: scale(1.08); }
.audio-play:active { transform: scale(.95); }

.audio-play svg {
  width: 10px;
  height: 10px;
  fill: var(--green-dark);
  margin-left: 2px;
}

.audio-play.playing svg { margin-left: 0; }

.audio-track-label {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mid);
  min-width: 80px;
  flex-shrink: 0;
}

.audio-progress-wrap {
  flex: 1;
  height: 2px;
  background: rgba(200,255,180,.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height .15s;
}

.audio-progress-wrap:hover { height: 3px; }

.audio-progress {
  height: 100%;
  width: 0%;
  background: var(--green);
  border-radius: 2px;
  pointer-events: none;
}

.audio-time {
  font-size: .65rem;
  color: var(--ink-muted);
  letter-spacing: .04em;
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Photos same width on project pages ─────────────────── */
.sp-description img {
  width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

/* ─── Style WordPress native audio player ───────────────── */
.wp-audio-shortcode,
audio {
  width: 100% !important;
  height: 36px !important;
  border-radius: 0 !important;
  background: var(--bg-card) !important;
  margin: .25rem 0 !important;
  display: block !important;
}

.mejs-container,
.mejs-container * {
  background: var(--bg-card) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.mejs-controls {
  background: var(--bg-card) !important;
  height: 36px !important;
  padding: 0 8px !important;
}

.mejs-playpause-button button,
.mejs-volume-button button {
  color: var(--green) !important;
}

.mejs-time-rail .mejs-time-total {
  background: rgba(200,255,180,.1) !important;
  border-radius: 2px !important;
  height: 2px !important;
  margin-top: 8px !important;
}

.mejs-time-rail .mejs-time-current {
  background: var(--green) !important;
  border-radius: 2px !important;
  height: 2px !important;
}

.mejs-time-rail .mejs-time-loaded {
  background: rgba(200,255,180,.15) !important;
  height: 2px !important;
}

.mejs-currenttime,
.mejs-duration {
  color: var(--ink-mid) !important;
  font-size: .65rem !important;
  font-family: var(--sans) !important;
}

.mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
  background: rgba(200,255,180,.1) !important;
  height: 2px !important;
  border-radius: 2px !important;
}

.mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
  background: var(--green) !important;
  height: 2px !important;
  border-radius: 2px !important;
}

/* Hide the section labels that are now just text */
.audio-section-label {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .55;
  margin: 2rem 0 .5rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
  display: block;
}

/* ─── Audio grid — 3 columns ─────────────────────────────── */
.audio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.audio-grid-item {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.audio-grid-item .audio-grid-label {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .6;
}

.audio-grid-item audio,
.audio-grid-item .wp-audio-shortcode {
  width: 100% !important;
  min-width: 0 !important;
}

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

/* ═══════════════════════════════════════════════════════════
   BIO PAGE
   ═══════════════════════════════════════════════════════════ */
.bio-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 3rem 6rem;
}

.bio-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
  align-items: start;
}

.bio-headshot {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  filter: grayscale(20%);
}

.bio-name {
  font-family: var(--condensed);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--green);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.bio-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-mid);
}

.bio-body p { margin-bottom: 1.4rem; }
.bio-body p:last-child { margin-bottom: 0; }
.bio-body em { color: var(--ink); font-style: italic; }
.bio-body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-mid);
  transition: text-decoration-color .2s;
}
.bio-body a:hover { text-decoration-color: var(--green); }

@media (max-width: 768px) {
  .bio-wrap { padding: 2rem 1.5rem 4rem; }
  .bio-grid { grid-template-columns: 1fr; gap: 2rem; }
  .bio-headshot { max-width: 200px; }
}

/* ═══════════════════════════════════════════════════════════
   WRITING PAGE
   ═══════════════════════════════════════════════════════════ */
.writing-list {
  max-width: 860px;
}

.writing-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.writing-item:first-child { border-top: 1px solid var(--rule); }

.writing-thumb {
  width: 100%;
  display: block;
  filter: grayscale(20%);
  opacity: .8;
}

.writing-meta {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.writing-citation {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--ink-mid);
}

.writing-citation strong {
  color: var(--ink);
  font-weight: 500;
}

.writing-citation a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-mid);
  transition: text-decoration-color .2s;
}
.writing-citation a:hover { text-decoration-color: var(--green); }

.writing-abstract {
  font-size: .875rem;
  line-height: 1.7;
  color: var(--ink-muted);
  padding-left: 1rem;
  border-left: 2px solid rgba(200,255,0,.2);
}

@media (max-width: 600px) {
  .writing-item { grid-template-columns: 1fr; gap: 1rem; }
  .writing-thumb { max-width: 120px; }
}

/* ═══════════════════════════════════════════════════════════
   REVIEWS PAGE
   ═══════════════════════════════════════════════════════════ */
.reviews-list {
  max-width: 760px;
}

.review-project {
  margin-bottom: 3.5rem;
}

.review-project-title {
  font-family: var(--condensed);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green);
  opacity: .8;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
}

.review-item {
  margin-bottom: 1.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid rgba(200,255,0,.15);
}

.review-quote {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-mid);
  font-style: italic;
  margin-bottom: .5rem;
}

.review-source {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.review-source a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: color .2s, text-decoration-color .2s;
}
.review-source a:hover {
  color: var(--green);
  text-decoration-color: var(--green);
}
