/* ============================================================
   Kelly Cockrell — portfolio redesign preview
   Direction: "Photographs at uneven sizes" (gallery wall)
   Type: DM Sans (brand) · Accent: brand blue #00AEEF
   ============================================================ */

:root {
  --ground: #F4F4F2;
  --surface: #FFFFFF;
  --ink: #191C1F;
  --soft: #454C54;
  --accent: #00AEEF;
  --margin: clamp(20px, 6vw, 96px);
  --gutter: clamp(12px, 1.4vw, 24px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  background: var(--ground);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Navigation ---------- */

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px var(--margin) 0;
  font-size: 16px;
}

.nav-wordmark {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
}

.nav-link { text-decoration: none; }
.nav-link:hover { color: var(--accent); }
.nav-action { font-weight: 500; }

/* ---------- Hero: full-screen slider ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  padding: 76px 0 0;
  display: flex;
  flex-direction: column;
}

.hero-slider {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 400ms var(--ease) 40ms;
}
body.loaded .hero-slider { opacity: 1; }

/* neutral scrim so the overlaid type reads on any photograph (the one allowed exception) */
.hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(13, 16, 18, 0.72) 0%, rgba(13, 16, 18, 0.28) 34%, rgba(13, 16, 18, 0) 62%); /* taste-skill-ignore: neutral scrim under text on a photo */
  pointer-events: none;
}

