/* ===================================================================
   Teal Choi — Portfolio
   Style reference: casarenstudio.com (luxury minimal / editorial)
   Structure reference: ayoungkim.com (work list, parent/child works)
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,400;1,9..144,500&family=Inter:wght@300;400;500&display=swap');

:root {
  --bg: #e9e9e7;
  --bg-raised: #dfdfdc;
  --text: #17233d;
  --muted: #8a867d;
  --line: #cfcfcb;
  --line-strong: #17233d;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 84px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type helpers ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }

em, .italic { font-style: italic; }

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(233, 233, 231, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.site-nav.scrolled { border-bottom-color: var(--line); }

.nav-logo {
  display: inline-flex;
  align-items: center;
}
.nav-logo svg {
  width: 46px;
  height: auto;
  display: block;
  color: var(--text);
  transition: opacity 0.2s ease;
}
.nav-logo:hover svg { opacity: 0.6; }

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--text);
  transition: right 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle-asterisks {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    height: calc(100vh - var(--nav-h));
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 0 var(--gutter);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { font-size: 20px; }
}

/* ---------- Hero ---------- */

.hero {
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 64px;
}

.hero-media {
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 25%;
  display: block;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 46vh auto;
    min-height: 0;
  }
  .hero-media { order: -1; height: 46vh; }
  .hero-content {
    min-height: 54vh;
    padding-top: 40px;
  }
}

.hero-title {
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 1;
  letter-spacing: -0.01em;
  max-width: 20ch;
}

.hero-title .role {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  font-size: 0.4em;
  margin-top: 0.4em;
}

.hero-scroll {
  margin-top: 48px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-scroll::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--muted);
}

/* ---------- Media placeholder ---------- */

.media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-raised);
}
.media::before { content: ''; display: block; padding-top: var(--ratio, 66%); }
.media-fill {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(20,19,17,0.045) 18px 19px);
}
.media-real-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.media.has-image .media-fill,
.media.has-image .media-tag { display: none; }
.media-tag {
  position: absolute;
  bottom: 16px; left: 16px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 8px;
  border: 1px solid var(--line);
}

/* ---------- Editorial section (image/text alternating) ---------- */

.section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 96px);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split.reverse .split-text { order: 1; }

.split-text .eyebrow { margin-bottom: 20px; }
.split-text h2 {
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12;
  margin-bottom: 24px;
}
.split-text p { color: var(--muted); font-size: 16px; max-width: 46ch; }

@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media,
  .split.reverse .split-text { order: initial; }
  .section { padding: 72px 0; }
}

/* ---------- Intro statement ---------- */

.statement {
  padding-top: 100px;
  padding-bottom: 60px;
}
.statement p {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.35;
  max-width: 22ch;
}

/* ---------- Work list (ayoungkim-style) ---------- */

.work-category {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}
.work-category:first-of-type { border-top: none; }

.work-category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.work-category-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-style: italic;
}
.work-category-count { color: var(--muted); font-size: 13px; }

.work-list { list-style: none; margin: 0; padding: 0; }

.work-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.25s ease, color 0.25s ease;
}
.work-list li:last-child .work-row { border-bottom: 1px solid var(--line); }

.work-row:hover { padding-left: 14px; color: var(--muted); }

.work-row .title {
  font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 26px);
}
.work-row .title small {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.work-row .year {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.work-row.sub {
  padding-left: 28px;
}
.work-row.sub .title { font-size: clamp(16px, 1.8vw, 19px); }
.work-row.sub .title::before {
  content: '— ';
  color: var(--muted);
}

/* ---------- Project detail page ---------- */

.project-header {
  padding: calc(var(--nav-h) + 56px) 0 48px;
  border-bottom: 1px solid var(--line);
}
.project-header .eyebrow { margin-bottom: 18px; }
.project-header h1 {
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  max-width: 18ch;
}
.project-header .subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-top: 14px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.project-meta dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.project-meta dd { margin: 0; font-size: 15px; }

.project-media { padding-top: 56px; padding-bottom: 56px; }
.project-media .media { margin-bottom: 24px; }
.project-media .media:last-child { margin-bottom: 0; }

.project-body { padding-top: 40px; padding-bottom: 100px; max-width: 62ch; }
.project-body p { margin: 0 0 20px; color: var(--text); }
.project-body .placeholder-note {
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
  border-left: 2px solid var(--line);
  padding-left: 16px;
}

.credits { padding-bottom: 100px; }
.credits h3 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; font-family: var(--sans); font-style: normal; }
.credits dl { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 10px 24px; }
.credits dt { color: var(--muted); font-size: 14px; }
.credits dd { margin: 0; font-size: 14px; }

.project-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-nav a:hover { color: var(--muted); }

/* ---------- Biography ---------- */

.bio-header { padding: calc(var(--nav-h) + 56px) 0 40px; border-bottom: 1px solid var(--line); }

.bio-header-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bio-header-photo {
  width: auto;
  height: auto;
  max-width: min(340px, 70vw);
  max-height: 60vh;
  margin-bottom: 32px;
}

.bio-header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bio-header h1 {
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1;
}
.bio-header .subtitle { font-size: 15px; color: var(--muted); margin-top: 10px; }

.bio-block { padding: 64px 0; border-top: 1px solid var(--line); }
.bio-block:first-of-type { border-top: none; }
.bio-block h2 {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  font-family: var(--sans); color: var(--muted); margin-bottom: 28px;
}
.bio-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 14px 0;
  font-size: 15px;
}
.bio-entry .yr { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Contact ---------- */

.contact-hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 64px;
}
.contact-hero h1 {
  font-size: clamp(40px, 8vw, 100px);
  margin-bottom: 32px;
}
.contact-links { display: flex; flex-direction: column; gap: 0; }

.contact-email {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 19px);
  text-align: center;
  padding: 20px 0;
}
.contact-email:hover { color: var(--muted); }

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 24px 0;
}
.social-icons a {
  display: inline-flex;
  color: var(--text);
  transition: opacity 0.2s ease;
}
.social-icons a:hover { opacity: 0.6; }
.social-icons svg { width: 22px; height: 22px; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px var(--gutter);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.site-footer a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
