/* ================================================
   JOEY CHONG — Portfolio
   Brand Creative / Visual Rejuvenation
   ================================================ */


/* ── VARIABLES ─────────────────────────────────── */
:root {
  --cream:       #FAF8F5;
  --black:       #111111;
  --white:       #FFFFFF;
  --pink:        #F4B8C3;
  --mint:        #A8D8C5;
  --yellow:      #F7DFA0;
  --text:        #1A1A1A;
  --text-muted:  #888880;
  --border:      #E8E5E0;
  --font:        'Poppins', sans-serif;
}


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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  /* page-in fade */
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded { opacity: 1; }

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

a {
  color: inherit;
  text-decoration: none;
}


/* ── NAV ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 3rem;
  /* transparent over dark hero — transitions to light on scroll */
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.nav-logo {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.4s ease;
}

.nav.scrolled .nav-logo { color: var(--text); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.4s ease, opacity 0.2s ease;
}

.nav.scrolled .nav-links a { color: var(--text); }
.nav-links a:hover { opacity: 0.5; }


/* ── HERO ──────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--black);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* shown when video file isn't supplied yet */
.hero-placeholder-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2520 60%, #1a1a1a 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.hero-content {
  position: absolute;
  top: 78%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  text-align: center;
  width: 100%;
  padding: 0 2rem;
}

