:root {
  --wine: #984158;
  --paper: #f2f2f2;
  --white: #ffffff;
  --ink: #272426;
  --mauve: #c0b6ba;
  --stone: #c4bdb8;
  --taupe: #887d77;
  --gray: #6d6f70;
  --line: rgba(39, 36, 38, 0.2);
  --texture: url("./assets/paper-texture.webp");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  padding: 12px 2.5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: rgba(242, 242, 242, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 10px; line-height: 1.08; font-weight: 700; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; padding: 3px; overflow: hidden; background: var(--white); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.topbar nav { display: flex; gap: 30px; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.topbar nav a { padding-bottom: 4px; border-bottom: 1px solid transparent; }
.topbar nav a:hover { color: var(--wine); border-color: var(--wine); }

.poster-hero {
  position: relative;
  min-height: calc(100svh - 72px);
  padding: 30px 3vw 26px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(130px, .72fr) minmax(310px, 570px) minmax(150px, .8fr);
  gap: clamp(28px, 5vw, 86px);
  align-items: center;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(242,242,242,.9), rgba(242,242,242,.9)), var(--texture);
}
.poster-hero::before,
.poster-hero::after {
  content: "";
  position: absolute;
  background: var(--wine);
  opacity: .78;
}
.poster-hero::before { width: 1px; height: 80%; left: 2.5vw; top: 0; }
.poster-hero::after { width: 30%; height: 1px; right: 0; bottom: 7%; }
.hero-side { position: relative; z-index: 2; min-height: 62vh; display: flex; flex-direction: column; font-size: 13px; font-weight: 700; letter-spacing: -.02em; }
.hero-side p { margin: 0; }
.hero-side-left { justify-content: space-between; }
.hero-side-left::after { content: ""; position: absolute; left: 0; top: 12%; width: 1px; height: 55%; background: var(--wine); }
.hero-index { padding-left: 16px; color: var(--wine); font-size: 11px; letter-spacing: .16em; }
.hero-side h1 { margin: auto 0 12px; color: var(--wine); font: 700 clamp(50px, 7vw, 122px)/.76 Georgia, serif; letter-spacing: -.08em; writing-mode: vertical-rl; transform: rotate(180deg); }
.hero-side-left > p:last-child { padding-left: 16px; line-height: 1.45; }
.poster-frame { position: relative; z-index: 3; width: min(100%, 570px); height: calc(100svh - 142px); min-height: 520px; max-height: 820px; margin: 0 auto; display: grid; place-items: center; }
.poster-frame img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 20px 35px rgba(61, 35, 42, .16)); }
.poster-frame figcaption { position: absolute; left: calc(100% + 14px); bottom: 0; color: var(--gray); font-size: 9px; letter-spacing: .14em; writing-mode: vertical-rl; }
.hero-side-right { justify-content: flex-start; padding-top: 6vh; color: var(--wine); font-size: clamp(15px, 1.45vw, 24px); line-height: 1.12; }
.hero-side-right::before { content: ""; position: absolute; top: 0; right: 0; width: 1px; height: 43%; background: var(--wine); }
.hero-date { margin-top: auto; display: flex; flex-direction: column; color: var(--ink); }
.hero-date b { color: var(--wine); font-size: clamp(20px, 2.2vw, 34px); letter-spacing: -.06em; }
.hero-date span { margin-top: 3px; font-size: 12px; font-weight: 500; }
.scroll-cue { margin-top: 26px; padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; color: var(--white); background: var(--wine); border: 1px solid var(--wine); box-shadow: 0 10px 24px rgba(127,28,56,.18); font-size: 12px; font-weight: 800; letter-spacing: .06em; transition: transform .2s, background .2s, box-shadow .2s; }
.scroll-cue span { color: var(--white); font-size: 20px; line-height: 1; }
.scroll-cue:hover { background: #7f1c38; box-shadow: 0 14px 30px rgba(127,28,56,.26); transform: translateY(-2px); }
.scroll-cue:focus-visible { outline: 3px solid rgba(152,65,88,.28); outline-offset: 4px; }

.invitation-note { position: relative; padding: 130px 7vw 150px; overflow: hidden; color: var(--white); background: var(--wine); }
.invitation-note::before { content: "R"; position: absolute; right: -2vw; bottom: -25vw; color: transparent; opacity: .22; font: 700 min(88vw, 1100px)/1 Georgia, serif; -webkit-text-stroke: 1px var(--white); }
.invitation-note::after { content: ""; position: absolute; top: 0; right: 16%; width: 1px; height: 46%; background: rgba(255,255,255,.55); }
.eyebrow { position: relative; z-index: 2; margin: 0 0 24px; color: var(--wine); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.invitation-note > .eyebrow { color: var(--white); }
.invitation-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.12fr .88fr; gap: 9vw; align-items: end; }
.invitation-grid h2 { margin: 0; font-size: clamp(50px, 7.2vw, 118px); line-height: .78; font-weight: 700; letter-spacing: -.075em; }
.invitation-grid h2 span { width: fit-content; display: block; }
.invitation-grid h2 span:nth-child(2) { margin-left: .42em; font-family: Georgia, serif; font-style: italic; font-weight: 400; }
.invitation-grid h2 span:nth-child(3) { margin-top: .13em; padding: .08em .11em .12em; color: var(--wine); background: var(--white); }
.invitation-grid h2 span:nth-child(4) { margin: .14em 0 0 auto; }
.invitation-grid > div > p:first-child { max-width: 580px; margin: 0 0 36px; font-size: 17px; line-height: 1.9; word-break: keep-all; }
.enter-button { width: min(100%, 560px); padding: 19px 20px; display: flex; justify-content: space-between; align-items: center; color: var(--wine); background: var(--white); border: 1px solid var(--white); box-shadow: 0 12px 28px rgba(39,36,38,.2); font-size: 14px; font-weight: 800; letter-spacing: .02em; transition: transform .2s, background .2s, box-shadow .2s; }
.enter-button span { font-size: 20px; line-height: 1; }
.enter-button:hover { color: var(--wine); background: #f0e7ea; box-shadow: 0 16px 34px rgba(39,36,38,.28); transform: translateY(-2px); }
.enter-button:focus-visible { outline: 3px solid rgba(255,255,255,.42); outline-offset: 5px; }
.exhibition-info { margin-top: 35px; border-top: 1px solid rgba(255,255,255,.3); }
.exhibition-info p { margin: 0; padding: 11px 0; display: grid; grid-template-columns: 70px 1fr; border-bottom: 1px solid rgba(255,255,255,.3); font-size: 12px; }
.exhibition-info span { opacity: .65; font-size: 10px; font-weight: 700; letter-spacing: .12em; }

.students { position: relative; padding: 112px 3vw 135px; background-color: var(--paper); background-image: linear-gradient(rgba(242,242,242,.88), rgba(242,242,242,.88)), var(--texture); }
.section-heading { margin-bottom: 48px; display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0 0 24px; font-size: clamp(48px, 7.2vw, 104px); line-height: .82; font-weight: 600; letter-spacing: -.075em; }
.section-heading .eyebrow { margin-bottom: 18px; }
.section-heading > p { margin-bottom: 24px; color: var(--gray); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.lab-list { display: grid; gap: 88px; }
.lab-section { min-width: 0; }
.lab-heading { min-height: 96px; padding: 18px 0 22px; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 22px; align-items: end; border-top: 2px solid var(--wine); }
.lab-heading h3 { max-width: 850px; margin: 0; color: var(--wine); font-size: clamp(26px, 3.6vw, 52px); line-height: .94; font-weight: 600; letter-spacing: -.05em; }
.lab-heading h3 span { display: block; }
.lab-heading h3 small { margin-top: 10px; display: block; color: var(--gray); font-size: 11px; line-height: 1; font-weight: 800; letter-spacing: .16em; }
.lab-number, .lab-count { color: var(--wine); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.lab-count { align-self: end; padding-bottom: 3px; white-space: nowrap; }
.student-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.student-card { min-width: 0; padding: 17px; color: var(--ink); background: rgba(255,255,255,.55); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.card-thumb, .card-pending { width: 100%; aspect-ratio: 1 / 1; margin-bottom: 20px; }
.student-card .card-thumb { padding: 12px; display: block; object-fit: contain; background: var(--white); filter: saturate(.82); transition: transform .3s, filter .3s; }
.student-card .card-empty { border: 1px solid rgba(127,28,56,.1); }
.student-card .card-text-thumb { padding: clamp(22px, 3vw, 46px); display: grid; place-items: center; border: 1px solid rgba(127,28,56,.1); text-align: center; }
.card-text-thumb span { color: var(--wine); font-size: clamp(12px, 1.35vw, 20px); line-height: 1.55; font-weight: 750; letter-spacing: -.045em; word-break: keep-all; }
.student-card:not(.is-pending):hover, .student-card:not(.is-pending):focus-visible { color: var(--white); background: var(--wine); outline: none; transform: translateY(-4px); }
.student-card:not(.is-pending):hover .card-thumb { transform: scale(.98); filter: saturate(1); }
.student-card .num { color: var(--wine); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.student-card:not(.is-pending):hover .num, .student-card:not(.is-pending):hover small { color: var(--white); }
.student-card strong { margin-top: 0; display: block; font-size: clamp(18px, 2vw, 27px); letter-spacing: -.04em; }
.student-card small { min-height: 4.8em; display: block; margin-top: 7px; color: var(--gray); font-size: 12px; line-height: 1.45; }
.student-card small span { display: block; }
.student-card .card-title { color: currentColor; font-weight: 700; overflow-wrap: anywhere; }
.student-card .card-usage { margin-top: 3px; color: var(--gray); font-size: 11px; word-break: keep-all; }
.student-card:not(.is-pending):hover .card-usage { color: rgba(255,255,255,.78); }
.student-card.is-pending { cursor: default; color: var(--gray); background: rgba(255,255,255,.22); }
.student-card.is-pending .num { color: var(--taupe); }
.card-pending { position: relative; overflow: hidden; display: grid; place-items: center; color: var(--taupe); background: var(--mauve); }
.card-pending::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: rgba(255,255,255,.75); }
.card-pending::after { content: ""; position: absolute; width: 80%; height: 1px; background: var(--wine); }
.card-pending span { position: absolute; top: 12px; left: 12px; color: var(--wine); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.card-pending b { position: relative; z-index: 1; color: rgba(255,255,255,.78); font: 700 clamp(58px, 7vw, 110px)/1 Georgia, serif; letter-spacing: -.09em; }

footer { padding: 26px 3vw; display: flex; justify-content: space-between; color: var(--white); background: var(--wine); font-size: 10px; font-weight: 700; letter-spacing: .1em; }

.project-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--ink); background: var(--paper); }
.project-dialog::backdrop { background: rgba(39,36,38,.82); }
.dialog-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 34%) 1fr; }
.close-button { position: fixed; top: 22px; right: 24px; z-index: 5; padding: 12px 16px; color: var(--wine); background: var(--white); border: 1px solid var(--wine); cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.project-meta { position: sticky; top: 0; height: 100vh; padding: 32px 3vw; display: flex; flex-direction: column; color: var(--white); background: var(--wine); }
.project-meta .eyebrow { color: var(--mauve); }
.project-number { margin: 0 0 auto; font-size: 11px; letter-spacing: .12em; }
.project-meta h2 { margin: 0; font-size: clamp(44px, 5vw, 78px); line-height: .92; letter-spacing: -.07em; }
.project-meta h3 { margin: 20px 0 0; font-size: 18px; font-weight: 500; }
.project-description { margin: 34px 0 20px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.35); }
.project-description p { margin: 0; }
.project-description .description-title { margin-bottom: 10px; color: var(--white); font-size: 14px; font-weight: 700; }
#project-description { max-width: 520px; color: rgba(255,255,255,.8); font-size: 13px; line-height: 1.75; word-break: keep-all; }
.panel-open { width: fit-content; margin-top: auto; padding: 12px 0 5px; border-bottom: 1px solid var(--white); font-size: 12px; font-weight: 700; }
.panel-open:hover { color: var(--mauve); border-color: var(--mauve); }
.project-nav { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.project-nav[hidden] { display: none; }
.project-nav button { padding: 15px 8px; color: var(--white); background: transparent; border: 1px solid rgba(255,255,255,.7); cursor: pointer; font-size: 11px; font-weight: 700; }
.project-nav button + button { border-left: 0; }
.project-nav button:hover { color: var(--wine); background: var(--white); }
.project-content { padding: 7vw 5vw; background-color: var(--stone); background-image: linear-gradient(rgba(196,189,184,.82), rgba(196,189,184,.82)), var(--texture); }
.panel-preview { width: min(100%, 980px); margin: 0 auto; padding: clamp(14px, 2.5vw, 36px); background: rgba(255,255,255,.38); }
.panel-preview img { width: 100%; height: auto; display: block; background: var(--white); box-shadow: 0 18px 45px rgba(58,45,49,.18); }
.project-content.is-logo-only { display: grid; align-items: center; }
.project-content.is-logo-only .panel-preview { width: min(100%, 680px); }
.project-content.is-logo-only .panel-preview img { aspect-ratio: 1 / 1; padding: clamp(18px, 4vw, 56px); object-fit: contain; box-shadow: none; }

@media (max-width: 980px) {
  .poster-hero { grid-template-columns: 110px minmax(300px, 540px) 120px; gap: 28px; }
  .poster-frame figcaption { display: none; }
  .student-grid { grid-template-columns: repeat(3, 1fr); }
  .dialog-shell { grid-template-columns: minmax(280px, 38%) 1fr; }
}

@media (max-width: 760px) {
  .topbar { height: 64px; }
  .poster-hero { min-height: calc(100svh - 64px); padding: 18px 18px 24px; grid-template-columns: 1fr; gap: 0; }
  .hero-side-left { min-height: 0; height: 46px; flex-direction: row; justify-content: space-between; align-items: start; }
  .hero-side-left::after, .hero-side-left > p:last-child, .hero-side h1 { display: none; }
  .hero-index { padding: 0; }
  .poster-frame { width: 100%; height: calc(100svh - 190px); min-height: 420px; max-height: none; }
  .hero-side-right { min-height: 0; padding: 12px 0 0; display: grid; grid-template-columns: 1fr auto; align-items: end; font-size: 12px; }
  .hero-side-right::before, .hero-side-right > p { display: none; }
  .hero-date { margin: 0; }
  .hero-date b { font-size: 19px; }
  .scroll-cue { margin: 0; width: 174px; padding: 13px 15px; }
  .invitation-note { padding: 90px 24px 105px; }
  .invitation-grid { grid-template-columns: 1fr; gap: 55px; }
  .invitation-grid h2 { font-size: clamp(54px, 16vw, 94px); }
  .lab-list { gap: 70px; }
  .lab-heading { grid-template-columns: 70px 1fr; gap: 12px; }
  .lab-heading h3 { grid-column: 2; font-size: clamp(24px, 6.8vw, 38px); }
  .lab-number { grid-row: 1; align-self: start; padding-top: 5px; }
  .lab-count { grid-column: 2; }
  .student-grid { grid-template-columns: repeat(2, 1fr); }
  .dialog-shell { grid-template-columns: 1fr; }
  .project-meta { position: relative; height: auto; min-height: 70vh; }
  .panel-open { margin-top: 28px; }
}

@media (max-width: 500px) {
  .brand-mark { width: 40px; height: 40px; padding: 2px; }
  .brand { font-size: 8px; }
  .topbar nav { gap: 14px; font-size: 9px; }
  .poster-frame { min-height: 360px; }
  .invitation-grid > div > p:first-child { font-size: 15px; }
  .students { padding: 82px 16px 95px; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 50px; }
  .section-heading > p { font-size: 9px; }
  .lab-heading { min-height: 84px; }
  .student-card { padding: 10px; }
  .card-thumb, .card-pending { margin-bottom: 14px; }
  .student-card strong { font-size: 18px; }
  footer { gap: 18px; flex-direction: column; }
  .project-meta { padding: 28px 20px; }
  .project-meta h2 { font-size: 54px; }
  .project-content { padding: 54px 12px 28px; }
  .panel-preview { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .student-card { transition: none; }
}
