/* Elena Schwartz — personal journalism site */

:root {
  --bg: #f6f0e6;
  --ink: #1a1416;
  --muted: #4a4044;
  --accent: #6d3450;
  --rule: #d4c8bc;
  --space: clamp(1.15rem, 5vw, 3.25rem);
  --display-font: "Space Grotesk", system-ui, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img,
audio,
video {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  top: 0.75rem;
}

.site-header {
  padding: clamp(2.5rem, 8vh, 5.5rem) var(--space) 2.5rem;
}

.header-inner {
  max-width: 72rem;
}

.site-name {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(2.8rem, 12vw, 8rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.site-name > span {
  display: block;
  height: 1.02em;
  white-space: nowrap;
}

.site-name .name-text {
  display: inline-block;
  line-height: 1.02;
  vertical-align: top;
  transform-origin: left center;
}

.site-name[data-font="barlow"] .name-text {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
}

.site-name[data-font="syne"] .name-text {
  font-family: "Syne", sans-serif;
  font-weight: 700;
}

.site-name[data-font="terminal"] .name-text {
  font-family: "VT323", monospace;
  font-weight: 400;
}

.last-name {
  color: var(--accent);
  padding-left: 0.08em;
}

.header-bar {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-top: 1.75rem;
}

.intro {
  margin: 0;
  max-width: 16rem;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.12rem;
}

.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-nav a:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-bottom-color: transparent;
}

.section {
  padding: clamp(2.75rem, 8vw, 5.5rem) var(--space);
  scroll-margin-top: 1rem;
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.section-inner {
  max-width: 72rem;
}

.section-heading {
  margin: 0 0 1.25rem;
  font-family: var(--display-font);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.section-lede,
.about-bio,
.contact-line,
.project-summary {
  max-width: 38rem;
}

.section-lede {
  margin: 0 0 2.25rem;
  color: var(--muted);
}

/*
  Reserved for later: a playable excerpt and a transcript link.
  Add markup inside each .project:

  <div class="project-audio">...</div>
  <p class="project-transcript"><a href="...">Transcript</a></p>
*/
.project-audio {
  margin-top: 1.1rem;
}

.project-audio audio {
  display: block;
  width: 100%;
}

.project-transcript {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.about-bio {
  margin: 0;
  font-size: 1.125rem;
}

.subheading {
  margin: 2rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-outlets ul {
  margin: 0;
  padding: 0;
  max-width: 22rem;
  list-style: none;
}

.about-outlets li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.contact-line {
  margin: 0;
  font-size: 1.2rem;
}

.placeholder {
  color: var(--muted);
}

@media (min-width: 760px) {
  .last-name {
    padding-left: 11vw;
  }

  .header-bar {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2.25rem;
    padding-left: 11vw;
  }

  .section-inner {
    display: grid;
    grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
    column-gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
  }

  .section-heading {
    margin: 0.15rem 0 0;
  }

  .about-outlets {
    margin-left: 12%;
  }
}

@media (min-width: 1100px) {
  .last-name {
    padding-left: 14vw;
  }

  .header-bar {
    padding-left: 14vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Biography paragraphs and long contact addresses. */
.about-bio p {
  margin: 0 0 1.1rem;
}
.about-bio p:last-child {
  margin-bottom: 0;
}
.contact-line a {
  overflow-wrap: anywhere;
}

/* Selected work: square artwork, with complete text below on touch devices. */
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 1.5rem;
}
.project-card {
  min-width: 0;
}
.project-tile {
  display: flex;
  flex-direction: column;
  position: relative;
  color: var(--ink);
  text-decoration: none;
}
.project-tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}
.tile-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--rule);
}
.tile-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
#the-call .tile-art img {
  object-position: 58% center;
}
.tile-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 0 0;
}
.tile-title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}
.tile-description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.tile-listen {
  font-family: var(--display-font);
  font-size: 0.95rem;
  color: var(--accent);
}
@media (min-width: 640px) {
  .work-grid {
    /* Keep the original tile size and fit up to three across the available space. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 23rem));
    max-width: 72rem;
  }
}
/* Hover-capable computers reveal text over the image. Keyboard focus does too. */
@media (hover: hover) and (pointer: fine) and (min-width: 760px) {
  .work-grid {
    gap: 1.5rem;
  }
  .tile-copy {
    position: absolute;
    inset: 0;
    justify-content: safe center;
    padding: clamp(1rem, 2vw, 1.75rem);
    color: var(--bg);
    background: rgba(26, 20, 22, 0.94);
    opacity: 0;
    overflow-y: auto;
    transition: opacity 140ms ease;
  }
  .tile-listen {
    color: inherit;
  }
  .project-tile:hover .tile-copy,
  .project-tile:focus-visible .tile-copy {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile-copy {
    transition: none;
  }
}

/* Let Selected Work use the available right-hand space without moving its left edge. */
.work-section .section-inner {
  max-width: none;
}

/* Publisher marks are separate overlays, so the source photos stay intact. */
.tile-art .tile-logo {
  position: absolute;
  display: block;
  width: 28%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}
.tile-logo-the-call {
  top: 4%;
  left: 4%;
}
.tile-art .tile-logo-bryce-canyon {
  width: 26%;
  right: 4%;
  bottom: 4%;
}
