/* ---------- Pretendard ---------- */
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2")
    format("woff2");
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2")
    format("woff2");
  font-weight: 200;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2")
    format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2")
    format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2")
    format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2")
    format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2")
    format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2")
    format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2")
    format("woff2");
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "BonmyeongjoSourceHanSerif";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/NotoSerifKR.woff")
    format("woff");
  font-weight: normal;
  font-display: swap;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
  background: #13233f;
  color: #f5f4f1;
  font-family:
    "Pretendard",
    -apple-system,
    "Malgun Gothic",
    sans-serif;
  font-weight: 400;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family:
    "Pretendard",
    -apple-system,
    "Malgun Gothic",
    sans-serif;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

a {
  color: #f5f4f1;
}

ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

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

.note {
  color: #c9c7c2;
  font-size: 0.85rem;
}

:focus-visible {
  outline: 2px solid #f5f4f1;
  outline-offset: 3px;
}

.modal-tab.active:focus-visible {
  outline-color: #101c30;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: #f5f4f1;
  color: #0b0b0d;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 4px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Animated gradient background ---------- */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #13233f 0%,
    #2b4b76 40%,
    #4972a3 70%,
    #628cb4 100%
  );
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.blob-1 {
  width: 46vw;
  height: 46vw;
  top: -10%;
  left: -8%;
  background: radial-gradient(
    circle,
    rgba(210, 225, 250, 0.4),
    transparent 70%
  );
  animation: drift1 26s ease-in-out infinite alternate;
}

.blob-2 {
  width: 38vw;
  height: 38vw;
  bottom: -12%;
  right: -6%;
  background: radial-gradient(circle, rgba(10, 20, 45, 0.4), transparent 70%);
  animation: drift2 32s ease-in-out infinite alternate;
}

.blob-3 {
  width: 30vw;
  height: 30vw;
  top: 35%;
  left: 55%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.12),
    transparent 70%
  );
  animation: drift3 22s ease-in-out infinite alternate;
}

@keyframes drift1 {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(6vw, 8vh) scale(1.12);
  }
}

@keyframes drift2 {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-7vw, -6vh) scale(1.08);
  }
}

@keyframes drift3 {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-5vw, 5vh) scale(0.9);
  }
}

/* ---------- Motion toggle ---------- */
.motion-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(245, 244, 241, 0.35);
  background: rgba(11, 11, 13, 0.5);
  backdrop-filter: blur(6px);
  color: #f5f4f1;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.motion-toggle[aria-pressed="true"] {
  background: #f5f4f1;
  color: #0b0b0d;
}

/* ---------- Layout ---------- */
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 56px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.desktop-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex: 1;
  width: 100%;
}

/* Hero 마스트헤드: [눈썹 제목 + 이름] | 세로 구분선 | [대표 문장 + 설명 + 근거 요약] */
.hero-text {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3.2vw, 48px);
  width: 100%;
  max-width: 1040px;
  min-width: 0;
  text-align: left;
}

.hero-head {
  flex: none;
}

.hero-divider {
  flex: none;
  align-self: stretch;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(245, 244, 241, 0) 0%,
    rgba(245, 244, 241, 0.5) 18%,
    rgba(245, 244, 241, 0.5) 82%,
    rgba(245, 244, 241, 0) 100%
  );
}

.hero-body {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 560px;
}

/* 눈썹 제목: 작은 대문자 + 양쪽 얇은 선 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family:
    "Pretendard",
    -apple-system,
    "Malgun Gothic",
    sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: rgba(245, 244, 241, 0.78);
  margin: 0 0 8px;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(245, 244, 241, 0.45);
}

/* 넓은 화면에서는 왼쪽 정렬이므로 오른쪽 선은 감춘다 */
.eyebrow::after {
  display: none;
}

