/* =========================================================================
   NYEJUN 게임 허브 — 공통 스타일시트
   테마: "딥 스페이스" 단일 테마 (data-theme="space")
   나중에 새 테마를 추가하려면 :root, html[data-theme="space"] 블록과
   같은 형태로 html[data-theme="새이름"] 블록을 하나 더 추가하면 됩니다.

   디자인 키워드: Calm / Deep Space / Personal Archive / Experimental Lab /
                 Premium / Minimal SF — 네온 남용, 과도한 글래스모피즘 지양.
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* -------------------------------------------------------------------------
   딥 스페이스 테마 — 컬러/타이포/레이아웃 토큰
   ------------------------------------------------------------------------- */
:root,
html[data-theme="space"] {
  color-scheme: dark;

  /* 배경 */
  --bg-primary: #070b14;
  --bg-secondary: #0a1020;
  --surface-primary: #10192b;

  /* 텍스트 */
  --text-primary: #f2f6ff;
  --text-secondary: #a8b3cc;
  --text-tertiary: #6f7b96;

  /* 포인트 컬러 — 시안은 CTA/게임, 보라는 학습지/보조 상태 전용 */
  --accent-cyan: #55d6ff;
  --accent-blue: #5b8cff;
  --accent-violet: #9381ff;
  --accent-soft: rgba(85, 214, 255, 0.1);
  --accent-glow: rgba(85, 214, 255, 0.35);
  --worksheet-soft: rgba(147, 129, 255, 0.12);

  /* 테두리 — 흰색이 아닌 푸른 기가 도는 톤 */
  --border-default: rgba(180, 205, 255, 0.1);
  --border-hover: rgba(85, 214, 255, 0.45);

  /* 게임/학습지 섹션 액센트 매핑 */
  --game-accent: var(--accent-cyan);
  --worksheet-accent: var(--accent-violet);

  /* 하위 페이지 별칭 — worksheets/sentence-forms/index.html 의 인라인 스타일이
     참조하는 변수명. 이름은 유지하고 값만 새 토큰에 맞춰 갱신한다.
     (하위 페이지가 실제로 쓰는 것만 남김 — 새로 추가할 땐 실사용 확인 후) */
  --text: var(--text-primary);
  --text-muted: var(--text-secondary);
  --surface: var(--surface-primary);
  --border: var(--border-default);
  --border-strong: rgba(180, 205, 255, 0.22);
  --accent-contrast: #06101b;

  --shadow-color: 3, 6, 14;
  --shadow-sm: 0 2px 10px rgba(var(--shadow-color), 0.45);
  --shadow-md: 0 18px 36px -16px rgba(var(--shadow-color), 0.6);
  --shadow-lg: 0 30px 60px -20px rgba(var(--shadow-color), 0.7);

  --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));

  --radius-card: 20px;
  --radius-button: 12px;
  --radius-pill: 999px;
  --radius-sm: 10px;

  /* 서체 — Pretendard(한글/본문), Orbitron(로고·숫자·짧은 영문 라벨 전용) */
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", "Noto Sans KR", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;
  --font-display: "Orbitron", "Pretendard Variable", sans-serif;

  /* 레이아웃 리듬 */
  --section-gap-desktop: 112px;
  --section-gap-mobile: 72px;

  /* 모션 — 세 종류로 제한: 진입 / 카드 hover / 성운 드리프트 */
  --motion-fast: 180ms;
  --motion-default: 260ms;
  --motion-slow: 900ms;
}

/* -------------------------------------------------------------------------
   웹폰트 (저장소에 동봉 — 외부 요청 없음, file:// 지원)
   Pretendard: 본문·긴 제목용 한글/라틴 (SIL OFL)
     → @font-face 는 css/pretendard.css 에 있다(92조각 dynamic subset).
       각 페이지에서 이 파일보다 **먼저** 불러온다.
       예전엔 2.06MB 통짜 하나를 무조건 받았는데, 지금은 화면에 나온
       글자가 속한 조각만 받는다.
   Orbitron: 로고·작품 개수·짧은 영문 라벨·상태 코드 전용 (SIL OFL)
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Orbitron";
  src: url("../assets/fonts/Orbitron.ttf") format("truetype-variations");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------------------
   기본 레이아웃 & 배경
   ------------------------------------------------------------------------- */