.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 350ms var(--ease);
}
.slide.is-active { opacity: 1; }
.slide img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.slide.is-active img {
  animation: drift 6.5s ease-out forwards;
}
@keyframes drift {
  from { transform: scale(1.04); }
  to { transform: scale(1.11); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.hero-title {
  position: absolute;
  left: var(--margin);
  bottom: 56px;
  font-weight: 300;
  font-size: clamp(72px, 9vw, 136px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.hero-title .line { display: block; overflow: hidden; }
.hero-title .line-2 { padding-left: 0.45em; }

.line-inner {
  display: block;
  transform: translateY(112%);
  transition: transform 600ms var(--ease);
}
body.loaded .line-inner { transform: translateY(0); }
body.loaded .line-2 .line-inner { transition-delay: 80ms; }

.slider-ui {
  position: absolute;
  top: 20px; right: var(--margin);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(247, 245, 241, 0.9);
}

.s-btn {
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink);
  padding: 2px 4px;
}
.s-btn:hover { color: var(--accent); }

.s-dots { display: flex; gap: 8px; }
.s-dot {
  width: 9px; height: 9px;
  border: none;
  border-radius: 50%;
  background: #C9CBC8;
  cursor: pointer;
  transition: background 200ms;
}
.s-dot.is-active { background: var(--accent); }

.hero-copy {
  position: absolute;
  right: var(--margin);
  bottom: 64px;
  z-index: 3;
  width: min(340px, 34%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero-sentence {
  font-size: 20px;
  color: #FFFFFF;
  max-width: 36ch;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease) 240ms, transform 500ms var(--ease) 240ms;
}
body.loaded .hero-sentence { opacity: 1; transform: none; }

.hero-cta {
  display: inline-block;
  background: var(--ground);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  padding: 15px 28px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease) 620ms, transform 700ms var(--ease) 620ms, background 200ms;
}
body.loaded .hero-cta { opacity: 1; transform: none; }
.hero-cta:hover { background: var(--accent); color: #fff; }

/* ---------- Sections shared ---------- */

section { padding-left: var(--margin); padding-right: var(--margin); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Work ---------- */

.work { padding-top: 140px; }

.work-heading {
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.02em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
}

.filter {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  color: var(--soft);
  padding: 4px 0;
}
.filter.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.scatter {
  margin-top: 40px;
  column-count: 3;
  column-gap: var(--gutter);
}

/* masonry: each piece keeps its own shape, stacked in three columns */
.item {
  position: relative;
  break-inside: avoid;
  margin: 0 0 calc(var(--gutter) * 1.75);
}

.remark {
  break-inside: avoid;
  margin: 0 0 calc(var(--gutter) * 1.75);
  font-size: 20px;
  line-height: 1.4;
  max-width: 30ch;
  padding-top: 8px;
}

/* hover: the caption rises into a white plate centred on the image */
.item-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: rgba(247, 246, 243, 0.94);
  opacity: 0;
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}
.item:hover .item-overlay,
.item:focus-within .item-overlay { opacity: 1; }

.item-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}

.item-btn {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  cursor: zoom-in;
  background: none;
  overflow: hidden;
}
.item-btn img {
  width: 100%;
  height: auto;
  transition: transform 600ms var(--ease);
}
.item-btn:hover img { transform: scale(1.03); }

.item-desc {
  font-size: 15px;
  color: var(--soft);
}

.item.is-hidden { display: none; }

/* ---------- About ---------- */

.about { padding-top: 200px; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); }

.about-heading {
  grid-column: 1 / 13;
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.02em;
}

.about-lead {
  grid-column: 1 / 7;
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.5;
  max-width: 46ch;
}

.about-tiles {
  grid-column: 1 / 13;
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  align-items: start;
}

.about-photo {
  grid-column: 1 / 9;
  position: relative;
}
.about-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.about-note {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 44%);
  background: var(--ground);
  padding: 20px;
  font-size: 16px;
  line-height: 1.5;
}

.about-tile {
  grid-column: 9 / 13;
  background: var(--accent);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0B3B52;
}

.nm-outline { width: 62%; }

.about-facts {
  grid-column: 9 / 13;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
.fact dt { font-size: 14px; color: var(--soft); }
.fact dd { font-size: 14px; margin-top: 2px; }

/* ---------- Contact ---------- */

.contact {
  margin-top: 200px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  align-items: start;
}

.contact-sentence {
  grid-column: 1 / 7;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 20ch;
}

.contact-portrait {
  grid-column: 8 / 10;
}
.contact-portrait img {
  width: min(170px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.contact-links { grid-column: 10 / 13; }
.contact-question { font-size: 20px; font-weight: 500; }
.contact-link {
  display: block;
  margin-top: 20px;
  font-size: 20px;
  text-decoration: underline;
  text-underline-offset: 4px;
  word-break: break-word;
}
.contact-link:hover { color: var(--accent); }
.contact-meta { margin-top: 24px; font-size: 14px; color: var(--soft); }

/* ---------- Footer ---------- */

.footer {
  margin-top: 120px;
  background: var(--ink);
  color: #FFFFFF;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--margin);
  overflow: hidden;
}

.footer-name {
  flex: 1;
  display: flex;
  align-items: center;
  font-weight: 250;
  font-size: min(20vw, 28vh);
  line-height: 0.98;
  letter-spacing: -0.03em;
  white-space: normal;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  padding: 40px 0 48px;
  font-size: 14px;
  color: #C9CBC8;
}

.footer-social { display: flex; gap: 24px; }
.footer-social a { color: #C9CBC8; text-decoration: none; }
.footer-social a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 250ms ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 18, 0.93);
}

.lb-figure {
  position: relative;
  z-index: 2;
  max-width: min(1100px, 88vw);
  text-align: center;
}
.lb-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
}
.lb-caption {
  margin-top: 16px;
  font-size: 15px;
  color: #E8E6E1;
}

.lb-btn {
  position: absolute;
  z-index: 3;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  width: 52px; height: 52px;
  cursor: pointer;
  transition: background 200ms;
}
.lb-btn:hover { background: var(--accent); }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 20px; top: 20px; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line-inner, .hero-slider, .hero-sentence, .reveal { transition: none; transform: none; opacity: 1; }
  .slide.is-active img { animation: none; }
  .item-btn img { transition: none; }
}

/* ---------- Phone ---------- */

@media (max-width: 760px) {

  .nav { padding-top: 20px; }
  .nav-wordmark { font-size: 14px; letter-spacing: 0.08em; }

  .hero { min-height: 0; height: auto; padding-top: 76px; overflow: visible; display: flex; flex-direction: column; }

  .hero-slider {
    position: relative;
    height: auto;
    aspect-ratio: 4 / 5;
    width: 100%;
    margin: 0;
    opacity: 1;
  }
  .slides { position: absolute; inset: 0; }
  .slide { position: absolute; inset: 0; }

  .slider-ui {
    top: 16px; right: 16px;
  }

  .hero-title {
    left: 20px;
    right: 20px;
    bottom: 24px;
    font-size: 15vw;
  }

  .hero-copy {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 24px;
    width: auto;
    gap: 16px;
  }

  .hero-title {
    bottom: 188px;
  }

  .hero-sentence {
    max-width: none;
    font-size: 18px;
    color: #FFFFFF;
    opacity: 1; transform: none;
  }

  .hero-cta {
    opacity: 1; transform: none;
  }

  .work { padding-top: 96px; }

  .scatter { column-count: 2; }
  .remark { font-size: 17px; padding-top: 0; }

  .about { padding-top: 120px; display: block; }
  .about-lead { margin-top: 20px; }
  .about-tiles { margin-top: 48px; display: block; }
  .about-note { position: static; width: 100%; margin-top: 16px; }
  .about-tile { margin-top: 16px; aspect-ratio: 4 / 3; }
  .about-facts { margin-top: 24px; }

  .contact { margin-top: 120px; display: block; }
  .contact-sentence { max-width: none; font-size: 24px; }
  .contact-portrait { margin-top: 40px; }
  .contact-links { margin-top: 28px; }
  .contact-question { font-size: 18px; font-weight: 500; }
  .contact-link { font-size: 17px; margin-top: 16px; }
  .contact-meta { margin-top: 20px; max-width: 22ch; }

  .footer { margin-top: 120px; min-height: 0; }
  .footer-name { white-space: normal; font-size: 15vw; }

  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* very narrow phones: one wide column so the work stays large */
@media (max-width: 560px) {
  .scatter { column-count: 1; }
}

/* ---------- WordPress extras ---------- */

/* The custom logo, if one is uploaded, sits in the wordmark link. */
.nav-wordmark img {
  max-height: 36px;
  width: auto;
}

/* Generic page and post content. */
.page-content {
  margin-top: 40px;
  max-width: 70ch;
  font-size: 18px;
}
.page-content a { color: var(--accent); }
.page-content h2, .page-content h3 { margin: 1.6em 0 0.5em; letter-spacing: -0.01em; }
.page-content p { margin-top: 1em; }
.page-content img { border-radius: 0; }

.single-thumb { margin-top: 40px; max-width: 900px; }
.single-thumb img { width: 100%; height: auto; }

/* Sticky posts, gallery and captions keep the theme's calm look. */
.page-content .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: 2em; }
.page-content figure { margin-top: 2em; }
.page-content figcaption { font-size: 14px; color: var(--soft); margin-top: 8px; }

/* Password form and search form inherit the button style. */
.page-content input[type="email"],
.page-content input[type="text"],
.page-content input[type="url"],
.page-content textarea {
  border: 1px solid #C9CBC8;
  background: var(--surface);
  font: inherit;
  padding: 12px 14px;
  width: 100%;
  max-width: 420px;
}
.page-content button,
.page-content input[type="submit"] {
  border: none;
  background: var(--ink);
  color: var(--ground);
  font: inherit;
  padding: 14px 26px;
  cursor: pointer;
}