/* 이름: 타이트한 자간 + 아래로 갈수록 살짝 푸른 그라데이션 */
.hero-title {
  font-family:
    "Pretendard",
    -apple-system,
    "Malgun Gothic",
    sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  white-space: nowrap;
  color: #ffffff;
  margin: 0;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero-title {
    background: linear-gradient(180deg, #ffffff 0%, #d6e1f3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.hero-subtitle {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #f5f4f1;
  margin: 0 0 6px;
}

/* 넓은 화면에서는 대표 문장을 한 줄로 흘린다 */
.hero-subtitle br {
  display: none;
}

.hero-desc {
  color: #c3cde0;
  max-width: 56ch;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.6;
}

.hero-desc span {
  display: inline;
}

/* 근거 요약: Contact 바와 같은 글래스 pill */
.evidence-summary {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  margin: 14px 0 0;
  padding: 6px 16px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #f5f4f1;
  font-size: 0.82rem;
  line-height: 1.5;
}

.evidence-summary strong {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: #f5f4f1;
  color: #101c30;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.evidence-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
}

.evidence-link {
  appearance: none;
  border: 0;
  border-radius: 3px;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(245, 244, 241, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: text-decoration-color 0.15s ease;
}

.evidence-link:hover,
.evidence-link:focus-visible {
  text-decoration-color: #f5f4f1;
}

.evidence-link + .evidence-link::before {
  content: "·";
  margin-right: 6px;
  color: rgba(245, 244, 241, 0.6);
  text-decoration: none;
  display: inline-block;
}

.hero-text .scope-details {
  max-width: 46ch;
}

.scope-group-title {
  font-weight: 700;
  margin: 0 0 0.5em;
  line-height: 1.3;
}

/* ---------- Folder grid ---------- */
.folder-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 28px clamp(20px, 3vw, 40px);
  flex: none;
  width: 100%;
}

.folder-btn {
  background: transparent;
  border: none;
  color: #f5f4f1;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.folder-btn:hover,
.folder-btn:focus-visible {
  transform: translateY(-4px);
}

.folder-icon-frame {
  position: relative;
  display: block;
  width: clamp(130px, 10vw, 170px);
  height: clamp(130px, 10vw, 170px);
  overflow: hidden;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
}

.folder-icon {
  position: absolute;
  top: 63%;
  left: 50%;
  width: 240%;
  height: 240%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

/* game_icon.png is a centered badge with lots of empty canvas around it
   (unlike the other folder artwork, which already fills most of its frame),
   so it needs its own zoom/position instead of the shared .folder-icon values. */
.folder-icon-game {
  max-width: none;
  top: 60%;
  width: 155%;
  height: 155%;
}

/* zzalkak_icon.png already fills most of its own canvas (unlike the other
   folder artwork, which has generous padding), so it needs a smaller zoom
   to land at the same on-screen size as the rest of the row. */
.folder-icon-zk {
  max-width: none;
  top: 61%;
  width: 64%;
  height: 64%;
}

/* afterwave.png is a full-bleed 3D app-icon graphic like zzalkak_icon.png
   (not a folder-badge composition with generous padding), so it needs the
   same small zoom to land at the same on-screen size as the rest of the row. */
.folder-icon-afterwave {
  max-width: none;
  top: 61%;
  width: 64%;
  height: 64%;
}

/* key.png is a full-bleed graphic like zzalkak_icon.png / afterwave.png
   (not a folder-badge composition with generous padding), so it needs the
   same small zoom to land at the same on-screen size as the rest of the row. */
.folder-icon-key {
  max-width: none;
  top: 61%;
  width: 48%;
  height: 48%;
}

.folder-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.folder-sub {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.2;
  color: #c9c7c2;
}

/* Wide desktop: force the original 5 folders onto one row and let the 6th
   (ZK STUDIO) wrap to a second row under column 1, i.e. directly below
   ABOUT ME. Narrower viewports keep the flex-wrap above, where ZK STUDIO
   (last in source order) naturally lands beside INK ROOM instead. */
@media (min-width: 1181px) {
  .folder-grid {
    display: grid;
    grid-template-columns: repeat(5, auto);
    justify-items: center;
    column-gap: clamp(20px, 3vw, 40px);
    row-gap: 28px;
  }
}

/* ---------- Contact row ---------- */
.contact-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  margin-top: 16px;
}

.contact-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(245, 244, 241, 0.7);
  margin: 0;
}

.glass-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.icon-link {
  color: #13233f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.icon-link svg {
  width: 22px;
  height: 22px;
}

.icon-link:hover,
.icon-link:focus-visible {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
}

.contact-copyright {
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(245, 244, 241, 0.55);
  margin: 0;
}

/* ---------- Modal (dialog) ---------- */
.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(760px, calc(100vw - 48px));
  max-height: min(85vh, 800px);
  border-radius: 20px;
  margin: auto;
}

.modal::backdrop {
  background: rgba(4, 8, 16, 0.66);
  backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  background: rgba(15, 27, 46, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5f4f1;
  border-radius: 20px;
  padding: 0;
  max-height: min(85vh, 800px);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.modal-panel::-webkit-scrollbar {
  width: 5px;
}

.modal-panel::-webkit-scrollbar-track {
  background: transparent;
}

.modal-panel::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.modal-panel::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 138, 101, 0.55);
}

.modal[open] {
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal h2 {
  color: #f5f4f1;
  font-size: 1.6rem;
  font-weight: 800;
}

.modal h3 {
  color: #f5f4f1;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.modal h3:first-of-type {
  margin-top: 24px;
  padding-top: 0;
  border-top: none;
}

.modal h4 {
  color: #f5f4f1;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 4px;
}

.modal h4:first-of-type {
  margin-top: 0;
}

.modal p {
  color: #e7e5e0;
  font-weight: 400;
}

.modal a {
  color: #f5f4f1;
}

.modal a:not(.link-btn):not(.btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal .note {
  color: #c9c7c2;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f5f4f1;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.modal-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 28px 52px 20px 40px;
  background: linear-gradient(
    to bottom,
    rgba(15, 27, 46, 0.98) 0%,
    rgba(15, 27, 46, 0.98) 65%,
    rgba(15, 27, 46, 0) 100%
  );
}

.modal-tab {
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #c9c7c2;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.modal-tab:hover,
.modal-tab:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #f5f4f1;
}

.modal-tab.active {
  background: #f5f4f1;
  border-color: #f5f4f1;
  color: #101c30;
  font-weight: 700;
}

#modal-content {
  padding: 4px 40px 36px;
}

.modal-purpose {
  color: #c9c7c2;
  font-size: 0.9rem;
}

.jump-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}

.jump-btn {
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #f5f4f1;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.jump-btn:hover,
.jump-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 5px 12px 5px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #f5f4f1;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.link-btn svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.link-btn:hover,
.link-btn:focus-visible {
  background: #f5f4f1;
  border-color: #f5f4f1;
  color: #101c30;
  transform: translateY(-1px);
}

.value-list {
  display: grid;
  gap: 10px;
}

.value-list li {
  padding-left: 1.1em;
  position: relative;
  color: #e7e5e0;
}

.value-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: #c9c7c2;
}

.timeline-list {
  display: grid;
  gap: 16px;
  margin: 12px 0 20px;
}

.timeline-list li {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 12px;
}

.timeline-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.timeline-meta {
  color: #c9c7c2;
  font-size: 0.85rem;
  margin: 0 0 6px;
}

.stack-list-sm {
  margin: 8px 0;
}

.stack-list-sm li {
  font-size: 0.78rem;
  padding: 2px 10px;
}

.scope-details {
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 16px;
}

.scope-details summary {
  display: list-item;
  width: fit-content;
  cursor: pointer;
  font-weight: 500;
  color: #f5f4f1;
  user-select: none;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.scope-list li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #e7e5e0;
}

.mark {
  font-weight: 700;
  width: 1.2em;
  flex: none;
}

.mark-public {
  color: #f5f4f1;
}
.mark-private {
  color: #c9c7c2;
}

.stack-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.stack-list li {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #f5f4f1;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
}

.project-list {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.project-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
}

.project-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.status-done {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #f5f4f1;
}

.status-progress {
  background: #f5f4f1;
  color: #101c30;
}

.project-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.source-private {
  color: rgba(245, 244, 241, 0.55);
  font-style: italic;
}

.cert-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.cert-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 8px;
  font-size: 0.92rem;
  color: #e7e5e0;
}

