/* ============================================================
   RAINE LI — style.css
   Inspired by Pace Gallery interaction patterns
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Inter:wght@300;400;500&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --black:      #101010;    /* Pace's exact black */
  --white:      #ffffff;
  --grey:       #767676;
  --light:      #e0e0e0;
  --off-white:  #f7f6f4;
  --nav-h:      53px;       /* Pace's exact nav height */

  --sans:   'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif:  'Cormorant Garamond', 'Times New Roman', Georgia, serif;

  --ease-menu: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }   /* body scroll lock when menu open */
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }


/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  background: var(--white);
  border-bottom: 1px solid var(--light);
  z-index: 100;
  transition: box-shadow 0.25s ease;
}
.nav.scrolled { box-shadow: 0 1px 12px rgba(0,0,0,0.06); }

/* Burger */
.nav-burger {
  justify-self: start;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 0;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.35s ease, opacity 0.25s ease, width 0.25s ease;
  transform-origin: center;
}

/* Logo — centred */
.nav-logo {
  justify-self: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--black);
}

/* Right slot (empty for now, could add CV link) */
.nav-right {
  justify-self: end;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}


/* ============================================================
   SIDE MENU  (Pace-style: slides in from left, black)
   ============================================================ */

/* Scrim */
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
body.nav-open .nav-scrim {
  opacity: 1;
  pointer-events: all;
}

/* Menu panel */
.nav-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 460px;
  background: var(--black);
  z-index: 300;
  padding: 0 56px 56px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.55s var(--ease-menu);
}
body.nav-open .nav-menu {
  transform: translateX(0);
}

/* Close button */
.nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  margin: 28px 0 0 -12px;
  color: var(--white);
  opacity: 0; /* animated in by GSAP */
}
.nav-close svg { width: 18px; height: 18px; }

/* Menu primary links */
.nav-menu-list {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
}
.nav-menu-item {
  opacity: 0;  /* GSAP animates in */
  overflow: hidden;
}
.nav-menu-item a {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.25;
  display: block;
  padding: 6px 0;
  transition: opacity 0.15s linear;
}
.nav-menu-item a:hover { opacity: 0.55; }

/* Menu dimming on sibling hover — controlled by JS */
.nav-menu-list.has-hover .nav-menu-item:not(.is-hovered) a {
  opacity: 0.25;
}

/* Menu footer (contact, social) */
.nav-menu-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0; /* GSAP animates in */
}
.nav-menu-footer a {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s ease;
}
.nav-menu-footer a:hover { color: var(--white); }


/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
  border-bottom: 1px solid var(--light);
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 40px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 48px;
  display: block;
}


/* ============================================================
   HERO  —  editorial split, photo contained (not full-bleed)
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 58% 42%;
  min-height: 72vh;
  border-bottom: 1px solid var(--light);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px 48px 60px 40px;
  border-right: 1px solid var(--light);
}
.hero-text-top {}

.hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 36px;
  display: block;
}
.hero-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(4rem, 9vw, 8.5rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--black);
}
.hero-name-cn {
  font-family: var(--serif);
  font-size: clamp(0.9rem, 2vw, 1.4rem);
  font-weight: 400;
  color: var(--grey);
  letter-spacing: 0.3em;
  margin-top: 18px;
}
.hero-text-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.hero-desc {
  max-width: 320px;
  font-size: 14px;
  line-height: 1.75;
  color: #555;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black);
  white-space: nowrap;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}
.hero-cta:hover { opacity: 0.4; }

/* Photo — contained, editorial */
.hero-media {
  position: relative;
  overflow: hidden;
  background: #ddd;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}


/* ============================================================
   WORK / PROJECTS — 2-col grid, Pace card style
   ============================================================ */
#work .projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: -2px;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Image area */
.project-img {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}
.project-img img {
  transition: transform 0.65s ease;
}
.project-card:hover .project-img img {
  transform: scale(1.04);
}

/* Placeholder — shown when no real image yet */
.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-placeholder-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 8rem;
  color: rgba(255,255,255,0.06);
  user-select: none;
  transition: color 0.4s ease;
}
.project-card:hover .project-placeholder-num {
  color: rgba(255,255,255,0.1);
}