.hero-name {
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-role {
  margin-top: 0.6rem;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 400;
  opacity: 0.75;
  letter-spacing: 0.02em;
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.hero-tagline {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 500;
  opacity: 0.9;
  max-width: 540px;
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

@keyframes heroUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-scroll-arrow {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  opacity: 0.6;
  animation: heroUp 1s ease 1.1s both, arrowBounce 1.8s ease-in-out 2s infinite;
  transition: opacity 0.2s;
}

.hero-scroll-arrow:hover { opacity: 1; }

@keyframes arrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}


/* ── INTRO ─────────────────────────────────────── */
.intro {
  padding: 4rem 3rem;
}

.intro-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.intro-text-col {
  flex: 0 0 auto;
  max-width: 1000px;
}

.intro-image-col {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.intro-image-col img {
  height: 100%;
  max-height: 400px;
  width: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 768px) {
  .intro-inner {
    flex-direction: column;
    gap: 2.5rem;
  }
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.intro-text {
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.intro-text em {
  font-style: normal;
  font-weight: 700;
  color: #FFBF00;
}

.intro-pills {
  display: flex;
  gap: 0.75rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill-pink   { background: var(--pink); }
.pill-mint   { background: var(--mint); }
.pill-yellow { background: var(--yellow); }


/* ── WORK GRID ─────────────────────────────────── */
.work {
  padding: 0 3rem 4rem;
}

.work-header {
  margin-bottom: 2.5rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  overflow: visible;
}

/* ── Project Card ── */
.project-card {
  display: block;
  border-radius: 1.25rem;
  background: var(--black);
  color: var(--white);
  transform: scale(1);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
  will-change: transform;
}

.project-card:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 16px 30px rgba(0,0,0,0.12);
  cursor: pointer;
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 590px;
  overflow: hidden;
  position: relative;
  border-radius: 1.25rem 1.25rem 0 0;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-card-image img {
  transform: scale(1.06);
}

.project-card-image .card-video-embed {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.4);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-card-image .card-video-embed {
  transform: translate(-50%, -50%) scale(1.48);
}

/* placeholder when no image supplied */
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2d2520 0%, #3d3530 50%, #2d2820 100%);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.project-card-info {
  padding: 1.59rem 2rem;
}

.project-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.05rem;
  margin-top: -7px;
}

.project-card-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.project-tag-text {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.project-tag-sep { color: rgba(255,255,255,0.2); font-weight: 700; font-size: 0.76rem; }

.project-card-title {
  font-size: 1.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.8;
  margin-top: -8px;
}

.project-card-subtitle-cn {
  font-size: 1.16rem;
  display: block;
  margin-top: 7px;
}

.project-card-year {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
}

/* Coming-soon placeholder cards */
.project-card-empty {
  border: 2px dashed var(--border);
  border-radius: 1.25rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.card-empty-hint {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.7;
}


/* ── FOOTER ────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-email {
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.footer-email:hover { opacity: 0.5; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.footer-nav a:hover { opacity: 0.45; }

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ================================================
   PROJECT PAGE
   ================================================ */


/* ── PROJECT HERO ──────────────────────────────── */
.project-hero {
  background: var(--black);
  color: var(--white);
  min-height: 65vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10rem 3rem 5rem;
  position: relative;
}

.project-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
  z-index: 0;
}

.project-hero > * {
  position: relative;
  z-index: 1;
}

.project-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.project-tag-pill {
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-title {
  font-size: clamp(2rem, 4.5vw, 4.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.0;
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.project-subtitle {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.6;
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.project-meta {
  margin-top: 3rem;
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.project-meta-item { display: flex; flex-direction: column; gap: 0.3rem; }

.meta-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
}

.meta-value {
  font-size: 0.9rem;
  font-weight: 500;
}


/* ── PROJECT CONTENT ───────────────────────────── */

/* ─── each project section sits inside .project-content ─── */
.project-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 6rem 3rem 4rem;
}

/* ── Section block: label + heading + body ── */
.ps {
  margin-bottom: 5rem;
}

.ps-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.ps h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.ps p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #404040;
}

/* ── Image blocks inside project ── */
.project-image {
  border-radius: 1rem;
  overflow: hidden;
  margin: 2.75rem 0;
}

.project-image img,
.project-image video {
  width: 100%;
  height: auto;
  display: block;
}

.project-image video {
  max-height: calc(100vh - 160px);
}

/* placeholder when real image isn't supplied */
.img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ECEAE6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B8B4AE;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* full-bleed image (outside the narrow content wrapper) */
.project-image-wide {
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 0 3rem;
  border-radius: 1rem;
  overflow: hidden;
}

.project-image-wide .project-image { margin: 0; }


/* ── STICKY SECTION NAV ────────────────────────── */
.section-nav {
  position: fixed;
  left: 2.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.section-nav.visible {
  opacity: 1;
  pointer-events: auto;
}

.snav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s ease;
  white-space: nowrap;
}

.snav-link::before {
  content: '';
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: width 0.35s ease, background 0.25s ease;
  flex-shrink: 0;
}

.snav-link:hover {
  color: var(--text);
}

.snav-link.active {
  color: var(--text);
  font-weight: 700;
}

.snav-link.active::before {
  width: 36px;
  background: var(--text);
  height: 2px;
}


/* ── OPENING STATEMENT ──────────────────────────── */
.project-intro-wrap {
  padding: 6rem 3rem 5rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.project-intro-text {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  text-align: center;
}


/* ── PROJECT SECTIONS ───────────────────────────── */
.ps-section {
  padding: 5rem 3rem;
  border-top: 1px solid var(--border);
}

.ps-section-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.ps-header {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.ps-num,
.ps-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  vertical-align: middle;
}

.ps-label {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ps-body p {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: #404040;
  margin-bottom: 2rem;
}

/* Approach bullet list */
.approach-list {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.approach-list li {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: #404040;
  padding-left: 1.75rem;
  position: relative;
}

.approach-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* "a fresh morning..." moments line */
.approach-moments {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  border-left: 2.5px solid var(--mint);
  padding-left: 1.25rem;
  margin-bottom: 3rem !important;
  line-height: 1.7;
}

.approach-moments strong {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

/* Image + caption wrapper */
.ps-figure {
  margin: 2.5rem 0;
}

/* Three flavour images */
.flavour-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}

.flavour-item { margin: 0; }

.flavour-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 5px;
  text-align: center;
}

.flavour-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
}

.flavour-desc {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.45;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 2rem 0 0.5rem;
}

.process-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 16 / 9;
}

.process-item video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}

/* Image caption */
.img-caption {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-align: center;
  margin-top: 5px;
}

.ps-figure,
.flavour-item {
  margin: 0;
}

.info-image-top {
  border-radius: 1rem 1rem 0 0;
  margin-bottom: 0;
}

.info-image-bottom {
  border-radius: 0 0 1rem 1rem;
  margin-top: 0;
}

.ps-figure .project-image,
.flavour-item .project-image {
  margin: 0;
}

.info-image-top + .ps-figure {
  margin-top: 0;
}


/* ── CLOSING LINE ───────────────────────────────── */
.project-closing {
  text-align: center;
  padding: 8rem 3rem;
  border-top: 1px solid var(--border);
}

.project-closing p {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  letter-spacing: -0.01em;
}


/* ── RESPONSIVE — project page ──────────────────── */
@media (max-width: 768px) {
  .section-nav {
    position: sticky;
    top: 58px;
    left: 0; right: 0;
    width: 100%;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 1.75rem;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    opacity: 1;
    pointer-events: auto;
  }

  .snav-link::before { display: none; }

  .project-intro-wrap { padding: 4rem 1.5rem 3rem; }

  .ps-section { padding: 3.5rem 1.5rem; }

  .flavour-grid { grid-template-columns: 1fr; }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
  }

  .project-closing { padding: 5rem 1.5rem; }
}


/* ── PROJECT BOTTOM NAV ────────────────────────── */
.project-footer-nav {
  border-top: 1px solid var(--border);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pfn-back {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.pfn-back:hover { opacity: 0.45; }

.pfn-next { text-align: right; }

.pfn-next-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.pfn-next-title {
  font-size: 1.1rem;
  font-weight: 700;
  transition: opacity 0.2s;
}

.pfn-next-title:hover { opacity: 0.45; }


/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1.25rem 1.5rem;
  }

  .hero-content {
    bottom: 3rem;
    left: 1.5rem;
    right: 1.5rem;
  }

  .hero-scroll-arrow { display: none; }

  .intro {
    padding: 5rem 1.5rem;
  }

  .work {
    padding: 0 1.5rem 6rem;
  }

  .footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* project page */
  .project-hero {
    padding: 7rem 1.5rem 3.5rem;
    min-height: 55vh;
  }

  .project-content {
    padding: 4rem 1.5rem 3rem;
  }

  .project-image-wide {
    padding: 0 1.5rem;
    margin-bottom: 3rem;
  }

  .project-footer-nav {
    padding: 2rem 1.5rem;
  }

  .project-meta {
    gap: 1.75rem;
  }
}