.cert-list li:last-child {
  border-bottom: none;
}

.cert-list li .link-btn {
  margin-left: auto;
}

.cert-name {
  font-weight: 500;
  color: #f5f4f1;
}

.cert-meta {
  color: #c9c7c2;
  font-size: 0.82rem;
  font-weight: 400;
}

.btn {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.btn svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #f5f4f1;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #f5f4f1;
  border-color: #f5f4f1;
  color: #101c30;
  transform: translateY(-1px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  main {
    padding: 48px 20px 32px;
  }

  .desktop-hero {
    flex: none;
    gap: 24px;
  }

  .hero-text .scope-details {
    max-width: 100%;
  }

  .folder-grid {
    max-width: 460px;
    gap: 24px 28px;
  }

  .glass-pill {
    gap: 8px;
    padding: 8px;
  }

  .icon-link {
    width: 44px;
    height: 44px;
  }

  .icon-link svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 900px) {
  .hero-text {
    flex-direction: column;
    gap: 18px;
    width: min(100%, 520px);
    text-align: center;
  }

  .hero-head {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .eyebrow {
    text-indent: 0.28em; /* 자간으로 생긴 오른쪽 여백을 상쇄해 시각적 중앙 정렬 */
  }

  .eyebrow::after {
    display: block;
    margin-left: -0.28em;
  }

  .hero-title {
    white-space: normal;
  }

  .hero-divider {
    align-self: center;
    width: min(100%, 220px);
    height: 1px;
    background: linear-gradient(
      90deg,
      rgba(245, 244, 241, 0) 0%,
      rgba(245, 244, 241, 0.5) 18%,
      rgba(245, 244, 241, 0.5) 82%,
      rgba(245, 244, 241, 0) 100%
    );
  }

  .hero-body {
    max-width: 100%;
  }

  .hero-subtitle br {
    display: inline;
  }

  .hero-desc {
    max-width: 46ch;
    margin: 0 auto;
  }

  .hero-desc span {
    display: block;
  }

  .hero-desc span + span:last-child {
    margin-top: 4px;
  }

  .evidence-summary {
    margin: 16px auto 0;
  }
}

@media (max-width: 560px) {
  /* 좁은 화면에서는 "근거 요약" 배지와 링크 목록이 줄바꿈되므로
     한 줄짜리 알약 모양 대신 왼쪽 정렬 카드로 바꾼다.
     배지는 위, 얇은 구분선, 그 아래 링크 목록 순서로 둔다. */
  .evidence-summary {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    gap: 10px;
    border-radius: 16px;
    padding: 14px 16px;
  }

  .evidence-summary strong {
    align-self: flex-start;
  }

  .evidence-links {
    width: 100%;
    justify-content: flex-start;
    gap: 6px 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .evidence-link {
    white-space: normal;
  }
}

/* ---------- Motion ---------- */
@keyframes about-folder-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Transforming the fixed-size frame moves only the icon visually.
   The label remains in its original layout position, aligned with MUSIC. */
.folder-btn[data-template="about"] .folder-icon-frame {
  animation: about-folder-float 3.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none !important;
  }
  .modal[open] {
    animation: none !important;
  }
  .folder-btn {
    transition: none !important;
  }
  .folder-btn[data-template="about"] .folder-icon-frame {
    animation: none !important;
  }
}

body.reduce-motion .blob {
  animation: none !important;
}

body.reduce-motion .modal[open] {
  animation: none !important;
}

body.reduce-motion .folder-btn {
  transition: none !important;
}

body.reduce-motion .folder-btn[data-template="about"] .folder-icon-frame {
  animation: none !important;
}

/* ---------- t08: PRIVATE ARCHIVE (passkey-gated) ---------- */
/* Opened from its own folder icon in the grid; reuses .modal / .modal-panel
   / .modal-tabs / .modal-close / .modal h2 so it matches the other folder
   dialogs exactly (same title size/position, same content padding). */
.t08-archive-content {
  padding: 4px 40px 36px;
}

.t08-archive-desc {
  margin: 0 0 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(245, 244, 241, 0.85);
  max-width: 56ch;
}

.t08-archive-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: rgba(245, 244, 241, 0.6);
}

.t08-btn {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.t08-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.t08-btn-primary {
  border: 1px solid #e6b25a;
  background: rgba(230, 178, 90, 0.14);
  color: #f5f4f1;
}

.t08-btn-primary:hover:not(:disabled),
.t08-btn-primary:focus-visible:not(:disabled) {
  background: #e6b25a;
  color: #101c30;
  transform: translateY(-1px);
}

.t08-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #f5f4f1;
}

.t08-btn-ghost:hover:not(:disabled),
.t08-btn-ghost:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.t08-login-status,
.t08-manage-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 0.82rem;
}

