/* ==============================
   THOMAS CHU PHOTO — PORTFOLIO
   A dark, cinematic, editorial layout
   ============================== */

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

:root {
  --bg: #0a0a0a;
  --bg-soft: #141210;
  --panel: #0f0f0f;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.88);
  --text-muted: rgba(255, 255, 255, 0.52);
  --text-faint: rgba(255, 255, 255, 0.32);
  --gold: #c9a558;
  --gold-soft: #e3c98f;
  --accent: #c9a558;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Manrope", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A very subtle film-grain / paper texture over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Vignette glow — cinematic framing */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -5%, rgba(201, 165, 88, 0.045), transparent 55%),
    radial-gradient(ellipse 100% 80% at 50% 105%, rgba(10, 10, 10, 0.75), transparent 60%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.35s ease;
}

a:hover {
  color: var(--gold);
}

button {
  background: none;
  border: 0;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

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

/* Custom selection color */
::selection {
  background: rgba(201, 165, 88, 0.28);
  color: #fff;
}

/* Reusable rule + gold label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.eyebrow.center::before { display: none; }
.eyebrow.center::after { display: none; }

section {
  position: relative;
  padding: 120px 0;
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 64px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-desc {
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.9;
  max-width: 420px;
  justify-self: end;
  align-self: end;
}

@media (max-width: 800px) {
  section { padding: 88px 0; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .section-desc { justify-self: start; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(24px, 5vw, 64px);
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--line-soft);
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav-brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.nav-brand span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: #fff;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 78vw);
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 36px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-left: 1px solid var(--line-soft);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 15px;
    letter-spacing: 0.1em;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(24px, 5vw, 64px) clamp(60px, 10vh, 110px);
  position: relative;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease-out;
}

.hero-media video {
  filter: saturate(0.9) brightness(0.88);
}

.hero-media .loaded {
  opacity: 1;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.45) 40%, rgba(10, 10, 10, 0.18) 70%, rgba(10, 10, 10, 0.32) 100%),
    radial-gradient(ellipse 70% 60% at 20% 80%, rgba(10, 10, 10, 0.7), transparent 65%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: end;
  gap: 48px;
}

.hero-kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-kicker::before {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--gold-soft);
  opacity: 0.6;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 1.06;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-title small {
  display: block;
  font-size: clamp(0.95rem, 1.9vw, 1.2rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.68);
  letter-spacing: 0.14em;
  margin-top: 22px;
  line-height: 1.7;
}

.hero-sub {
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.9;
  max-width: 380px;
  margin-top: 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 30px;
  border: 1px solid var(--gold);
  color: var(--gold);
  transition: background 0.4s ease, color 0.4s ease, transform 0.3s ease;
}

.btn:hover {
  background: var(--gold);
  color: #0a0a0a;
  transform: translateY(-1px);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text);
}

.btn.ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-left: 40px;
  border-left: 1px solid var(--line);
}

.hero-stats dt {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.hero-stats dd {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: #fff;
  margin: 0;
  line-height: 1;
}

.hero-stats dd small {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  margin-left: 4px;
  letter-spacing: 0.05em;
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-pulse 2.4s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { padding-left: 0; border-left: 0; grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
}

@media (max-width: 560px) {
  .hero {
    align-items: center;
    padding-top: 100px;
  }

  .hero-title { font-size: clamp(2.2rem, 11vw, 3rem); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.about-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-soft);
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.05);
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-portrait:hover img {
  transform: scale(1.04);
}

.about-portrait::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.about-body p {
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 2;
  margin-bottom: 20px;
  max-width: 560px;
}

.about-body p strong {
  color: #fff;
  font-weight: 600;
}

.about-body p em {
  color: var(--gold-soft);
  font-style: normal;
}

.about-quote {
  margin: 36px 0;
  padding-left: 24px;
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.7;
  color: #fff;
}

.about-quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.about-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 32px;
  list-style: none;
  margin-top: 34px;
}

.about-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.about-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--gold);
  flex: none;
  transform: translateY(-2px);
}

.about-list strong {
  color: #fff;
  font-weight: 600;
  margin-left: auto;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-list { grid-template-columns: 1fr; }
}

/* ---------- Series ---------- */
.series-list {
  display: flex;
  flex-direction: column;
}

.series-item {
  display: grid;
  grid-template-columns: 72px 1fr 260px;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: 44px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  transition: opacity 0.4s ease;
}

.series-item:first-child {
  border-top: 1px solid var(--line-soft);
}

.series-index {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

.series-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: #fff;
  line-height: 1.25;
  margin: 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.series-item:hover .series-title {
  transform: translateX(8px);
}

.series-desc {
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.8;
  margin-top: 10px;
  max-width: 560px;
}

.series-meta {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
  padding-top: 6px;
  min-width: 130px;
}

.series-meta span {
  color: var(--text-faint);
}

.series-thumb {
  position: absolute;
  right: clamp(24px, 5vw, 64px);
  top: 50%;
  width: 280px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0;
  transform: translateX(20px) scale(0.96);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  filter: saturate(0.92);
}

.series-item:hover ~ .series-thumb,
.series-item:hover .series-thumb {
  opacity: 0;
}

@media (max-width: 900px) {
  .series-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 32px 0;
  }

  .series-meta {
    flex-direction: row;
    gap: 14px;
    align-items: baseline;
  }

  .series-thumb { display: none; }
}

/* ---------- Awards ---------- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.award-card {
  padding: 34px 30px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.02), transparent);
  transition: border-color 0.4s ease, background 0.4s ease;
}

.award-card:hover {
  border-color: rgba(201, 165, 88, 0.45);
  background: linear-gradient(160deg, rgba(201, 165, 88, 0.05), transparent);
}

.award-year {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 14px;
}

.award-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: #fff;
  line-height: 1.5;
  margin: 0;
}

.award-sub {
  font-family: var(--sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 10px;
  line-height: 1.8;
}

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

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}

.contact-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  color: #fff;
  margin: 0;
}

.contact-title span {
  display: block;
  color: var(--gold);
  margin-top: 6px;
}

.contact-note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 2;
  max-width: 400px;
  margin-top: 24px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  transition: padding-left 0.35s ease, color 0.35s ease;
}

.contact-link:first-child {
  border-top: 1px solid var(--line-soft);
}

.contact-link:hover {
  padding-left: 10px;
  color: var(--gold);
}

.contact-link span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- Footer ---------- */
.footer {
  padding: 70px 0 40px;
  border-top: 1px solid var(--line-soft);
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.footer-brand span { color: var(--gold); }

.footer-note {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  line-height: 1.9;
}

.footer-note .icp-link {
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

.footer-note .icp-link:hover {
  color: var(--gold);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-media video { animation: none !important; }
}
