/* Siân A. Williams — personal portfolio
   Edit this file in Atom. The grid switches from two columns to one
   column on smaller screens. */

:root {
  color-scheme: dark;
  --background: #080808;
  --surface: #171717;
  --text: #f2f0ec;
  --muted: #92908c;
  --line: #292929;
  --accent: #d8d3c9;
  --page-width: 1440px;
  --page-gutter: clamp(20px, 5vw, 76px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 5px;
}

.site-header,
main,
.site-footer {
  width: min(100% - (var(--page-gutter) * 2), var(--page-width));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .105em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
}

.main-nav a,
.eyebrow,
.site-footer,
.project-meta p,
.text-link {
  font-size: 10px;
  letter-spacing: .13em;
  font-weight: 500;
}

.main-nav a {
  color: var(--muted);
  transition: color .2s ease;
}

.main-nav a:hover,
.site-footer a:hover,
.text-link:hover {
  color: var(--text);
}

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(66px, 9vw, 130px) 0 clamp(34px, 5vw, 65px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
}

.intro h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 400;
}

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

.intro-note {
  max-width: 245px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 36px);
  row-gap: clamp(38px, 5vw, 70px);
}

.project {
  min-width: 0;
}

.project-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface);
}

.project-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .65, .3, 1), opacity .3s ease;
}

.project-image:hover img {
  transform: scale(1.025);
}

.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #777;
  font-size: 9px;
  letter-spacing: .18em;
}

.project-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
}

.project-meta h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .075em;
}

.project-meta h2 a:hover {
  color: var(--muted);
}

.project-meta p {
  margin: 0;
  color: var(--muted);
  text-align: right;
  letter-spacing: .045em;
  font-size: 9px;
}

.project-meta p span {
  padding-inline: 4px;
}

.about-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-top: clamp(100px, 15vw, 210px);
  padding: 35px 0 clamp(90px, 12vw, 160px);
  border-top: 1px solid var(--line);
}

.about-section > .eyebrow {
  margin-top: 7px;
}

.about-copy {
  max-width: 700px;
}

.about-copy h2 {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: clamp(25px, 3.5vw, 43px);
  line-height: 1.15;
  letter-spacing: -.04em;
  font-weight: 400;
}

.about-copy > p {
  max-width: 570px;
  margin: 0 0 27px;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 1px solid #555;
  transition: color .2s ease, border-color .2s ease;
}

.text-link span {
  padding-left: 8px;
}

.site-footer {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  transition: color .2s ease;
}

@media (max-width: 700px) {
  :root {
    --page-gutter: 20px;
  }

  .site-header {
    min-height: 76px;
  }

  .wordmark {
    font-size: 14px;
  }

  .main-nav {
    gap: 15px;
  }

  .main-nav a {
    font-size: 9px;
  }

  .intro {
    display: block;
    padding-top: 75px;
    padding-bottom: 34px;
  }

  .intro-note {
    margin-top: 18px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    row-gap: 38px;
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .project-meta p {
    text-align: left;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 100px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 22px;
    gap: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Individual project pages */
.project-main {
  width: min(100% - (var(--page-gutter) * 2), 1080px);
  margin-inline: auto;
}
.back-link {
  display: inline-block;
  margin-top: 34px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
  transition: color .2s ease;
}
.back-link:hover { color: var(--text); }
.project-intro {
  padding: clamp(65px, 10vw, 125px) 0 clamp(48px, 7vw, 85px);
}
.project-intro .eyebrow { margin-bottom: 18px; }
.project-intro h1 {
  margin: 0;
  font-size: clamp(48px, 9vw, 112px);
  line-height: .95;
  letter-spacing: -.07em;
  font-weight: 400;
}
.project-subtitle {
  max-width: 700px;
  margin: 25px 0 0;
  color: var(--accent);
  font-size: clamp(18px, 2.5vw, 27px);
  line-height: 1.3;
  letter-spacing: -.025em;
}
.project-opening { max-width: 680px; margin-top: 28px; }
.project-opening p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}
.project-video, .project-gallery { width: 100%; }
.project-video { margin-bottom: clamp(24px, 4vw, 48px); }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3.5vw, 46px);
}
.project-figure { width: 100%; margin: 0; }
.project-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
}
.project-figure figcaption {
  padding-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.archive-image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.project-footer { margin-top: clamp(80px, 12vw, 150px); }
@media (max-width: 700px) {
  .project-main { width: calc(100% - 40px); }
  .project-intro { padding-top: 65px; }
  .project-opening p { font-size: 14px; }
}
