/* ======================================================
   v6 : VS Code + Figma  (style.css 다음에 불러옴)
   ====================================================== */
:root {
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --head-h: 72px;
  --status-h: 26px;
  --editor-bg: #17191c;
}
body { padding-bottom: var(--status-h); }

/* 상단: 탭 막대 + 경로 */
.ide-head { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.ide-tabs { display: flex; align-items: stretch; height: 44px; background: #f6f6f4; border-bottom: 1px solid var(--line); }
.ide-tabs .who {
  flex: none; display: flex; align-items: center; padding: 0 18px;
  font-family: var(--title); font-weight: 800; font-size: 14px; letter-spacing: -0.02em; color: var(--charcoal);
  border-right: 1px solid var(--line);
}
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0; color: var(--muted);
  border-right: 1px solid var(--line); border-top: 2px solid transparent;
  transition: color .15s, background .15s;
}
.tab:hover { color: var(--charcoal); }
.tab.active { background: #fff; color: var(--charcoal); border-top-color: var(--accent); }
.fi { font-family: var(--mono); font-size: 10px; font-weight: 800; }
.fi.html { color: var(--orange); }
.fi.tsx, .fi.css { color: var(--accent); }
.fi.md { color: #6b7280; }
.fi.json { color: #a07a00; }
.fi.sh { color: var(--charcoal); }
.crumbs {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--gutter);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; color: var(--muted);
  white-space: nowrap; overflow: hidden;
}
.crumbs b { font-weight: 600; color: var(--charcoal); }

/* 하단 상태 막대 */
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--status-h);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 12px;
  background: var(--accent); color: #fff; font-family: var(--mono); font-size: 11px; letter-spacing: 0;
}
.statusbar .grp { display: flex; gap: 16px; align-items: center; white-space: nowrap; overflow: hidden; }
.statusbar .open::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px;
  border-radius: 50%; background: var(--orange);
}
.site-foot { padding: 20px var(--gutter) 24px; }

/* 코드 주석형 섹션 라벨 + 제목 올라오기 */
.comment { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; color: #7c8a80; }
.comment::before { content: "// "; }
.reveal { display: block; overflow: hidden; padding-bottom: .08em; }
.reveal > span { display: inline-block; }

/* 인트로 */
.hero {
  min-height: calc(100vh - var(--head-h) - var(--status-h));
  min-height: calc(100svh - var(--head-h) - var(--status-h));
}
.hero .h-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.code-card {
  width: 420px; max-width: 100%; border-radius: 8px; overflow: hidden;
  background: var(--editor-bg); color: #d6d6d6; box-shadow: 0 18px 40px rgba(17,17,17,.18);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75; letter-spacing: 0;
}
.code-card .cc-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #202327; font-size: 11px; color: #9aa3ab; }
.code-card pre { margin: 0; padding: 12px 0 14px; white-space: pre; overflow: hidden; min-height: 170px; font: inherit; }
.code-card .ln { display: inline-block; width: 36px; padding-right: 12px; text-align: right; color: #5b636b; user-select: none; }
.tk-k { color: #c792ea; } .tk-p { color: #9cdcfe; } .tk-s { color: #a5d6a7; } .tk-n { color: #f2a27e; }
.caret { display: inline-block; width: 7px; height: 1.1em; vertical-align: -2px; background: #d6d6d6; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .toolbar { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); }

/* Projects : 3열 카드 */
.work { padding: clamp(80px, 10vw, 140px) 0; overflow: hidden; }
.p-grid {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 72px 28px; margin: 0 var(--gutter);
}
.p-card { position: relative; display: block; will-change: transform; }
.p-card:nth-child(3n + 2) { margin-top: 72px; z-index: 2; }
.p-card[href] { cursor: none; }
@media (hover: none) { .p-card[href] { cursor: pointer; } }
.p-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 11.5px; color: var(--muted); }
.p-label span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--charcoal); font-weight: 600; }
.p-label svg { width: 10px; height: 10px; }
.p-label .p-size { font-family: var(--mono); letter-spacing: 0; }
.p-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.p-thumb.empty { display: grid; place-items: center; border-style: dashed; color: var(--muted); font-size: 13px; }
.p-thumb::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--accent); opacity: 0; transition: opacity .2s; }
.p-card[href]:hover .p-thumb::after { opacity: 1; }
.p-card h3 { margin-top: 16px; font-size: 19px; font-weight: 700; line-height: 1.35; }
.p-card .s-meta { margin-top: 2px; font-size: 13px; color: var(--muted); }
.p-card .s-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.work .more { margin-top: clamp(80px, 9vw, 120px); }

