/* ================= 소개 전용: hero, 터미널, 통계, 경력(프로젝트 cat 토글), 교육·자격증, 기술 스택, 연락처 ================= */
.hero {
  position: relative; overflow: hidden;
  margin-top: calc(var(--top-h) * -1);
  padding: calc(var(--top-h) + 64px) 0 120px;
  background: var(--hero-bg); color: var(--hero-fg);
  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; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); 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(34px, 5.4cqi, 58px); line-height: 1.15; letter-spacing: -0.04em; font-weight: 800; }
.grad { background: linear-gradient(90deg, #c4b5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { max-width: 460px; 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); }

/* 터미널 색. 히어로 터미널은 히어로 배경이 늘 어두워서 어두운 색 하나만 쓴다 */
.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-cyan: #39c5cf;
}
/* 카드 안 cat 출력 창은 카드 배경을 따라간다: 라이트는 밝은 터미널 색, 다크는 히어로 터미널과 같은 색 */
.peek {
  --t-bg: #f6f8fa; --t-line: var(--line); --t-fg: #24292f; --t-dim: #6e7781;
  --t-yellow: #9a6700; --t-purple: #8250df; --t-cyan: #1b7c83;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .peek {
    --t-bg: #0d1117; --t-line: #30363d; --t-fg: #c9d1d9; --t-dim: #6e7681;
    --t-yellow: #d29922; --t-purple: #bc8cff; --t-cyan: #39c5cf;
  }
}
:root[data-theme="dark"] .peek {
  --t-bg: #0d1117; --t-line: #30363d; --t-fg: #c9d1d9; --t-dim: #6e7681;
  --t-yellow: #d29922; --t-purple: #bc8cff; --t-cyan: #39c5cf;
}
.term {
  display: flex; flex-direction: column; height: 400px;
  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;
}
.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; scrollbar-width: thin; scrollbar-color: var(--t-line) transparent; }
.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); }
.kv { display: grid; grid-template-columns: 10ch 1fr; gap: 0 12px; margin: 0; padding-left: 2ch; }
.kv dt { color: var(--t-yellow); }
.kv dd { margin: 0; }
.kv a { color: var(--t-blue); }
.md-h { color: var(--t-purple); font-weight: 700; }
.md-li::before { content: "- "; color: var(--t-cyan); }
.t-caret { display: inline-block; width: .6em; height: 1.1em; background: var(--t-green); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
/* 명령 칩: 누르면 터미널에 찍고 해당 섹션으로 스크롤 */
.t-chips { display: flex; 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:hover { background: rgba(255,255,255,.12); }

/* 통계 (홈과 같은 모양) */
.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; }

/* 경력: history 출력처럼 */
.timeline { display: grid; gap: 16px; }
.job { display: grid; grid-template-columns: 17ch minmax(0, 1fr); gap: 24px; }
.job time { padding-top: 22px; font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.job.now time { color: var(--accent); font-weight: 700; }
.job-card { padding: 20px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.job-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.job-card h3 { margin: 0; font-size: 18px; }
.job-card h3 small { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.job-card .badge { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.job-card p { margin: 4px 0 12px; color: var(--muted); font-size: 15px; }

/* 기술 스택 */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill { padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.skill h3 { margin: 0 0 12px; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent); }
.skill h3::before { content: "~/skills/"; color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; }

/* 연락처 */
.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 32px 36px; border-radius: 20px;
  background: var(--hero-bg); color: var(--hero-fg); position: relative; overflow: hidden;
}
.contact::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: #7c3aed; filter: blur(70px); opacity: .4; top: -160px; right: -60px; pointer-events: none; }
.contact > * { position: relative; }
.contact h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.contact p { margin: 0; color: var(--hero-muted); }
.contact dl { display: grid; grid-template-columns: 8ch 1fr; gap: 4px 12px; margin: 18px 0 0; font-family: var(--mono); font-size: 13.5px; }
.contact dt { color: #d29922; }
.contact dd { margin: 0; }
.contact dd a { color: #67e8f9; }
.contact dd a:hover { text-decoration: underline; text-underline-offset: 3px; }

@container (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@container (max-width: 720px) {
  .job { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .job time { padding-top: 0; }
  .skills { grid-template-columns: minmax(0, 1fr); }
  .contact { grid-template-columns: minmax(0, 1fr); padding: 26px 22px; }
}
@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; }
  .term { height: 340px; font-size: 12px; }
  .t-bar .title { display: none; }
  .stat { padding: 18px 10px; }
  .stat strong { font-size: 28px; }
}
/* 히어로 터미널 whoami: 사진 + 정보 */
.who { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 0 14px; align-items: start; padding-left: 2ch; }
.who img { width: 50px; height: 70px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px var(--t-line); }
.who .kv { padding-left: 0; }
/* cat 토글: 올리면 명령어가 쳐지고, 누르면 출력이 펼쳐진다 (<details> 그대로라 키보드·JS 없이도 열린다) */
.job-card .proj { padding: 12px 0 0; border-top: 1px dashed var(--line); margin-top: 12px; }
.job-card .proj:first-of-type { margin-top: 4px; }
.peek summary { cursor: pointer; list-style: none; }
.peek summary::-webkit-details-marker { display: none; }
.proj-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 600; font-size: 15.5px; }
.proj-title span { font-weight: 400; font-size: 13.5px; color: var(--muted); }
.proj-title time { margin-left: auto; font-family: var(--mono); font-weight: 400; font-size: 12.5px; color: var(--muted); }
.peek-cmd { display: flex; align-items: center; gap: 1ch; min-height: 1.7em; margin-top: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.peek-cmd .p { color: var(--accent-2); font-weight: 700; }
.peek-cmd .typed { color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-cmd .typed.ghost { color: var(--muted); opacity: .5; }
.peek-cmd .caret { flex: none; width: .55em; height: 1.1em; margin-left: -1ch; background: var(--accent-2); visibility: hidden; }
.peek summary:hover .caret, .peek summary:focus-visible .caret, .peek.typing .caret { visibility: visible; animation: blink 1s steps(1) infinite; }
.peek[open] .caret { display: none; }
.peek-cmd .hint { flex: none; color: var(--muted); opacity: 0; transition: opacity .2s; }
.peek.typed summary:hover .hint, .peek.typed summary:focus-visible .hint, .peek[open] .hint { opacity: .8; }
.peek .hint::before { content: "# 눌러서 열기"; }
.peek[open] .hint::before { content: "# 다시 누르면 닫힘"; }
.peek summary:hover .p, .peek[open] .p { color: var(--accent); }
.out {
  margin: 8px 0 4px; padding: 12px 16px; border-radius: 10px;
  background: var(--t-bg); color: var(--t-fg); box-shadow: 0 0 0 1px var(--t-line);
  font-family: var(--mono), "Pretendard Variable", sans-serif; font-size: 13px; line-height: 1.7;
}
.out .md-h { margin-bottom: 4px; }
.out .md-li { padding-left: 2ch; text-indent: -2ch; }
.out .md-li::before { content: "- "; }
.out .note { color: var(--t-yellow); }
.out .note::before { content: "> "; color: var(--t-dim); }
.out .tools { margin-top: 6px; color: var(--t-dim); }
.out .tools b { color: var(--t-cyan); font-weight: 400; }
.out dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 0; }
.out dt { color: var(--t-yellow); }
.out dd { margin: 0; }
.out dd b { color: var(--t-purple); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .peek[open] .out { animation: out-in .22s ease-out; }
  @keyframes out-in { from { opacity: 0; transform: translateY(-4px); } }
}
.chips span.study { color: var(--muted); border-style: dashed; }
.skill .legend { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.edu { display: grid; gap: 12px; }
.edu-row { display: grid; grid-template-columns: 17ch minmax(0, 1fr); gap: 24px; }
.edu-row time { padding-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.edu-card { padding: 16px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.edu-card h3 { margin: 0; font-size: 17px; }
.edu-card h3 small { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.edu-card p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.edu-card details { margin-top: 6px; }
.edu-card.cert h3::before { content: "✓ "; color: #22c55e; }
main > section.wrap:last-child { padding-bottom: 120px; }
.t-chips button:focus-visible, .btn:focus-visible, .peek summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
@container (max-width: 720px) {
  .edu-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .edu-row time { padding-top: 0; }
  /* 좁은 화면: 명령을 자르지 않고 줄바꿈, 안내 주석은 뺀다 */
  .peek-cmd { align-items: flex-start; }
  .peek-cmd .typed { white-space: normal; overflow-wrap: anywhere; }
  .peek-cmd .hint { display: none; }
}
