*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e0e0e;
  --fg: #e8e2d9;
  --accent: #c8a96e;
  --muted: #5a5a52;
  --link: #a8c4b8;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Noto Serif KR', serif;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 200;
  opacity: 0.35;
}

/* ── STAGE 1 ── */
#stage-title {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: opacity 0.6s;
}
#stage-title.hidden { opacity: 0; pointer-events: none; }

#title-label {
  font-family: 'Grandiflora One', serif;
  font-size: clamp(4rem, 14vw, 11rem);
  color: var(--fg);
  user-select: none;
  transition: color 0.3s;
}
#title-label:hover { color: var(--accent); }
#title-label.squished { animation: squish 0.4s 0.48s forwards; }

@keyframes squish {
  0%   { transform: scaleY(1); opacity: 1; }
  40%  { transform: scaleY(0.15); opacity: 0.4; }
  100% { transform: scaleY(0); opacity: 0; }
}

/* ── 이름 낙하 ── */
#name-drop {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
#name-drop.visible { opacity: 1; pointer-events: auto; cursor: pointer; }

#name-text {
  font-family: 'Grandiflora One', serif;
  font-size: clamp(4rem, 14vw, 11rem);
  color: var(--accent);
  transform: translateY(-120vh);
  transition: transform 0.6s cubic-bezier(0.22, 1.0, 0.36, 1.0);
  user-select: none;
}
#name-text.dropped { transform: translateY(0); }

/* ── STAGE 2: 메뉴 페이지 ── */
#stage-menu {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 12vh 8vw 16vh;
  min-height: 100vh;
  width: 100%;
}
#stage-menu.visible { display: flex; }

#menu-name {
  font-family: 'Grandiflora One', serif;
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  color: var(--accent);
  margin-bottom: clamp(3rem, 8vh, 6rem);
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.6s 0.1s, transform 0.6s 0.1s;
}
#stage-menu.visible #menu-name { opacity: 1; transform: translateY(0); }

/* ── menu-block 래퍼 ── */
.menu-block {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── 메뉴 아이템 ── */
.menu-item {
  font-size: clamp(1.2rem, 3.2vw, 2.1rem);
  font-weight: 300;
  color: var(--fg);
  cursor: pointer;
  padding: 0.4em 0.6em;
  text-align: center;
  width: 100%;
  position: relative;
  opacity: 0;
  transform: translateY(-20px);
  transition: color 0.3s, opacity 0.5s, transform 0.5s;
}
.menu-item::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%; height: 1px;
  background: var(--accent);
  transition: transform 0.3s;
}
.menu-item:hover { color: var(--accent); }
.menu-item:hover::after { transform: translateX(-50%) scaleX(1); }
.menu-item.active { color: var(--accent); }

/* 각 메뉴 아이템 순차 등장 — nth-of-type 대신 개별 클래스 사용 */
#stage-menu.visible .menu-item-1 { opacity:1; transform:translateY(0); transition-delay: 0.2s; }
#stage-menu.visible .menu-item-2 { opacity:1; transform:translateY(0); transition-delay: 0.35s; }
#stage-menu.visible .menu-item-3 { opacity:1; transform:translateY(0); transition-delay: 0.5s; }
#stage-menu.visible .menu-item-4 { opacity:1; transform:translateY(0); transition-delay: 0.65s; }

/* ── 콘텐츠 영역 ── */
.content-area {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 1.0s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-area ul {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 1.1em;
  padding: 1.8em 0.6em 2.2em;
}
.content-area li {
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  line-height: 2.0;
  font-weight: 300;
  color: var(--fg);
  padding-left: 1.6em;
  position: relative;
}
.content-area li::before {
  content: '—';
  position: absolute; left: 0;
  color: var(--muted);
  font-size: 0.8em;
  top: 0.1em;
}
.content-area a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.content-area a:hover { color: var(--accent); border-color: var(--accent); }

.content-area .text-section { padding: 0 0.6em; }
.content-area .text-section:first-child { padding-top: 1.8em; }
.content-area .text-section:last-child { padding-bottom: 2.2em; }

.content-area .sub-title {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--accent);
  margin-bottom: 0.8em;
  margin-top: 1.8em;
  font-weight: 400;
}
.content-area p {
  font-size: clamp(0.85rem, 1.5vw, 0.97rem);
  line-height: 2.15;
  font-weight: 300;
  max-width: 68ch;
  color: var(--fg);
  margin-bottom: 1em;
}

.content-area .org-year {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 1.8em; margin-bottom: 0.6em;
  letter-spacing: 0.12em;
  padding-left: 0.6em;
}
.content-area .org-list {
  display: flex; flex-wrap: wrap;
  gap: 0.5em;
  padding: 0 0.6em 0.4em;
}
.content-area .org-tag {
  font-size: clamp(0.75rem, 1.2vw, 0.84rem);
  color: var(--link);
  border: 1px solid var(--muted);
  padding: 0.22em 0.7em;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.content-area .org-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(200,169,110,0.06);
}
#content-orgs { padding-bottom: 1em; }

/* ── 글자 단위 ── */
.char-unit { display: inline; }

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 2px; }