.t08-status-info {
  color: rgba(245, 244, 241, 0.75);
}

.t08-status-error {
  color: #ff9f8a;
}

.t08-status-success {
  color: #8fd6a5;
}

.t08-unlocked-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.t08-welcome {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.t08-unlocked-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.t08-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.t08-item {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px 16px;
}

.t08-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.t08-item h3 {
  margin: 0;
  font-size: 0.95rem;
}

.t08-item-category {
  font-size: 0.72rem;
  color: #e6b25a;
  letter-spacing: 0.04em;
}

.t08-item p {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(245, 244, 241, 0.85);
  white-space: pre-wrap;
}

.t08-item-updated {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: rgba(245, 244, 241, 0.5);
}

/* Edit/delete stay out of the way until the card is hovered or focused
   (keyboard tab lands inside it) — desktop only. Mobile has no hover, so
   they're always visible there (see the max-width: 640px block below). */
.t08-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.t08-item:hover .t08-item-actions,
.t08-item:focus-within .t08-item-actions {
  opacity: 1;
}

.t08-item-edit,
.t08-item-delete {
  font-family: inherit;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.75rem;
  cursor: pointer;
}

.t08-item-edit {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #f5f4f1;
}

.t08-item-edit:hover,
.t08-item-edit:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.t08-item-delete {
  border: 1px solid rgba(255, 138, 101, 0.55);
  background: transparent;
  color: #ff9f8a;
}

.t08-item-delete:hover,
.t08-item-delete:focus-visible {
  background: rgba(255, 138, 101, 0.16);
}

.t08-item-edit:disabled,
.t08-item-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Inline add/edit form — replaces a card's view content in place, no
   separate page or modal-within-a-modal. */
.t08-item-form {
  display: grid;
  gap: 10px;
}

.t08-item-form label {
  display: block;
  font-size: 0.78rem;
  color: rgba(245, 244, 241, 0.7);
  margin-bottom: 4px;
}

.t08-item-form input,
.t08-item-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f4f1;
}