body {
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;

  /* 페이지 전체 배경: 은은한 이중 글로우 그라디언트 + 딥 네이비 베이스 */
  background:
    radial-gradient(circle at 75% 8%, rgba(47, 128, 237, 0.14), transparent 34%),
    radial-gradient(circle at 15% 30%, rgba(79, 209, 255, 0.06), transparent 28%),
    var(--bg-primary);
}

/* 다층 별밭 (정적) — 멀리/중간/가까이 3단계 크기·밝기로 실제 밤하늘 밀도를 표현.
   빠른 별 이동이나 강한 반짝임은 넣지 않는다 (지시서 13절 준수). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    /* 먼 별 (18개, 작고 흐리게) */
    radial-gradient(1px 1px at 5% 6%, rgba(255,255,255,0.16) 50%, transparent 51%),
    radial-gradient(1px 1px at 13% 22%, rgba(255,255,255,0.2) 50%, transparent 51%),
    radial-gradient(1px 1px at 21% 9%, rgba(255,255,255,0.24) 50%, transparent 51%),
    radial-gradient(1px 1px at 29% 41%, rgba(255,255,255,0.18) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 55%, rgba(255,255,255,0.22) 50%, transparent 51%),
    radial-gradient(1px 1px at 17% 71%, rgba(255,255,255,0.16) 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 84%, rgba(255,255,255,0.2) 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 12%, rgba(255,255,255,0.24) 50%, transparent 51%),
    radial-gradient(1px 1px at 43% 48%, rgba(255,255,255,0.18) 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 73%, rgba(255,255,255,0.22) 50%, transparent 51%),
    radial-gradient(1px 1px at 59% 7%, rgba(255,255,255,0.16) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 35%, rgba(255,255,255,0.2) 50%, transparent 51%),
    radial-gradient(1px 1px at 73% 60%, rgba(255,255,255,0.24) 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 21%, rgba(255,255,255,0.18) 50%, transparent 51%),
    radial-gradient(1px 1px at 87% 46%, rgba(255,255,255,0.22) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 74%, rgba(255,255,255,0.16) 50%, transparent 51%),
    radial-gradient(1px 1px at 3% 90%, rgba(255,255,255,0.2) 50%, transparent 51%),
    radial-gradient(1px 1px at 96% 15%, rgba(255,255,255,0.24) 50%, transparent 51%),
    /* 중간 별 (12개) */
    radial-gradient(1.5px 1.5px at 10% 17%, rgba(255,255,255,0.36) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 24% 47%, rgba(255,255,255,0.42) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 74%, rgba(255,255,255,0.48) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 6%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 53% 57%, rgba(255,255,255,0.36) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 61% 84%, rgba(255,255,255,0.42) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 14%, rgba(255,255,255,0.48) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 75% 42%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 83% 67%, rgba(255,255,255,0.36) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 30%, rgba(255,255,255,0.42) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,255,255,0.48) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 35%, rgba(255,255,255,0.4) 50%, transparent 51%),
    /* 가까운 별 (8개, 크고 밝게) */
    radial-gradient(2.2px 2.2px at 19% 14%, rgba(255,255,255,0.65) 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 38% 64%, rgba(255,255,255,0.75) 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 56% 22%, rgba(255,255,255,0.85) 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 70% 77%, rgba(255,255,255,0.7) 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 82% 12%, rgba(255,255,255,0.65) 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 88% 54%, rgba(255,255,255,0.75) 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 11% 62%, rgba(255,255,255,0.85) 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 63% 42%, rgba(255,255,255,0.7) 50%, transparent 51%);
  background-repeat: no-repeat;
}