/* Career : 에디터 창 */
.editor { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.editor-bar { display: flex; height: 36px; background: #f6f6f4; border-bottom: 1px solid var(--line); }
.editor-bar span {
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0;
  background: #fff; border-right: 1px solid var(--line); border-top: 2px solid var(--accent);
}
.editor-body { display: grid; grid-template-columns: 52px minmax(0, 1fr); }
.gutter {
  padding: 16px 14px 16px 0; text-align: right;
  font-family: var(--mono); font-size: 11px; line-height: 24px; letter-spacing: 0; color: #b4b8b4;
  border-right: 1px solid var(--line); background: #fbfbfa; user-select: none; overflow: hidden; white-space: pre;
}
.editor .career-list { padding: 0 24px; }
.editor .career-list .c-row:first-of-type { border-top: 0; }
.editor .career-list .c-row:last-child { border-bottom: 0; }

/* Capabilities : 확장 프로그램 목록 */
.ext-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ext { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.ext-ico {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 6px; background: var(--soft);
  font-family: var(--mono); font-size: 15px; font-weight: 800; color: var(--accent); letter-spacing: 0;
}
.ext h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.ext .pub { font-size: 12px; color: var(--muted); }
.ext ul { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.ext ul li { position: relative; padding-left: 10px; }
.ext ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 4px; height: 4px; background: var(--muted); }
.ext .tools { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0; }

/* Contact : 터미널 */
.terminal { border-radius: 8px; overflow: hidden; background: var(--editor-bg); color: #e3e3e3; font-family: var(--mono); letter-spacing: 0; }
.term-bar { display: flex; gap: 20px; padding: 10px 18px; font-size: 11px; color: #8d959c; border-bottom: 1px solid #2a2d31; }
.term-bar b { color: #e3e3e3; font-weight: 600; border-bottom: 1px solid #7fd1a1; padding-bottom: 2px; }
.term-body { padding: clamp(24px, 4vw, 48px); font-size: 13px; line-height: 1.9; }
.term-body .prompt { color: #7fd1a1; }
.term-mail {
  display: inline-block; margin: 14px 0 18px;
  font-family: var(--title); font-size: clamp(28px, 4.6vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1;
  color: #fff; border-bottom: 2px solid rgba(255,255,255,.35); transition: border-color .2s, color .2s;
}
.term-mail:hover { color: #7fd1a1; border-color: #7fd1a1; }
.term-body .out { color: #b9c0c6; font-family: var(--kr); font-size: 15px; letter-spacing: -0.03em; }

.to-top { bottom: calc(var(--status-h) + clamp(16px, 3vw, 28px)); }
.layout-grid { top: var(--head-h); bottom: var(--status-h); }

@media (max-width: 900px) {
  .ide-tabs .who { padding: 0 12px; }
  .tab { padding: 0 12px; }
  .hero .h-foot { grid-template-columns: 1fr; }
  .hero .toolbar { position: static; transform: none; justify-self: start; }
  .p-grid { grid-template-columns: 1fr; gap: 48px; }
  .p-card:nth-child(3n + 2) { margin-top: 0; }
  .ext-list { grid-template-columns: 1fr; }
  .editor-body { grid-template-columns: 36px minmax(0, 1fr); }
  .gutter { padding-right: 8px; }
  .editor .career-list { padding: 0 16px; }
  .statusbar .hide-m { display: none; }
}

/* Capabilities 타이핑: 아직 안 쳐진 글자 자리 */
.tw-off { color: transparent; }

/* Profile 교육 목록 */
.edu li + li { margin-top: 4px; }
.ps-facts .edu small { display: inline; margin-left: 8px; }

/* 상세페이지: 디자인 작업물 보여주기 */
.f-body.f-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 8px; padding: 8px; background: var(--soft); }
.f-grid a { display: block; }
.f-grid img { width: 100%; height: auto; border: 1px solid var(--line); background: #fff; }
.f-body.f-tall { height: min(78vh, 820px); overflow-y: auto; overscroll-behavior: contain; background: #111; }
.f-tall img { display: block; width: 100%; height: auto; }
.f-tall:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.f-narrow .f-body { max-width: 520px; }
@media (max-width: 900px) {
  .f-body.f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-body.f-grid[style*="--cols:1"] { grid-template-columns: 1fr; }
}

/* 상세페이지를 세로 줄로 잘라 한눈에 보기 (스크롤 없음) */
.f-body.f-grid.f-strips { gap: 6px; align-items: start; }
.f-strips a { pointer-events: none; }
.f-strips img { border: 0; }
@media (max-width: 900px) {
  .f-body.f-grid.f-strips { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; padding: 4px; }
}

/* 모바일: 코드 카드는 화면 폭에 맞추고, 긴 줄은 카드 안에서 가로 스크롤 */
@media (max-width: 900px) {
  .code-card { width: 100%; }
  .code-card pre { overflow-x: auto; font-size: 11.5px; }
}

/* 상세페이지 스크롤 영상 */
.f-body video { display: block; width: 100%; height: auto; background: #111; }

/* 상세페이지: PC · 모바일 영상 나란히 */
.f-body.f-pair { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--soft); }
.f-pair figure { margin: 0; }
.f-pair .pc { flex: 1 1 0; min-width: 0; }
.f-pair .mo { flex: 0 0 24%; }
.f-pair video { display: block; width: 100%; height: auto; background: #111; border: 1px solid var(--line); }
.f-pair .pc video { border-radius: 6px; }
.f-pair .mo video { border-radius: 14px; }
.f-pair figcaption { margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0; }
.f-link { margin-left: 6px; color: var(--accent); font-weight: 700; }
.f-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .f-body.f-pair { gap: 8px; padding: 8px; }
  .f-pair .mo { flex-basis: 30%; }
}
