:root {
  color-scheme: light;
  --page: #f9faff;
  --surface: #fff;
  --tint: #eff3ff;
  --ink: #101836;
  --muted: #515c77;
  --line: #dce3f2;
  --blue: #204dd6;
  --blue-hover: #1438a6;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 100%;
  line-height: 1.65;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
section[id] { scroll-margin-top: 1.5rem; }

.shell {
  width: min(100% - 7rem, 75rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.6rem 1rem;
  translate: 0 -200%;
  color: #fff;
  background: var(--blue);
}

.skip-link:focus { translate: 0; }
.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.65rem;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.65rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.05em;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.38rem;
  background: var(--blue);
}

.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  background: white;
  border-radius: 1px;
}

.brand-mark::before { top: 29%; left: 26%; width: 49%; height: 12%; }
.brand-mark::after { top: 34%; left: 45%; width: 12%; height: 38%; }

.site-nav { display: flex; align-items: center; gap: clamp(1.2rem, 4vw, 3rem); }
.site-nav a { padding-block: 0.6rem; color: var(--muted); font-weight: 650; }
.site-nav a:hover, .text-link:hover { color: var(--blue-hover); text-decoration: underline; }

.hms-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 2.65rem;
  gap: 0.5rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface);
  font: 700 0.875rem/1 "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}

.hms-button:hover { border-color: var(--blue); color: var(--blue); }

.lock-icon {
  position: relative;
  display: block;
  width: 0.72rem;
  height: 0.55rem;
  margin-top: 0.28rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.lock-icon::before {
  content: "";
  position: absolute;
  width: 0.43rem;
  height: 0.33rem;
  bottom: 100%;
  left: 50%;
  translate: -50%;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 0.28rem 0.28rem 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.91fr) minmax(0, 1.09fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.25rem);
  padding-block: clamp(3.5rem, 6.1vw, 5.8rem);
}

.hero h1 {
  font-size: clamp(3.35rem, 6.3vw, 6.45rem);
  font-weight: 850;
  letter-spacing: -0.085em;
  line-height: 1.05;
}

.hero h1 span { color: var(--blue); }
.hero-copy p {
  margin-top: 1.55rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  line-height: 1.75;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.85rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  font-weight: 720;
  cursor: pointer;
}

.button-primary { color: #fff; background: var(--blue); }
.button-primary:hover { background: var(--blue-hover); }
.button-secondary { border-color: var(--line); background: var(--surface); }
.button-secondary:hover { border-color: var(--blue); color: var(--blue); }

.hero-visual {
  overflow: hidden;
  aspect-ratio: 1.38;
  border: 1px solid #cfdef1;
  border-radius: 1.1rem;
  background: #cfdef1;
}

.hero-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }

.projects {
  padding-block: clamp(2.7rem, 6vw, 5.2rem);
  border-block: 1px solid var(--line);
  background: var(--tint);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin-bottom: 1.45rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4.3vw, 3.2rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.075em;
}

.section-heading p, .project-copy p, .note-link p { color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }

.project-card {
  overflow: clip;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 160ms, translate 160ms;
}

.project-card:hover { border-color: #9eafe6; translate: 0 -2px; }
.project-card:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.project-link { display: block; height: 100%; outline: none; }
.project-link:hover .text-link { text-decoration: underline; }

.project-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(8.25rem, 16vw, 12.5rem);
  overflow: hidden;
  user-select: none;
}

