/* ==========================================================================
   Ha Jeonghyeon — portfolio site
   화이트 배경 + 블랙/다크그레이 텍스트. 시스템 산세리프(맥 Finder와 동일 계열: San Francisco),
   자간은 시스템 기본값 그대로 — 구분선 없이 여백과 색 대비만으로 위계를 표현.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #8a8a8a;
  --placeholder: #e9e9e9;
  --nav-height: 96px;
  --footer-height: 48px;
  --max-width: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
body { padding-bottom: var(--footer-height); }

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

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.6; }

/* ---------- language toggle ---------- */
body.lang-en .ko { display: none; }
body.lang-ko .en { display: none; }

/* ---------- header / nav ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  min-height: var(--nav-height);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--nav-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
}
.logo {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 20px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--fg);
  opacity: 1;
}
.nav-links a[aria-current="page"] {
  color: var(--fg);
  font-weight: 500;
}
/* KO/EN 토글을 같은 줄 맨 오른쪽으로 밀어냄 */
.nav-links li:last-child {
  margin-left: auto;
}
#lang-toggle {
  font-size: 13px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
}
#lang-toggle:hover { color: var(--fg); }

/* ---------- footer ---------- */
#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--footer-height);
  background: var(--bg);
  padding: 0 32px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- generic layout ---------- */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 32px 0;
}
.page-title {
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 8px;
}
.eyebrow {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 28px;
}

/* ---------- home hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-height) - var(--footer-height));
  min-height: 420px;
  background: var(--placeholder);
  overflow: hidden;
}
.hero img, .hero video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.play-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(2px);
}
.play-button::after {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
.hero-caption {
  position: absolute;
  bottom: 24px; left: 24px;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.scroll-hint {
  position: absolute;
  bottom: 24px; right: 24px;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ---------- works grid ---------- */
.year-tabs {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 24px 0 40px;
}
.year-tabs button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.year-tabs button.active {
  color: var(--fg);
  font-weight: 500;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
  padding-bottom: 60px;
}
@media (max-width: 900px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .works-grid { grid-template-columns: 1fr; } }

.work-card { display: block; }
.work-card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--placeholder);
  overflow: hidden;
}
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-card .thumb .play-icon {
  position: absolute;
  bottom: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
}
.work-card .thumb .play-icon::after {
  content: "";
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}
.work-card .caption {
  margin-top: 10px;
  font-size: 13px;
}
.work-card .caption .muted { color: var(--muted); }

/* ---------- work detail ---------- */
.detail-back { font-size: 12px; color: var(--muted); }
.detail-title { font-size: 32px; font-weight: 500; margin: 16px 0 8px; }
.detail-meta { font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.detail-media { margin-bottom: 24px; }
.detail-media img { width: 100%; background: var(--placeholder); }
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #dcdcdc;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed .video-note {
  position: absolute; top: 12px; left: 14px;
  font-size: 12px; color: var(--muted);
}
.detail-statement { max-width: 680px; font-size: 15px; line-height: 1.8; margin: 32px 0 60px; white-space: pre-line; }
.related-title { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 60px; }
@media (max-width: 700px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
.muted { color: var(--muted); }
.empty-state { color: var(--muted); font-size: 14px; padding: 20px 0 60px; }

/* ---------- movement (장소별 사진, 아코디언) ---------- */
.location-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.location-item { margin-bottom: 4px; }
.location-name {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--fg);
  background: none;
  border: none;
  padding: 6px 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.location-name:hover { opacity: 0.5; }

.location-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}
.location-item.open .location-panel {
  max-height: 500px;
  opacity: 1;
}

/* 사진을 가로로 한 줄 나열, 필요하면 옆으로 스크롤 */
.photo-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  overflow-x: auto;
  padding: 16px 0 32px;
  -webkit-overflow-scrolling: touch;
}
.photo-row .photo-item { margin: 0; flex: 0 0 auto; height: 380px; }
.photo-row .photo-item img { height: 100%; width: auto; max-width: none; display: block; background: var(--placeholder); }
.photo-row .photo-item figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 700px) {
  .photo-row .photo-item { height: 260px; }
}

/* ---------- about / research / cv ---------- */
.about-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - var(--footer-height) - 64px);
  padding-bottom: 60px;
}
.about-statement { max-width: 640px; text-align: center; }
.about-statement p { font-size: 18px; line-height: 1.9; margin: 0 0 20px; }
.section-heading { font-size: 13px; margin: 32px 0 12px; color: var(--muted); }
.btn {
  display: inline-block;
  background: var(--fg);
  color: #fff !important;
  font-size: 13px;
  padding: 14px 22px;
  margin-top: 8px;
}

.cv-block { margin-bottom: 32px; max-width: 680px; }
.cv-block h3 { font-size: 13px; color: var(--muted); font-weight: 400; margin-bottom: 12px; }
.cv-row { display: flex; gap: 16px; font-size: 14px; line-height: 1.9; }
.cv-row .year { width: 56px; flex: none; color: var(--muted); }

.research-body { max-width: 900px; padding-bottom: 60px; }
.research-body p { font-size: 15px; line-height: 1.9; margin: 0 0 20px; }
.research-figure { margin: 0 0 40px; }
.research-figure img { width: 100%; background: var(--placeholder); }
.research-figure figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- contact ---------- */
.contact-wrap { max-width: 480px; margin: 40px auto 80px; text-align: center; }
.contact-email { font-size: 20px; margin-bottom: 12px; }
.contact-social { font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.contact-social a { margin: 0 8px; }
form.contact-form { text-align: left; padding-top: 36px; }
.contact-form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: none;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 18px;
  background: var(--placeholder);
  color: var(--fg);
  border-radius: 2px;
}
.contact-form button {
  background: var(--fg);
  color: #fff;
  border: none;
  padding: 12px 26px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.form-note { font-size: 12px; color: var(--muted); margin-top: 14px; }
