/* Cory Dearie Custom Archive — draft portfolio */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #5c5c5c;
  --faint: #8a8a8a;
  --line: #e6e6e6;
  --max: 1220px;
  --gap: 1.35rem;
  --pad: clamp(1.25rem, 4vw, 2.75rem);
  --serif: "Cormorant Garamond", "Iowan Old Style", "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-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover { color: #000; }

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.85rem;
  z-index: 100;
}
.skip:focus { top: 0.75rem; }

/* Header
   -------------------------------------------------- */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.25rem, 6vw, 4.5rem) var(--pad) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 4.85rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.wordmark .archive {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}

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

/* Gallery
   -------------------------------------------------- */
#work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(4rem, 10vw, 7rem);
}

.gallery {
  columns: 1;
  column-gap: var(--gap);
}

.work {
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 var(--gap);
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.work img {
  width: 100%;
  background: #f3f3f3;
  transition: opacity 0.2s ease;
}

.work:hover img,
.work:focus-visible img {
  opacity: 0.88;
}

.work:focus-visible {
  outline-offset: 4px;
}

@media (min-width: 640px) {
  .gallery { columns: 2; }
}

@media (min-width: 1024px) {
  .gallery { columns: 3; }
}

/* About
   -------------------------------------------------- */
#about {
  border-top: 1px solid var(--line);
  padding: clamp(4rem, 10vw, 7rem) var(--pad);
}

.about-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 2.5rem 4rem;
}

@media (min-width: 880px) {
  .about-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    align-items: start;
  }
}

.section-label {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.about-copy p {
  margin: 0 0 1.15rem;
  max-width: 38rem;
  color: #1c1c1c;
}

.about-copy p:last-child { margin-bottom: 0; }

.pullquote {
  margin: 0.25rem 0 0;
  padding: 0;
  border: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.pullquote footer {
  margin-top: 1rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0;
  padding: 0;
}

/* Contact
   -------------------------------------------------- */
#contact {
  border-top: 1px solid var(--line);
  padding: clamp(3.5rem, 8vw, 5.5rem) var(--pad);
  text-align: center;
}

#contact .section-label { margin-bottom: 1rem; }

.contact-copy {
  margin: 0 auto 1.15rem;
  max-width: 28rem;
  color: #1c1c1c;
}

.instagram-link {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

/* Footer
   -------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem var(--pad) 2.25rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--faint);
}

/* Lightbox
   -------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 10, 10, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.25rem 2rem;
  color: #fff;
}

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

.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-figure img {
  max-height: min(82vh, 900px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: transparent;
}

.lightbox-caption {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d8d8d8;
  max-width: 36rem;
}

.lightbox-caption a {
  color: #fff;
  margin-left: 0.4rem;
}

.lightbox-btn {
  position: absolute;
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-family: var(--sans);
  padding: 0.6rem;
  line-height: 1;
}

.lightbox-close {
  top: 0.65rem;
  right: 0.65rem;
  font-size: 1.85rem;
  width: 2.75rem;
  height: 2.75rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.25rem;
  width: 2.75rem;
  height: 3rem;
  color: #eee;
}

.lightbox-prev { left: 0.15rem; }
.lightbox-next { right: 0.15rem; }

.lightbox-btn:hover { color: #fff; }

@media (max-width: 639px) {
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 0.35rem;
    transform: none;
    font-size: 1.85rem;
  }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox {
    padding: 3.25rem 1rem 3.75rem;
  }
}

body.lightbox-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work img { transition: none; }
}
