/* ═══════════════════════════════════════════════════
   STEPHANIE YEN — stylesheet
   To change fonts, edit --font-* variables in :root
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital@0;1&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────
   Change fonts here and nowhere else.
   --font-display  → headings, name, titles
   --font-body     → body copy, paragraphs
   --font-mono     → labels, tags, captions, nav
   ─────────────────────────────────────────────── */
:root {
  /* fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Libre Baskerville', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  /* colors */
  --cream:          #FFF8F0;
  --hero-bg:        #2A4A2A;
  --hero-accent:    #EEF7A0;
  --tech:           #E07828;
  --music:          #8060C8;
  --writing:        #2A4A7A;
  --cities:         #E05585;
  --yellow-bg:      #E8C832;
  --yellow-accent:  #F5D800;
  --photos-bg:      #C8DCE8;
  --photos-hero-bg: #1C2E4A;
  --ink:            #1A1410;
}

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

/* ── BASE ───────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
}

/* ── UTILITY ────────────────────────────────────── */
/* Shared base for all mono labels */
.mono-label,
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.90rem;
}

/* ── NAV ────────────────────────────────────────── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: var(--hero-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--hero-accent);
  cursor: pointer;
}
nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  color: rgba(238, 247, 160, 0.45);
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: color 0.2s;
}
nav a:hover,
nav a.active { color: var(--hero-accent); }
.nav-sep {
  font-family: var(--font-mono);
  color: rgba(238, 247, 160, 0.2);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

/* ── PAGE TRANSITIONS ───────────────────────────── */
.page { display: none; }
.page.active {
  display: block;
  animation: fade 0.4s ease;
  min-height: 100vh;
}
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── HERO ───────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  padding: 2.5rem 3rem;
  border-bottom: 3px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow: hidden;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 7rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--cream);
}
.hero-name em    { font-style: italic; color: var(--hero-accent); }
.hero-steph      { color: var(--hero-accent); font-style: normal; }
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--hero-accent);
  max-width: 520px;
  line-height: 1.65;
  opacity: 0.8;
}

/* ── EXPANDABLE ROWS ────────────────────────────── */
.row {
  border-bottom: 3px solid var(--ink);
  display: grid;
  grid-template-columns: 100% 0%;
  cursor: pointer;
  height: 90px;
  min-height: 90px;
  max-height: 90px;
  overflow: hidden;
  flex-shrink: 0;
  align-self: auto;
  transition:
    grid-template-columns 0.55s cubic-bezier(0.77, 0, 0.18, 1),
    height     0.55s cubic-bezier(0.77, 0, 0.18, 1),
    max-height 0.55s cubic-bezier(0.77, 0, 0.18, 1);
}
.row.open {
  height: var(--open-height, 280px);
  min-height: 0;
  max-height: 2000px;
  grid-template-columns: 38% 62%;
  cursor: default;
}

/* Flipped: cream left, color right */
.row.flip { grid-template-columns: 0% 100%; }
.row.flip.open { grid-template-columns: 62% 38%; }

/* Panel — colored column */
.panel {
  overflow: hidden;
  position: relative;
  height: 100%;
  align-self: stretch;
}
.bg-tech    { background: var(--tech); }
.bg-music   { background: var(--music); }
.bg-writing { background: var(--writing); }

/* Collapsed label bar */
.panel-collapsed {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 90px;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 3rem;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.1s ease;
}
.row.open     .panel-collapsed { opacity: 0; pointer-events: none; }
.row:not(.open) .panel-collapsed { opacity: 1; transition: opacity 0.15s ease 0.35s; }

/* Expanded panel content */
.panel-expanded {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}
.row.open .panel-expanded {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease 0.32s;
}

/* Reveal — cream column */
.reveal {
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  padding: 3.5rem 2rem 3.5rem 3rem;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.1s ease;
}
.row.open .reveal { opacity: 1; transition: opacity 0.2s ease 0.32s; }

/* Flipped row: reorder columns */
.row.flip .panel  { order: 2; }
.row.flip .reveal { order: 1; }

/* ── ROW TYPOGRAPHY ─────────────────────────────── */
.row-num      { color: var(--yellow-accent); }
.filmstrip-header .row-num { color: rgba(26, 20, 16, 0.45); }
.row-title-lg {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}
.row-title-sm {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
/* filmstrip headers sit on cream, so title is ink-colored */
.filmstrip-header .row-title-sm { color: var(--ink); }
.row-hint {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--yellow-accent);
  opacity: 0.85;
  line-height: 1;
}

/* Tags */
.tags { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
}

/* Reveal body & close button */
.reveal-body { font-size: 1rem; line-height: 1.85; color: #3a3028; }
.close-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--ink);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-end;
}
.close-btn.left { align-self: flex-start; }
.close-btn:hover { opacity: 0.5; }

