/* =============================================================
   Shawn Wang — Portfolio
   A warm, minimal gallery frame. The photos carry the color;
   the interface stays quiet.
   ============================================================= */

:root {
  --bg:        #f6f3ee;   /* warm paper            */
  --bg-2:      #efe9df;   /* slightly deeper paper */
  --ink:       #1c1a17;   /* warm near-black       */
  --muted:     #8a8377;   /* soft taupe            */
  --line:      rgba(28, 26, 23, 0.14);
  --line-soft: rgba(28, 26, 23, 0.08);

  /* Off-White / Virgil Abloh visual language: Helvetica throughout,
     headers in Helvetica Bold uppercase. */
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad: clamp(20px, 5vw, 72px);   /* page side padding */
  --maxw: 1400px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; font-weight: 400; }

/* ---------- shared bits ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* =============================================================
   HEADER
   ============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.wordmark {
  font-size: 17px;
  letter-spacing: 0.03em;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  gap: 0.4em;
}
.wordmark__thin { font-weight: 700; color: var(--muted); }
.nav {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav a {
  position: relative;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  height: min(92vh, 900px);
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  animation: heroIn 1.4s var(--ease) both;
}
@keyframes heroIn {
  from { transform: scale(1.06); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,18,15,0.10) 0%, rgba(20,18,15,0) 30%, rgba(20,18,15,0.45) 100%);
}
.hero__scroll {
  position: absolute;
  right: var(--pad);
  bottom: clamp(40px, 7vw, 90px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px; height: 46px;
  background: rgba(255,255,255,0.6);
  animation: scrollPulse 2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1;   }
}

/* =============================================================
   WORK
   ============================================================= */
.work {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 12vw, 150px) var(--pad) clamp(40px, 8vw, 90px);
}
/* Staggered grid: right column drops down for rhythm. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 3.4vw, 56px);
  align-items: start;
}
.gallery .shot:nth-child(even) {
  transform: translateY(clamp(30px, 9vw, 120px));
}

.shot {
  margin: 0;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-2);
}
.shot img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
  will-change: transform;
}
.shot:hover img { transform: scale(1.04); }

/* =============================================================
   ABOUT
   ============================================================= */
.about {
  border-top: 1px solid var(--line);
  padding: clamp(70px, 12vw, 150px) var(--pad);
}
.about__inner { max-width: var(--maxw); margin: 0 auto; }
.about__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 3.2rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin: 1rem 0 2rem;
}
.about__body {
  max-width: 56ch;
  color: #40392f;
  margin: 0 0 1.2rem;
}

/* =============================================================
   CONTACT
   ============================================================= */
.contact {
  border-top: 1px solid var(--line);
  padding: clamp(70px, 12vw, 160px) var(--pad);
  text-align: center;
}
.contact__inner { max-width: 760px; margin: 0 auto; }
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0.8rem 0 1.8rem;
}
.contact__email {
  display: inline-block;
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 0.3s var(--ease);
}
.contact__email:hover { border-color: var(--ink); }
.contact__links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
  padding: 0;
  margin: 2.6rem 0 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact__links a { color: var(--muted); transition: color 0.3s var(--ease); }
.contact__links a:hover { color: var(--ink); }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.site-footer a { transition: color 0.3s var(--ease); }
.site-footer a:hover { color: var(--ink); }

/* =============================================================
   LIGHTBOX
   ============================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 16, 13, 0.94);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__stage {
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox__img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: lbIn 0.45s var(--ease) both;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox__caption {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  z-index: 2;
}
.lightbox__close {
  top: 20px; right: 26px;
  font-size: 34px;
  line-height: 1;
  width: 48px; height: 48px;
}
.lightbox__close:hover { color: #fff; }
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 46px;
  line-height: 1;
  width: 64px; height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__nav--prev { left: max(10px, 2vw); }
.lightbox__nav--next { right: max(10px, 2vw); }
.lightbox__nav:hover { color: #fff; }

/* =============================================================
   SCROLL REVEAL
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =============================================================
   OVERVIEW — three category hero sections (home page)
   ============================================================= */
.overview { display: block; }
.cat-hero {
  position: relative;
  display: block;
  width: 100%;
  height: min(72vh, 720px);
  min-height: 380px;
  overflow: hidden;
  color: #fff;
  cursor: pointer;
}
.cat-hero + .cat-hero { border-top: 1px solid rgba(246, 243, 238, 0.14); }
.cat-hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.cat-hero:hover .cat-hero__img { transform: scale(1.045); }
.cat-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,15,0.28) 0%, rgba(20,18,15,0.12) 42%, rgba(20,18,15,0.58) 100%);
}
.cat-hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 16px;
  padding: var(--pad); z-index: 2;
}
.cat-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 2px 40px rgba(0,0,0,0.35);
}
.cat-hero__meta {
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.9;
}
.cat-hero__cta {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.55); padding-bottom: 4px;
  transition: border-color 0.3s var(--ease);
}
.cat-hero:hover .cat-hero__cta { border-color: #fff; }

/* =============================================================
   CATEGORY PAGE — project grid
   ============================================================= */
.page-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 11vw, 140px) var(--pad) clamp(30px, 5vw, 56px);
}
.page-head__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 9vw, 6rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0.5rem 0 0;
}
.projects {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(50px, 9vw, 110px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3.6vw, 60px);
  align-items: start;
}
.projects .project:nth-child(even) { transform: translateY(clamp(30px, 9vw, 120px)); }
.project { display: block; }
.project__frame { position: relative; overflow: hidden; background: var(--bg-2); }
.project__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.project:hover .project__img { transform: scale(1.04); }
.project__label {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-top: 15px;
}
.project__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  letter-spacing: 0;
  line-height: 1.1;
}
.project__meta {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}

/* =============================================================
   BREADCRUMB (project pages)
   ============================================================= */
.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--pad) 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); transition: color 0.3s var(--ease); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 0.55em; opacity: 0.5; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .gallery .shot:nth-child(even) { transform: none; }
  .hero { height: 82vh; }
  .site-footer { flex-direction: column; gap: 10px; text-align: center; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav { flex-wrap: wrap; gap: 14px 18px; font-size: 12px; letter-spacing: 0.1em; }
  /* Category project grid → single column, no stagger */
  .projects { grid-template-columns: 1fr; gap: 30px; }
  .projects .project:nth-child(even) { transform: none; }
  .cat-hero { height: 66vh; min-height: 340px; }
}

/* Very narrow screens: shrink the nav so all items fit on one row. */
@media (max-width: 430px) {
  .nav { font-size: 11px; letter-spacing: 0.07em; gap: 13px; }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__img { animation: none; }
}
