/* ================= 홈 전용: hero, 터미널, 통계 ================= */
/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin-top: calc(var(--top-h) * -1);
  min-height: 88vh; min-height: 88svh;
  display: flex; align-items: center;
  background: var(--hero-bg); color: var(--hero-fg);
  padding: calc(var(--top-h) + 56px) 0 112px;
  container-type: inline-size;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; background: #7c3aed; top: -160px; right: -120px; animation: float 14s ease-in-out infinite; }
.hero::after { width: 420px; height: 420px; background: #06b6d4; bottom: -180px; left: -100px; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(-40px, 30px) scale(1.08); } }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero .wrap { position: relative; z-index: 1; width: 100%; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05);
  font-size: 13px; letter-spacing: .12em; color: var(--hero-muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); }
.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(36px, 6.2cqi, 68px); line-height: 1.1; letter-spacing: -0.04em; font-weight: 800;
  min-height: 2.2em;
}
.typed {
  background: linear-gradient(90deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.h-caret {
  display: inline-block; width: .08em; height: .9em; margin-left: .06em;
  background: #67e8f9; vertical-align: -0.08em;
  animation: blink 1s steps(1) infinite;
}
.hero p.lead { max-width: 480px; margin: 0; font-size: 17px; color: var(--hero-muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-primary { background: #f8fafc; color: #0b1020; }
.btn-ghost { border: 1px solid rgba(255,255,255,.2); color: var(--hero-fg); background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-ghost code { font-family: var(--mono); font-size: 13px; color: #67e8f9; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .2em; color: var(--hero-muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint::after { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--hero-muted), transparent); animation: drop 2s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Terminal (hero 안, 항상 다크) ---------- */
.term {
  --t-bg: rgba(13, 17, 23, .92);
  --t-bar: #161b22;
  --t-line: #30363d;
  --t-fg: #c9d1d9;
  --t-dim: #6e7681;
  --t-green: #3fb950;
  --t-blue: #58a6ff;
  --t-yellow: #d29922;
  --t-purple: #bc8cff;
  --t-red: #ff7b72;
  --t-cyan: #39c5cf;
  display: flex; flex-direction: column;
  height: 420px;
  border-radius: 14px; overflow: hidden;
  background: var(--t-bg); color: var(--t-fg);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: var(--mono), "Pretendard Variable", sans-serif;
  font-size: 13px; line-height: 1.65;
}
.term ::selection { background: var(--t-blue); color: #0d1117; }
.t-bar {
  position: relative; display: flex; align-items: center; gap: 8px; flex: none;
  height: 36px; padding: 0 14px; background: var(--t-bar); border-bottom: 1px solid var(--t-line);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.t-bar .title { position: absolute; left: 50%; transform: translateX(-50%); color: var(--t-dim); font-size: 12px; white-space: nowrap; }
.screen { flex: 1; overflow-y: auto; padding: 14px 18px; cursor: text; scrollbar-width: thin; scrollbar-color: var(--t-line) transparent; }
/* 폰 키보드로 입력하기 번거로우니 터치 기기에선 눌러서 실행하는 명령 칩 제공 */
.t-chips { display: none; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.t-chips button {
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: var(--hero-fg); font-family: var(--mono); font-size: 12.5px;
}
.t-chips button::before { content: "$ "; color: #3fb950; }
.t-chips button:active { background: rgba(255,255,255,.16); }
@media (max-width: 860px) { .t-chips { display: flex; } }
:root.touch .t-chips { display: flex; }
.t-status {
  display: flex; justify-content: space-between; gap: 12px; flex: none;
  padding: 3px 14px; font-size: 11.5px; background: var(--t-green); color: #0d1117;
}
.t-status b { font-weight: 700; }
.line { white-space: pre-wrap; word-break: break-word; }
.block { margin-bottom: 10px; }
.ps1 { color: var(--t-green); font-weight: 700; }
.ps1 .path { color: var(--t-blue); }
.dim { color: var(--t-dim); }
.err { color: var(--t-red); }
.ok { color: var(--t-green); }
.term a { color: var(--t-blue); }
.term a:hover { text-decoration: underline; text-underline-offset: 3px; }
.kv { display: grid; grid-template-columns: 13ch 1fr; gap: 0 12px; margin: 0; padding-left: 2ch; }
.kv dt { color: var(--t-yellow); }
.kv dd { margin: 0; }
.ls { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0 2ch; }
.ls > * { padding: 1px 0; }
.ls .d { color: var(--t-yellow); }
.ls .c { color: var(--t-purple); }
.ls a { color: var(--t-fg); font-family: "Pretendard Variable", Pretendard, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls a:hover { color: var(--t-blue); }
.t-tags a { color: var(--t-cyan); margin-right: 2ch; }
.prompt { display: flex; align-items: baseline; gap: 1ch; }
.prompt input {
  flex: 1; min-width: 0; padding: 0;
  background: transparent; border: 0; outline: 0;
  color: var(--t-fg); font: inherit; caret-color: var(--t-green);
}
.hint { color: var(--t-dim); font-size: 12px; margin-top: 2px; }
.hint code { color: var(--t-cyan); font-family: inherit; }
.t-caret { display: inline-block; width: .6em; height: 1.1em; background: var(--t-green); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }

/* ---------- Stats ---------- */
.stats-wrap { position: relative; z-index: 2; margin-top: -52px; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.stat { padding: 26px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong {
  display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Container queries ---------- */
@container (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero h1 { font-size: clamp(36px, 9cqi, 60px); min-height: 1.2em; }
  .scroll-hint { display: none; }
}

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .hero { padding: calc(var(--top-h) + 32px) 0 96px; min-height: 0; }
  .hero p.lead { font-size: 16px; }
  .term { height: 360px; font-size: 12px; }
  .t-bar .title { display: none; }
  .ls { grid-template-columns: auto minmax(0, 1fr); }
  .ls .c { display: none; }
  .stat { padding: 18px 10px; }
  .stat strong { font-size: 28px; }
}

/* 거를 때 숨긴 카드 (.card의 display:flex가 hidden 속성을 이겨서 따로 정한다) */
.cards > [hidden] { display: none; }