/* ── CITIES SECTION ─────────────────────────────── */
.cities {
  background: var(--cities);
  padding: 3.5rem 3rem;
  display: grid;
  grid-template-columns: 38% 62%;
  min-height: 240px;
  overflow: hidden;
}
.cities-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-right: 2rem;
  min-width: 0;
}
.cities-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  min-width: 0;
}
.cities-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}
.cities-body { font-size: 1rem; line-height: 1.85; color: rgba(255, 255, 255, 0.85); }
.cities-num  { color: var(--yellow-accent); opacity: 0.85; }

/* ── HOME FOOTER ────────────────────────────────── */
.home-footer {
  background: var(--hero-bg);
  padding: 2.5rem 3rem;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

/* ── ABOUT PAGE ─────────────────────────────────── */
.about-hero {
  background: var(--yellow-bg);
  padding: 5rem 3rem 2.5rem;
  border-bottom: 3px solid var(--ink);
}
.about-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.about-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: rgba(26, 20, 16, 0.75);
  line-height: 1.65;
}
.about-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  border-bottom: 3px solid var(--ink);
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

#about { display: none; flex-direction: column; min-height: 100vh; }
#about.active { display: flex; }

.about-text {
  padding: 3rem;
  border-right: 3px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.about-p { font-size: 1.05rem; line-height: 1.9; color: var(--ink); }
.about-p + .about-p { padding-top: 1.75rem; border-top: 1px solid #ddd8cc; }

.contact {
  padding: 3rem 2.5rem;
  background: var(--hero-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}
/* contact-label color overrides — base style shared with .mono-label above */
.contact-label { color: var(--hero-accent); opacity: 0.55; margin-bottom: 1rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.9rem; }
.contact-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--hero-accent);
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--hero-accent);
  border-radius: 2px;
  transition: all 0.2s;
  display: inline-block;
}
.contact-link:hover { background: var(--hero-accent); color: var(--ink); }

.wip {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(238, 247, 160, 0.45);
}

/* ── PHOTOS PAGE ────────────────────────────────── */
#photos { display: none; flex-direction: column; min-height: 100vh; background: var(--photos-bg); }
#photos.active { display: flex; }

.photos-hero {
  background: var(--photos-hero-bg);
  padding: 5rem 3rem 2.5rem;
  border-bottom: 1px solid rgba(26, 20, 16, 0.2);
}
.photos-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 1.25rem;
}
.photos-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: rgba(255, 248, 240, 0.65);
  line-height: 1.65;
}

.continent-header {
  display: flex;
  align-items: center;
  padding: 0.6rem 3rem;
  background: var(--yellow-bg);
  border-bottom: 1px solid rgba(26, 20, 16, 0.15);
  border-top: 1px solid rgba(26, 20, 16, 0.15);
}
/* Filmstrip sections */
.filmstrip-section { border-bottom: 1px solid rgba(26, 20, 16, 0.2); overflow: hidden; }
.filmstrip-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 3rem;
  height: 72px;
  border-bottom: 1px solid rgba(26, 20, 16, 0.15);
  background: var(--cream);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.filmstrip-header:hover { background: #f0ebe0; }
.filmstrip-toggle {
  margin-left: auto;
  color: #aaa;
  opacity: 1;
  transition: color 0.2s;
}
.filmstrip-header:hover .filmstrip-toggle { color: var(--ink); }

/* Filmstrip track (accordion) */
.filmstrip-track {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  background: var(--ink);
}
.filmstrip-section.open .filmstrip-track { max-height: 500px; }

/* Filmstrip scroll container */
.filmstrip {
  display: flex;
  align-items: stretch;
  padding: 0;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
}
.filmstrip:active { cursor: grabbing; }
.filmstrip::-webkit-scrollbar { display: none; }

/* Film frames */
.frames {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 18px 1.5rem;
  flex-shrink: 0;
}
.frame {
  position: relative;
  flex-shrink: 0;
  margin: 0 3px;
  cursor: pointer;
}
.frame img,
.frame .frame-placeholder {
  display: block;
  height: 220px;
  width: 220px;
  object-fit: cover;
  border: 2px solid #444;
  transition: filter 0.3s, transform 0.3s;
  filter: sepia(0.15) contrast(1.05);
}
.frame .frame-placeholder {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame:hover img,
.frame:hover .frame-placeholder {
  filter: sepia(0) contrast(1.1) brightness(1.05);
  transform: scale(1.02);
  z-index: 2;
}

/* Frame number label */
.frame-num { color: #888; text-align: center; margin-top: 4px; }

/* Empty placeholder text */
.placeholder-label { color: #555; text-align: center; padding: 0 1rem; }

/* ── LIGHTBOX ────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 2px solid #333;
  filter: sepia(0.1) contrast(1.05);
}
.lightbox-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: rgba(238, 247, 160, 0.6);
  text-transform: uppercase;
}
.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(238, 247, 160, 0.5);
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--hero-accent); }

/* ── PHOTOS FOOTER ──────────────────────────────── */
.photos-footer {
  background: var(--hero-bg);
  padding: 2rem 3rem;
  border-top: 3px solid var(--ink);
  margin-top: auto;
}
.photos-footer-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(238, 247, 160, 0.45);
}
