/* David Wen portfolio, draft static site */

:root {
  --bg: #f6f4f0;
  --paper: #fffcf8;
  --ink: #161616;
  --muted: #5a5a5a;
  --line: #ddd9d2;
  --accent: #161616;
  --max: 72rem;
  --gap: 1.25rem;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
}

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

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  text-decoration: underline;
}

/* Hero */

.hero {
  display: grid;
  gap: 1.75rem;
  padding: 1.25rem 1rem 3.5rem;
}

.hero-photo img {
  width: 100%;
  background: #e8e4de;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  font-size: clamp(3.25rem, 14vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.hero-role {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
}

.hero-bio {
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-rule {
  width: 3rem;
  height: 1px;
  background: var(--ink);
  border: 0;
  margin: 0.15rem 0;
}

/* Stats */

.stats {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--line);
}

.stats h2,
.portfolio h2,
.credits h2,
.contact h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.75rem;
}

.stats dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.stats dl div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 0.85rem 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.stats dt {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.3;
}

.span-2 {
  grid-column: 1 / -1;
}

/* Portfolio */

.portfolio {
  padding: 3rem 0 4rem;
}

.featured {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.featured-photo {
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.featured-photo img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(46rem, 86vh);
}

.featured-copy h3 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0.35rem 0 0.75rem;
}

.featured-copy p {
  max-width: 28rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.shot {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e8e4de;
  aspect-ratio: 3 / 4;
  text-decoration: none;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  transition: transform 0.5s ease;
}

.shot:hover img,
.shot:focus-visible img {
  transform: scale(1.03);
}

.shot:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Credits */

.credits {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--line);
}

.lead-credit {
  margin-bottom: 2rem;
}

.lead-credit p:last-child {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  line-height: 1.25;
  max-width: 28rem;
  margin-top: 0.4rem;
}

.credit-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.credit-list li {
  padding: 0.85rem 0.75rem 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

/* Contact */

.contact {
  padding: 3rem 0 4.5rem;
  border-top: 1px solid var(--line);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.3;
}

.contact-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  width: fit-content;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  border-bottom-color: var(--ink);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 12, 0.94);
  color: #f6f4f0;
  padding: 3.5rem 3rem 4.5rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: min(96vw, 1100px);
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.15rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #d6d2cc;
  padding: 0 1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: #f6f4f0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
}

.lightbox-close {
  top: 0.6rem;
  right: 0.6rem;
  font-size: 1.7rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev {
  left: 0.25rem;
}

.lightbox-next {
  right: 0.25rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

body.lightbox-open {
  overflow: hidden;
}

@media (min-width: 720px) {
  .wrap,
  .nav {
    width: min(100% - 3.5rem, var(--max));
  }

  .hero {
    grid-template-columns: 1.05fr 1fr;
    gap: 3.5rem;
    padding: 3rem 0 5.5rem;
    align-items: center;
    width: min(100% - 3.5rem, var(--max));
    margin-inline: auto;
  }

  .stats,
  .portfolio,
  .credits,
  .contact {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }

  .stats dl {
    grid-template-columns: repeat(4, 1fr);
  }

  .span-2 {
    grid-column: span 2;
  }

  .featured {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }

  .credit-list {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links {
    gap: 1.5rem;
  }
}

@media (min-width: 1100px) {
  .hero h1 {
    font-size: 7rem;
  }

  .stats dl div {
    padding-right: 1.25rem;
  }
}

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

  .shot img {
    transition: none;
  }
}