/* Per-project placeholder colours */
.ph-01 { background: linear-gradient(135deg, #141414, #0e0e0e); }
.ph-02 { background: linear-gradient(135deg, #1a1510, #111008); }
.ph-03 { background: linear-gradient(135deg, #0e1418, #080e12); }
.ph-04 { background: linear-gradient(135deg, #14120e, #0c0a08); }
.ph-05 { background: linear-gradient(135deg, #12141a, #0a0c12); }
.ph-06 { background: linear-gradient(135deg, #141010, #0e0808); }

/* Card info below image */
.project-info {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--white);
  transition: background 0.2s ease;
}
.project-card:hover .project-info { background: var(--off-white); }

.project-info-left {}
.project-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 5px;
  line-height: 1.2;
}
.project-sub {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.project-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.project-location {
  font-size: 11px;
  color: var(--grey);
}
.project-arrow {
  font-size: 14px;
  color: var(--light);
  transition: color 0.2s ease, transform 0.2s ease;
}
.project-card:hover .project-arrow {
  color: var(--black);
  transform: translateX(3px);
}


/* ============================================================
   ABOUT
   ============================================================ */
#about .about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.5fr;
  gap: 80px;
  align-items: start;
}
.about-left { }
.about-portrait {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ccc;
  margin-bottom: 20px;
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
}
.about-caption {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.about-meta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}
.meta-value {
  font-size: 12.5px;
  color: var(--black);
  line-height: 1.55;
}

.about-right {}
.about-heading {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 36px;
}
.about-text p {
  font-size: 15px;
  line-height: 1.82;
  color: #333;
  margin-bottom: 1.4em;
}
.about-text p:last-child { margin-bottom: 0; }


/* ============================================================
   PRACTICE — numbered list
   ============================================================ */
.practice-list {
  border-top: 1px solid var(--light);
}
.practice-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--light);
  transition: padding-left 0.2s ease;
  cursor: default;
}
.practice-row:hover { padding-left: 6px; }
.practice-num {
  font-size: 10px;
  color: var(--grey);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.practice-info { display: flex; flex-direction: column; gap: 4px; }
.practice-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 400;
}
.practice-sub {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}
.practice-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.practice-location { font-size: 11.5px; color: var(--grey); }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--light);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}


/* ============================================================
   WRITING
   ============================================================ */
.writing-list { border-top: 1px solid var(--light); }
.writing-empty {
  padding: 64px 0;
  border-bottom: 1px solid var(--light);
}
.writing-empty p {
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 0.04em;
}
.writing-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--light);
  transition: padding-left 0.2s ease;
  cursor: pointer;
}
.writing-row:hover { padding-left: 6px; }
.writing-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 4px;
}
.writing-pub {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}
.writing-year { font-size: 11px; color: var(--grey); }


/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  background: var(--black);
  border-bottom: none;
}
#contact .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  padding-bottom: 96px;
}
.contact-heading {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.contact-details { display: flex; flex-direction: column; gap: 28px; }
.contact-item { display: flex; flex-direction: column; gap: 6px; }
.contact-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}
.contact-value {
  font-size: 14px;
  color: var(--white);
  transition: opacity 0.2s ease;
}
.contact-value:hover { opacity: 0.4; }
.contact-social { display: flex; gap: 10px; margin-top: 6px; }
.contact-social a {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact-social a:hover { border-color: var(--white); color: var(--white); }


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-l, .footer-r {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.28);
}
.footer-r a { color: rgba(255,255,255,0.28); transition: color 0.2s; }
.footer-r a:hover { color: rgba(255,255,255,0.7); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .nav-menu { width: 100%; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-text { border-right: none; padding: 48px 24px; }
  .hero-media { height: 55vw; min-height: 280px; }
  .hero-text-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }

  #work .projects-grid { grid-template-columns: 1fr; }

  #about .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-portrait { aspect-ratio: 4/3; }

  #contact .section-inner { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 600px) {
  .section-inner { padding: 64px 20px; }
  .nav { padding: 0 20px; }
  .nav-menu { padding: 0 28px 48px; }
  .nav-menu-list { margin-top: 40px; }
  footer { padding: 20px; flex-direction: column; gap: 8px; align-items: flex-start; }
}