/* 우주 사진(하늘) — 페이지 상단에 고정 배치되어 스크롤해도 그 자리에 "떠 있고",
   아래로 갈수록 --bg-primary 로 자연스럽게 페이드아웃한다. 경계가 보이는 사각
   패널이 아니라 사이트 전체가 이 하늘 위에 떠 있는 느낌을 만드는 것이 목적. */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: min(760px, 78vh);
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(7, 11, 20, 0.3) 0%, rgba(7, 11, 20, 0.45) 35%, var(--bg-primary) 72%),
    url("../assets/hero-space.jpg");
  background-size: cover, cover;
  background-position: center top, center top;
  background-repeat: no-repeat, no-repeat;
}

/* 배경 성운 — 사이트에서 유일하게 "계속 움직이는" 장식, 아주 느리게 드리프트 */
.nebula {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  top: -140px;
  right: -100px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(85, 214, 255, 0.14), transparent 60%),
    radial-gradient(circle at 65% 60%, rgba(91, 140, 255, 0.1), transparent 65%);
  filter: blur(6px);
  animation: nebula-drift 26s ease-in-out infinite;
}

@keyframes nebula-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24px, 18px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.wrapper {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

a { color: inherit; }

/* -------------------------------------------------------------------------
   헤더
   ------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 2;
  background: rgba(7, 11, 20, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(180, 205, 255, 0.1);
}

.site-header__inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand__mark {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 22px -6px var(--accent-glow);
}

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

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.14em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--motion-fast) ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--text-primary); }

@media (max-width: 767px) {
  /* 모바일: 로고만 노출, 메뉴는 숨김 */
  .site-nav { display: none; }
}

/* -------------------------------------------------------------------------
   히어로
   ------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  z-index: 1;
  min-height: min(82vh, 720px);
  display: flex;
  align-items: center;
  padding: var(--section-gap-desktop) 0 calc(var(--section-gap-desktop) * 0.6);
}

.hero {
  width: 100%;
}

.hero__content {
  max-width: 640px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  /* 하늘 배경 위에 놓이므로 뒤가 무엇이든 대비가 보장되도록 불투명 바탕을 깔고
     그 위에 액센트 틴트를 얹는다 (틴트만 쓰면 하늘 밝기에 대비가 좌우됨) */
  background: linear-gradient(var(--accent-soft), var(--accent-soft)), rgba(7, 11, 20, 0.82);
  border: 1px solid rgba(85, 214, 255, 0.22);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin: 0 0 20px;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  margin: 0 0 32px;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.75;
  max-width: 46ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 13px 20px;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: transform var(--motion-default) cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow var(--motion-default) ease, border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}

.button-primary {
  background: linear-gradient(135deg, #55d6ff, #5b8cff);
  color: #06101b;
  box-shadow: 0 16px 32px -14px var(--accent-glow);
}

.button-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px var(--accent-glow); }
.button-primary:active { transform: translateY(0); }

.button-secondary {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(180, 205, 255, 0.14);
  color: #eaf1ff;
}

.button-secondary:hover { border-color: var(--border-hover); background: rgba(255, 255, 255, 0.06); }

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 0;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.stat-label {
  /* 하늘 배경 위에 직접 놓이므로 --text-tertiary 계열(#7d89a3)로는 WCAG AA(4.5)를
     만족할 수 없다(순수 검정 위에서도 최대 4.95). 한 단계 밝은 색을 쓴다. */
  color: var(--text-secondary);
  font-size: 13px;
}

@media (max-width: 767px) {
  .hero-section { min-height: min(70vh, 560px); }
  .hero-title { font-size: 40px; }
}

/* -------------------------------------------------------------------------
   섹션 공통 & 빈 상태
   ------------------------------------------------------------------------- */
.section {
  position: relative;
  z-index: 1;
  padding: 0 0 var(--section-gap-desktop);
}

.section__head {
  margin: 0 0 28px;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent-cyan);
  margin: 0 0 8px;
}

.section-eyebrow--worksheet { color: var(--accent-violet); }

.section-title {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 750;
  color: var(--text-primary);
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 56px 24px;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.015);
}

.empty-state__orbit {
  position: relative;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border: 1px solid rgba(85, 214, 255, 0.3);
  border-radius: 50%;
}

.empty-state__dot {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px 2px var(--accent-glow);
}