.project-art-quiz { gap: 0.6rem; background: linear-gradient(135deg, #c4d6fe, #e5edff); }

.key {
  display: grid;
  width: clamp(3rem, 7vw, 4.5rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #a4b8ec;
  border-radius: 0.65rem;
  color: #24418e;
  background: #f8faff;
  box-shadow: 0 0.35rem 0 #b2c4f1;
  font: 650 clamp(1.15rem, 3vw, 1.75rem)/1 ui-monospace, monospace;
}

.key-raised { translate: 0 -0.6rem; color: #fff; border-color: #204bd2; background: #2854dc; box-shadow: 0 0.35rem 0 #17359a; }
.project-art-name { background: linear-gradient(135deg, #d8ddf8, #e8e7ff); }

.letter {
  display: grid;
  width: clamp(3.25rem, 8vw, 4.85rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 0.65rem;
  box-shadow: 0 0.5rem 1.4rem #342a751f;
  font-size: clamp(1.35rem, 3.3vw, 2.1rem);
  font-weight: 790;
}

.letter-left { position: relative; z-index: 1; rotate: -12deg; background: #fcfbff; color: #4c3e94; }
.letter-right { margin-left: -0.4rem; translate: 0 0.5rem; rotate: 10deg; background: #c4bff4; color: #332875; }
.project-copy { padding: clamp(1.05rem, 2.6vw, 1.75rem); }
.project-copy h3, .note-link h3 { font-size: 1.3rem; font-weight: 780; letter-spacing: -0.055em; line-height: 1.4; }
.project-copy p { margin-top: 0.35rem; word-break: keep-all; }
.text-link { color: var(--blue); font-weight: 720; }
.project-copy .text-link { display: inline-block; margin-top: 0.9rem; }

.notes { padding-block: clamp(2.8rem, 6vw, 5.3rem); }
.note-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.note-list li { border-bottom: 1px solid var(--line); }

.note-link {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  gap: 0.2rem 1.25rem;
  align-items: baseline;
  padding: 1.15rem 0.4rem;
}

.note-link:hover { background: var(--tint); }
.note-link:hover h3 { color: var(--blue-hover); }
.note-link p { margin-top: 0.2rem; word-break: keep-all; }
.note-category { color: var(--blue); font: 700 0.9rem/1.3 ui-monospace, monospace; }
time { color: var(--muted); font: 0.875rem/1.3 ui-monospace, monospace; white-space: nowrap; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.footer-inner .wordmark { font-size: 1.2rem; }

.hms-dialog {
  width: min(26rem, calc(100% - 2rem));
  padding: 1.65rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1rem 3rem #1018362e;
}

.hms-dialog::backdrop { background: #1018366b; }
.hms-dialog h2 { font-size: 1.7rem; letter-spacing: -0.02em; }
.hms-dialog p { margin-block: 0.25rem 1.15rem; color: var(--muted); }
.hms-dialog form { display: flex; justify-content: flex-end; }

@media (max-width: 62rem) {
  .shell { width: min(100% - 4rem, 75rem); }
}

@media (max-width: 48rem) {
  .shell { width: calc(100% - 2.5rem); }
  .hero { grid-template-columns: 1fr; gap: 2.1rem; padding-block: 2.65rem; }
  .hero h1 { font-size: clamp(3.2rem, 11vw, 5.2rem); }
  .hero-copy p { margin-top: 1.15rem; }
  .hero-actions { margin-top: 1.3rem; }
  .hero-visual { aspect-ratio: 1.5; }
}

@media (max-width: 36rem) {
  .header-inner { min-height: 4rem; gap: 0.65rem; }
  .header-inner .wordmark { font-size: 1.125rem; gap: 0.375rem; }
  .brand-mark { width: 1.2rem; height: 1.2rem; border-radius: 0.32rem; }
  .site-nav { gap: 0.7rem; }
  .site-nav a { font-size: 0.875rem; white-space: nowrap; }
  .hms-button { padding-inline: 0.55rem; gap: 0.35rem; min-height: 2.55rem; }
  .project-grid { grid-template-columns: 1fr; }
  .note-link { grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem; }
  .note-link > div { grid-column: 1 / -1; grid-row: 2; }
  .note-link time { justify-self: end; }
}

@media (max-width: 22rem) {
  .header-inner { grid-template-columns: 1fr auto; padding-top: 0.8rem; }
  .site-nav { grid-row: 2; grid-column: 1 / -1; }
}

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

