/* ========================================
   Jonas Liu v4 — Black & Gold Cinema Aesthetic
   ======================================== */

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

/* --- CSS Variables --- */
:root {
  --bg: #000000;
  --panel: #0a0a08;
  --gold: #c9a96e;
  --gold-bright: #d4af37;
  --gold-light: #e8d48b;
  --gold-muted: #8a8060;
  --gold-dim: #5a5038;
  --gold-glow: rgba(201, 169, 110, 0.15);
  --gold-glow-strong: rgba(201, 169, 110, 0.35);
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --vignette-strength: 0.85;
  --transition-slow: 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-medium: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--gold-muted);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* --- Vignette Overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 80%, rgba(0,0,0,0.85) 100%);
  opacity: var(--vignette-strength);
}

/* --- Anamorphic Light Blobs (decorative bokeh) --- */
.anamorphic-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.anamorphic-blobs::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 180px;
  top: 8%;
  right: 15%;
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.06) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
}

.anamorphic-blobs::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 200px;
  bottom: 20%;
  left: 10%;
  background: radial-gradient(ellipse at center, rgba(201,169,110,0.04) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
}

/* --- Canvas Background Layer --- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* --- Main Content Wrapper --- */
.main-content {
  position: relative;
  z-index: 2;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 169, 110, 0.1);
  transition: padding var(--transition-medium);
}

.nav.scrolled {
  padding: 0.8rem 3rem;
}

/* Back-to-home link on subpages */
.nav-back {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--gold-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
}

.nav-back:hover {
  color: var(--gold-light);
}

.nav-back::before {
  content: '←';
  font-size: 0.85rem;
}

/* Nav group: back-link + logo on the left */
.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-logo:hover {
  color: var(--gold-bright);
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--gold-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition-medium);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
  text-shadow: 0 0 12px var(--gold-glow);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Page Transition --- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.page-transition.active {
  opacity: 1;
}

/* --- Section --- */
.section {
  padding: 6rem 3rem;
  position: relative;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

/* Gold hairline divider */
.section-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 2rem 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--gold);
  line-height: 1.15;
}

h1 {
  font-size: clamp(3rem, 6vw, 7rem);
  letter-spacing: 0.04em;

  /* Multi-layer gold text-shadow for metallic sheen */
  text-shadow:
    0 0 40px rgba(201, 169, 110, 0.25),
    0 0 80px rgba(201, 169, 110, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Gold gradient text for headings */
.gold-text {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-bright) 40%, var(--gold) 70%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 24px var(--gold-glow);
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  color: var(--gold-bright);
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--gold-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 300;
}

p {
  margin-bottom: 1.2rem;
  color: var(--gold-muted);
}

/* Subtitle / Tagline */
.tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-style: italic;
  color: var(--gold);
  opacity: 0.9;
}

.caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

/* --- Links --- */
a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

a:hover {
  color: var(--gold-light);
  text-shadow: 0 0 10px var(--gold-glow);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--gold-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.btn:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
  box-shadow:
    0 0 20px var(--gold-glow),
    inset 0 0 20px rgba(201, 169, 110, 0.08);
  text-shadow: 0 0 12px var(--gold-glow);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: rgba(201, 169, 110, 0.08);
  border-color: var(--gold-bright);
}

.btn-primary:hover {
  background: rgba(201, 169, 110, 0.14);
}

/* --- Cards --- */
.card {
  background: var(--panel);
  border: 1px solid rgba(201, 169, 110, 0.1);
  padding: 2rem;
  transition: all var(--transition-medium);
}

.card:hover {
  border-color: rgba(201, 169, 110, 0.3);
  box-shadow: 0 0 30px rgba(201, 169, 110, 0.06);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--gold-muted);
  line-height: 1.6;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-style: italic;
  color: var(--gold);
  margin-bottom: 1rem;
  opacity: 0.85;
}

.hero .tagline-block {
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(201, 169, 110, 0.2);
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
}

.hero .tagline-block p {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-style: italic;
  color: var(--gold-light);
  margin: 0;
}

.hero .cta-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* --- Work Cards --- */
.work-card {
  background: var(--panel);
  border: 1px solid rgba(201, 169, 110, 0.08);
  padding: 2rem;
  transition: all var(--transition-medium);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, var(--gold-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.work-card:hover {
  border-color: rgba(201, 169, 110, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.work-card:hover::before {
  opacity: 1;
}

.work-card .tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.8rem;
}

.work-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.work-card .role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.work-card .card-desc {
  font-size: 0.85rem;
}

/* GIF preview — native aspect ratio, no crop */
.work-card-gif {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--gold-dim), var(--gold), var(--gold-dim));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--gold-muted);
  line-height: 1.6;
}

/* --- Dual Column (Live Action × Generative) --- */
.dual-panel {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 3rem;
  align-items: start;
}

.dual-panel .divider {
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.dual-panel h3 {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid rgba(201, 169, 110, 0.15);
  border-bottom: 1px solid rgba(201, 169, 110, 0.15);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Form Styles --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(10, 10, 8, 0.8);
  border: 1px solid rgba(201, 169, 110, 0.15);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- Filter Tags --- */
.filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  justify-content: center;
}

.filter-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(201, 169, 110, 0.2);
  color: var(--gold-muted);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tag:hover,
.filter-tag.active {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201, 169, 110, 0.08);
}

/* --- Section Labels --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* --- Philosophy Block --- */
.philosophy-block {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-block p {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-style: italic;
  color: var(--gold);
  line-height: 1.7;
}

/* --- Honor List --- */
.honor-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(201, 169, 110, 0.08);
}

.honor-item:last-child {
  border-bottom: none;
}

.honor-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold);
}

.honor-detail {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.06em;
}

/* --- Backlit Edge Glow (simulated rim light) --- */
.edge-glow {
  box-shadow:
    0 -1px 0 rgba(201, 169, 110, 0.2),
    0 -4px 20px rgba(201, 169, 110, 0.06);
}

/* --- Spot Light Simulation --- */
.spot-light {
  position: relative;
}

.spot-light::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,169,110,0.06) 0%, transparent 35%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footer --- */
.footer {
  padding: 3rem;
  text-align: center;
  border-top: 1px solid rgba(201, 169, 110, 0.1);
}

.footer p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 0.08em;
}

/* --- Mobile Nav --- */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(30px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mobile-nav a:hover {
  color: var(--gold-light);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .section { padding: 4rem 1.5rem; }
  .nav { padding: 0.9rem 1.2rem; }
  .nav.scrolled { padding: 0.6rem 1.2rem; }
  .nav-left { gap: 0.8rem; }
  .nav-back { font-size: 0.7rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .dual-panel { grid-template-columns: 1fr; }
  .dual-panel .divider { display: none; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
  .cta-group { flex-direction: column; align-items: center; }
  .filter-bar { gap: 0.5rem; }
}

@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3rem 1rem; }
}