.empty-state__title {
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
}

.empty-state__desc {
  margin: 0;
  /* 섹션이 비면 하늘 영역에 걸칠 수 있어 한 단계 밝은 색 */
  color: var(--text-secondary);
  font-size: 14px;
}

/* 진입 애니메이션 (opacity + 8px 이동) — 목록 아이템 공통 */
.project-grid > li,
.worksheet-list > li {
  opacity: 0;
  animation: reveal-in var(--motion-slow) ease forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

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

/* -------------------------------------------------------------------------
   게임 카드 (썸네일 중심)
   ------------------------------------------------------------------------- */
.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
  --card-accent: var(--game-accent);
  --card-accent-soft: var(--accent-soft);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--motion-default) cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow var(--motion-default) ease, border-color var(--motion-fast) ease;
}

a.project-card:hover,
a.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(85, 214, 255, 0.38);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35), 0 0 36px rgba(85, 214, 255, 0.06);
}

a.project-card:active {
  transform: translateY(-2px) scale(0.98);
}

a.project-card:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 2px;
}

.project-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-thumbnail__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 실제 스크린샷 준비 전 플레이스홀더: 그라디언트 + 큰 이모지 + 궤도 장식 */
.project-thumbnail--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(85, 214, 255, 0.24), transparent 60%), var(--bg-secondary);
}

.project-grid > li:nth-child(3n+2) .project-thumbnail--placeholder {
  background: radial-gradient(circle at 70% 30%, rgba(91, 140, 255, 0.24), transparent 60%), var(--bg-secondary);
}

.project-grid > li:nth-child(3n+3) .project-thumbnail--placeholder {
  background: radial-gradient(circle at 50% 75%, rgba(147, 129, 255, 0.2), transparent 60%), var(--bg-secondary);
}

.project-thumbnail--placeholder::before {
  content: "";
  position: absolute;
  width: 72%;
  aspect-ratio: 2.3 / 1;
  border: 1px solid rgba(180, 205, 255, 0.2);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.project-thumbnail__emoji {
  position: relative;
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

.project-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  flex: 1;
}

.project-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--card-accent, var(--text-tertiary));
  background: var(--card-accent-soft);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.card-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.card-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  flex: 1;
}

.project-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--card-accent);
}

/* -------------------------------------------------------------------------
   배지
   ------------------------------------------------------------------------- */
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.badge--live {
  background: rgba(10, 16, 32, 0.55);
  color: var(--card-accent, var(--accent-cyan));
  border: 1px solid var(--card-accent-soft, var(--accent-soft));
}

.badge__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge--soon {
  background: rgba(10, 16, 32, 0.55);
  border: 1px solid var(--border-strong);
  color: var(--text-tertiary);
}

/* 준비 중 카드: 링크 없음, 살짝 흐릿하지만 제목/설명은 읽힘 */
.is-soon {
  cursor: default;
  filter: saturate(0.5) brightness(0.92);
}

.is-soon .card-title { color: var(--text-secondary); }
.is-soon .card-desc { color: var(--text-tertiary); }

/* -------------------------------------------------------------------------
   학습지 카드 (문서형 가로 카드)
   ------------------------------------------------------------------------- */
.worksheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.worksheet-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--motion-fast) ease, background-color var(--motion-default) ease,
    box-shadow var(--motion-default) ease, transform var(--motion-fast) ease;
}

a.worksheet-card:hover,
a.worksheet-card:focus-visible {
  border-color: var(--worksheet-accent);
  background: rgba(147, 129, 255, 0.05);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3), 0 0 32px rgba(147, 129, 255, 0.08);
}

a.worksheet-card:active {
  transform: scale(0.99);
}

a.worksheet-card:focus-visible {
  outline: 2px solid var(--worksheet-accent);
  outline-offset: 2px;
}

.worksheet-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 25%, var(--worksheet-soft), transparent 70%), var(--bg-secondary);
  border: 1px solid var(--worksheet-soft);
  flex: none;
}

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

.worksheet-card__icon .project-thumbnail__emoji { font-size: 30px; }