.t08-item-form textarea {
  min-height: 90px;
  resize: vertical;
}

.t08-item-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.t08-item-status {
  min-height: 1.1em;
  margin: 0;
  font-size: 0.78rem;
}

.t08-item-empty {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(245, 244, 241, 0.6);
}

/* Passkey management modal reuses .modal / .modal-panel / .modal-tabs /
   .modal-close / .modal h2 so it matches the existing dialog styling
   exactly. */
.t08-manage-content {
  padding: 4px 40px 36px;
}

.t08-passkey-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.t08-passkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 14px;
}

.t08-passkey-row strong {
  font-size: 0.88rem;
}

.t08-passkey-meta {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: rgba(245, 244, 241, 0.6);
}

.t08-passkey-delete {
  font-family: inherit;
  flex: none;
  border: 1px solid rgba(255, 138, 101, 0.55);
  background: transparent;
  color: #ff9f8a;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
}

.t08-passkey-delete:hover:not(:disabled) {
  background: rgba(255, 138, 101, 0.16);
}

.t08-passkey-delete:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.t08-add-passkey label {
  display: block;
  font-size: 0.78rem;
  color: rgba(245, 244, 241, 0.7);
  margin-bottom: 6px;
}

.t08-add-passkey-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.t08-add-passkey-row input {
  flex: 1 1 200px;
  min-width: 0;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f4f1;
}

.t08-add-passkey-row input::placeholder {
  color: rgba(245, 244, 241, 0.45);
}

@media (max-width: 640px) {
  .t08-unlocked-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .t08-unlocked-actions {
    width: 100%;
  }
  .t08-unlocked-actions .t08-btn {
    flex: 1 1 auto;
  }
  .t08-manage-content,
  .t08-archive-content {
    padding: 4px 20px 24px;
  }
  /* No hover on touch devices — edit/delete must always be reachable. */
  .t08-item-actions {
    opacity: 1;
  }
}
