@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Variable.ttf") format("truetype supports variations"),
       url("fonts/roboto/Roboto-Variable.ttf") format("truetype-variations"),
       url("fonts/roboto/Roboto-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto/Roboto-Italic-Variable.ttf") format("truetype supports variations"),
       url("fonts/roboto/Roboto-Italic-Variable.ttf") format("truetype-variations"),
       url("fonts/roboto/Roboto-Italic-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-display: "Roboto", "Noto Sans KR", sans-serif;
  --font-body: "Roboto", "Noto Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg, #ffffff);
  color: var(--color-ink, #162a43);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Continuous landing → profile scroll */
html.landing-scrollable {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

html.landing-scrollable body.landing-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

.landing-spacer {
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
}

.landing-profile {
  position: relative;
  z-index: 6;
  background: #f5f5f2;
  min-height: 50vh;
}

/* Continuous landing host: keep profile column, solid surface over archive */
.landing-profile .profile-doc {
  width: min(880px, calc(100% - 160px));
  margin: 0 auto;
  padding: 120px 24px 180px;
}

.landing-profile .profile-section:first-child {
  border-top: none;
  padding-top: 48px;
}

body.landing-page.is-past-landing .ui__corner,
body.landing-page.is-past-landing .ui__mark,
body.landing-page.is-past-landing .ui__tools,
body.landing-page.is-past-landing .ui__loading {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* Blue logo overlay: landing stage only */
body.landing-page.is-past-landing #logoStage {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.landing-page .ui__corner,
body.landing-page .ui__mark,
body.landing-page .ui__tools {
  transition: opacity 0.35s ease;
}

/* Keep INDEX readable over profile content */
body.landing-page.is-past-landing .ui__index {
  color: inherit;
}

body.landing-page.is-past-landing .site-index__link,
body.landing-page.is-past-landing .site-index__sublink {
  color: #858a84;
}

body.landing-page.is-past-landing .site-index__link:hover,
body.landing-page.is-past-landing .site-index__sublink:hover,
body.landing-page.is-past-landing .site-index__link.is-active,
body.landing-page.is-past-landing .site-index__group.is-open > .site-index__link {
  color: var(--color-primary, #76b7fb);
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: #f5f4f1;
  z-index: 0;
}

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.ui__corner {
  position: absolute;
  top: 28px;
  left: 32px;
  color: #2a2a26;
  line-height: 1.5;
}

.ui__date {
  font-weight: 500;
}

.ui__time {
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.ui__mark {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 14px;
  color: #2a2a26;
}

.ui__index {
  position: absolute;
  right: 32px;
  top: 64%;
  transform: translateY(-50%);
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: auto;
}

/* SAN BADA site index (landing + profile) */
.site-index {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.site-index__link,
.site-index__sublink {
  color: #b9b7b0;
  font-family: var(--font-body);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.25s ease;
  cursor: pointer;
}

.site-index__link:hover,
.site-index__sublink:hover,
.site-index__link.is-active,
.site-index__group.is-open > .site-index__link {
  color: #2a2a26;
}

.site-index__link {
  font-weight: 500;
}

.site-index__link.is-active {
  font-weight: 500;
}

.site-index__link sup {
  font-size: 8px;
  margin-left: 2px;
  opacity: 0.7;
}

.site-index__group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.site-index__sub {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.28s ease, opacity 0.22s ease;
}

.site-index__group:hover .site-index__sub,
.site-index__group.is-open .site-index__sub {
  max-height: 220px;
  opacity: 1;
  pointer-events: auto;
}

.site-index__sublink {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.ui__tools {
  position: absolute;
  right: 32px;
  bottom: 30px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.ui__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.6);
  color: #2a2a26;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ui__icon:hover {
  background: #fff;
  transform: translateY(-1px);
}

.ui__loading {
  position: absolute;
  left: 32px;
  bottom: 30px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9890;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.ui__loading.is-hidden {
  opacity: 0;
}

/* Logo proximity grid — sits over the frozen CENTER hero card */
#logoStage {
  position: fixed;
  z-index: 5;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  perspective: 900px;
  transform-style: preserve-3d;
  overflow: visible;
  cursor: default;
}

#logoStage.is-active {
  opacity: 1;
  visibility: visible;
  cursor: default;
}

/* Only show blue logo overlay while Archive is in view */
body:not(.archive-in-view) #logoStage {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.logo-cell {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
  z-index: 1;
}

.logo-cell__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 720px) {
  .ui__mark {
    display: none;
  }
  .ui__index {
    display: none;
  }
  .ui__corner {
    top: 20px;
    left: 20px;
  }
  .ui__tools {
    right: 20px;
    bottom: 20px;
  }
  .ui__loading {
    left: 20px;
    bottom: 20px;
  }
}