.worksheet-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.worksheet-card__action {
  display: flex;
  align-items: center;
  gap: 10px;
}

.format-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--worksheet-accent);
  background: var(--worksheet-soft);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}

.open-button {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--worksheet-accent);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .worksheet-card {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    padding: 18px;
  }
  .worksheet-card__icon { width: 56px; height: 56px; }
  .worksheet-card__action {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 4px;
  }
}

/* -------------------------------------------------------------------------
   noscript 안내
   ------------------------------------------------------------------------- */
.noscript-banner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 20px auto;
  padding: 16px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.noscript-banner a {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* -------------------------------------------------------------------------
   소식 (Personal Archive 톤 — 카드가 아니라 얇은 기록 줄로 처리해
   게임/학습지 카드와 시각적으로 경쟁하지 않게 한다)
   ------------------------------------------------------------------------- */
.section-eyebrow--news { color: var(--text-secondary); }

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-default);
}

.news-item {
  border-bottom: 1px solid var(--border-default);
  opacity: 0;
  animation: reveal-in var(--motion-slow) ease forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.news-entry {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: baseline;
  gap: 20px;
  padding: 18px 4px;
  text-decoration: none;
  color: inherit;
  transition: background var(--motion-fast) ease, padding-left var(--motion-fast) ease;
}

a.news-entry:hover,
a.news-entry:focus-visible {
  background: rgba(180, 205, 255, 0.045);
  padding-left: 10px;
}

a.news-entry:active { padding-left: 6px; }

a.news-entry:focus-visible {
  outline: 2px solid var(--border-hover);
  outline-offset: -2px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.news-date {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.news-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  color: var(--accent-cyan);
  background: var(--accent-soft);
  border: 1px solid rgba(85, 214, 255, 0.2);
  white-space: nowrap;
}

.news-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
}

.news-arrow {
  display: inline-block;
  margin-left: 8px;
  color: var(--accent-cyan);
  transition: transform var(--motion-fast) ease;
}

a.news-entry:hover .news-arrow { transform: translateX(4px); }

.news-desc {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

@media (max-width: 639px) {
  .news-entry {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 4px;
  }
  .news-title { font-size: 15px; }
}

/* -------------------------------------------------------------------------
   푸터
   ------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(180, 205, 255, 0.08);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  gap: 16px;
}

.site-footer__copy {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 13px;
}

.site-footer__links {
  display: flex;
  gap: 20px;
}

.site-footer__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color var(--motion-fast) ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible { color: var(--accent-cyan); }

@media (max-width: 640px) {
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* -------------------------------------------------------------------------
   404 페이지
   ------------------------------------------------------------------------- */
.not-found {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 20px;
}

/* 레이더 핑 장식 (아무 신호도 없다는 느낌, 절제된 SF 톤) */
.radar {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 0 28px;
}

.radar__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--accent-cyan);
  border-radius: 50%;
  opacity: 0;
  animation: radar-ping 3.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.radar__ring:nth-child(2) { animation-delay: 1.2s; }
.radar__ring:nth-child(3) { animation-delay: 2.4s; }

.radar__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 18px 4px var(--accent-glow);
}

@keyframes radar-ping {
  0% { transform: scale(0.25); opacity: 0.8; }
  80% { opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.not-found__code {
  font-family: var(--font-mono);
  /* 하늘 배경 위 — .stat-label 과 같은 이유로 한 단계 밝은 색 */
  color: var(--text-secondary);
  letter-spacing: 0.14em;
  font-size: 13px;
  margin: 0 0 6px;
}

.not-found__title {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  margin: 0 0 10px;
}

.not-found__desc {
  color: var(--text-secondary);
  margin: 0 0 26px;
  max-width: 40ch;
}

/* -------------------------------------------------------------------------
   모바일 공통 여백
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .hero-section { padding: var(--section-gap-mobile) 0 calc(var(--section-gap-mobile) * 0.6); }
  .section { padding-bottom: var(--section-gap-mobile); }
  .project-body { padding: 18px; }
}

@media (max-width: 380px) {
  .brand__name { font-size: 18px; }
}
