@charset "utf-8";
/* ============================================================
   황금풍뎅이 - 공통 레트로 스타일시트
   90년대 개인 홈페이지 톤을 유지하면서 가독성/반응형만 현대 기준으로.
   각 페이지가 iframe 안에서 독립 로드되므로 페이지마다 link 필요.
   ============================================================ */

@import url("https://cdn.jsdelivr.net/npm/galmuri@2.40.3/dist/galmuri.min.css");

/* ---------- 1. 디자인 토큰 ---------- */
:root {
  /* 브라우저 강제 다크모드에서 배경만 반전돼 깨지는 것을 방지 (레트로 톤은 라이트 고정) */
  color-scheme: light;

  --bg: #F0F0FF;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --ink-dim: #666666;
  --rule: #999999;
  --rule-soft: #dddddd;

  --link: #0066cc;
  --link-hover: #004499;
  --link-visited: #663399;

  --star: #cc0000;
  --group-bg: #e4e4f4;

  /* Win95 크롬 */
  --face: #d4d0c8;
  --face-light: #ffffff;
  --face-dark: #808080;
  --face-darker: #404040;
  --title-bg: #000080;
  --title-bg2: #1084d0;
  --title-ink: #ffffff;

  --font-title: Galmuri11, "DungGeunMo", "굴림", Gulim, Dotum, sans-serif;
  --font-title-lg: Galmuri14, Galmuri11, "굴림", Gulim, Dotum, sans-serif;
  --font-body: "맑은 고딕", "Malgun Gothic", "Apple SD Gothic Neo", "굴림", Gulim, Dotum, sans-serif;
  --font-mono: GalmuriMono11, Consolas, "D2Coding", monospace;

  --measure: 68ch;
}

/* ---------- 2. 리셋 & 기본 타이포 ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }

a { color: var(--link); text-decoration: underline; }
a:hover { color: var(--link-hover); }
a:visited { color: var(--link-visited); }

:focus-visible {
  outline: 2px solid var(--title-bg);
  outline-offset: 1px;
}

hr.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 10px 0 14px;
}

/* ---------- 3. 페이지 셸 ---------- */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}
.page--wide { max-width: 1100px; }

.page-title {
  font-family: var(--font-title-lg);
  font-size: 1.75rem;
  font-weight: 400;
  text-align: center;
  letter-spacing: 1px;
  margin: 8px 0 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  min-height: 34px;
}
.section-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 1px;
  margin: 0;
  font-weight: 400;
}
.section-title .star { color: var(--star); }
.section-head .head-action { position: absolute; right: 0; top: 0; }

/* 본문 가독성: 긴 글은 문단 단위로 */
.prose { max-width: var(--measure); overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }

.hint, .md-hint {
  font-size: 0.82rem;
  color: var(--ink-dim);
  line-height: 1.5;
  margin: 0 0 6px;
}
.md-hint code { font-family: var(--font-mono); }

/* ---------- 4. 패널 (Win95 창) ---------- */
.panel {
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  padding: 14px 16px;
}
.panel + .panel { margin-top: 14px; }

.win {
  background: var(--face);
  border-top: 2px solid var(--face-light);
  border-left: 2px solid var(--face-light);
  border-right: 2px solid var(--face-darker);
  border-bottom: 2px solid var(--face-darker);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}
.win-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(90deg, var(--title-bg), var(--title-bg2));
  color: var(--title-ink);
  font-family: var(--font-title);
  font-size: 0.9rem;
  padding: 4px 6px;
}
.win-title h2, .win-title h3 { margin: 0; font: inherit; font-weight: 400; }
.win-body { padding: 12px; background: var(--face); }

/* ---------- 5. 버튼 / 폼 ---------- */
.btn {
  font-family: var(--font-title);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--face);
  padding: 5px 14px;
  cursor: pointer;
  border-top: 2px solid var(--face-light);
  border-left: 2px solid var(--face-light);
  border-right: 2px solid var(--face-darker);
  border-bottom: 2px solid var(--face-darker);
}
.btn:active {
  border-top-color: var(--face-darker);
  border-left-color: var(--face-darker);
  border-right-color: var(--face-light);
  border-bottom-color: var(--face-light);
}
.btn[disabled] { color: var(--face-dark); cursor: default; }

.btn-icon {
  font-family: var(--font-title);
  font-size: 0.95rem;
  line-height: 1;
  color: var(--ink);
  background: var(--face);
  padding: 5px 9px;
  cursor: pointer;
  border-top: 2px solid var(--face-light);
  border-left: 2px solid var(--face-light);
  border-right: 2px solid var(--face-darker);
  border-bottom: 2px solid var(--face-darker);
}
.btn-icon:active {
  border-top-color: var(--face-darker);
  border-left-color: var(--face-darker);
  border-right-color: var(--face-light);
  border-bottom-color: var(--face-light);
}

.btn-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

input[type="text"], input[type="password"], textarea, select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  padding: 6px 8px;
  width: 100%;
  border-top: 2px solid var(--face-dark);
  border-left: 2px solid var(--face-dark);
  border-right: 2px solid var(--face-light);
  border-bottom: 2px solid var(--face-light);
}
textarea { line-height: 1.6; resize: vertical; }

.form-row { margin-bottom: 12px; }
.form-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ---------- 6. 다이얼로그 (native <dialog>) ---------- */
dialog.dlg {
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(92vw, 620px);
  max-height: 88vh;
  color: var(--ink);
  overflow: visible;
}
dialog.dlg::backdrop { background: rgba(0, 0, 32, 0.55); }
dialog.dlg .win { max-height: 86vh; display: flex; flex-direction: column; }
dialog.dlg .win-body { overflow: auto; }
dialog.dlg--wide { max-width: min(94vw, 820px); }

.dlg-close {
  font-family: var(--font-title);
  font-size: 0.8rem;
  line-height: 1;
  background: var(--face);
  color: var(--ink);
  padding: 3px 8px;
  cursor: pointer;
  border-top: 2px solid var(--face-light);
  border-left: 2px solid var(--face-light);
  border-right: 2px solid var(--face-darker);
  border-bottom: 2px solid var(--face-darker);
}

/* ---------- 7. 데이터 표 ---------- */
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 0.92rem;
}
table.data th, table.data td {
  border: 1px solid var(--ink);
  padding: 7px 8px;
  vertical-align: top;
  text-align: left;
  /* 긴 URL이 셀 밖으로 넘치지 않도록 */
  overflow-wrap: anywhere;
}
table.data thead th {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.85rem;
  background: var(--face);
  white-space: nowrap;
}

table.data tr.group-row td {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--group-bg);
  font-family: var(--font-title);
  font-size: 0.88rem;
}

.cell-icon { width: 62px; text-align: center; }
.cell-store { width: 52px; text-align: center; }
.cell-ver { width: 96px; white-space: nowrap; }
.cell-time { width: 78px; white-space: nowrap; }
.cell-thumb { width: 96px; }
.cell-date { width: 132px; white-space: nowrap; }
.cell-actions { width: 54px; text-align: center; }

.app-icon { width: 48px; height: 48px; display: block; margin: 0 auto; }
.store-badge { width: 28px; height: 28px; display: block; margin: 0 auto; }
.thumb { max-width: 80px; max-height: 80px; object-fit: cover; border: 1px solid var(--rule); }

.row-link { cursor: pointer; }
table.data tbody tr.app-row:hover { background: #eef; }
.title-link { color: var(--link); text-decoration: underline; cursor: pointer; }

/* 긴 릴리즈 노트 줄임 */
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.clamp-more {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.82rem;
}

/* 모바일: 표 -> 카드 (마크업 변경 없이 data-label 사용) */
@media (max-width: 768px) {
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tbody tr:not(.group-row) {
    border: 2px solid var(--ink);
    background: var(--panel);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
    margin: 0 0 12px;
  }
  table.data td {
    border: none;
    border-bottom: 1px dotted var(--rule-soft);
    display: flex;
    gap: 10px;
    width: auto;
    padding: 7px 10px;
  }
  table.data tr td:last-child { border-bottom: none; }
  table.data td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 76px;
    font-family: var(--font-title);
    font-size: 0.8rem;
    color: var(--ink-dim);
  }
  table.data td.cell-icon, table.data td.cell-store,
  table.data td.cell-ver, table.data td.cell-time,
  table.data td.cell-thumb, table.data td.cell-date,
  table.data td.cell-actions { width: auto; text-align: left; }
  .app-icon, .store-badge, .thumb { margin: 0; }
  table.data tr.group-row td {
    display: block;
    border: 2px solid var(--ink);
    margin: 0 0 10px;
  }
  table.data tr.group-row td::before { content: none; }
}

/* ---------- 8. 통계 카드 / 상태 바 ---------- */
.stat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stat-card {
  flex: 1 1 150px;
  min-width: 140px;
  background: var(--panel);
  border-top: 2px solid var(--face-light);
  border-left: 2px solid var(--face-light);
  border-right: 2px solid var(--face-dark);
  border-bottom: 2px solid var(--face-dark);
  padding: 8px 10px;
}
.stat-card .stat-label {
  font-family: var(--font-title);
  font-size: 0.78rem;
  color: var(--ink-dim);
  display: block;
}
.stat-card .stat-value {
  font-family: var(--font-title-lg);
  font-size: 1.1rem;
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  background: var(--face);
  border-top: 2px solid var(--face-light);
  border-left: 2px solid var(--face-light);
  border-right: 2px solid var(--face-dark);
  border-bottom: 2px solid var(--face-dark);
  padding: 6px 10px;
  margin-bottom: 12px;
}
.status-bar .status-note {
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: 0.78rem;
  flex-basis: 100%;
}

/* ---------- 9. 네비게이션 ---------- */
#nav-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-title);
  font-size: 0.72rem;
  color: var(--ink-dim);
  padding: 5px 6px;
  border-bottom: 1px solid var(--rule);
  background: #fafaff;
}
/* 레트로 방문자 카운터(오도미터) */
.counter {
  font-family: var(--font-mono);
  letter-spacing: 2px;
  color: #33ff66;
  background: #101010;
  padding: 1px 6px;
  border-top: 2px solid var(--face-darker);
  border-left: 2px solid var(--face-darker);
  border-right: 2px solid var(--face-light);
  border-bottom: 2px solid var(--face-light);
}

ul.nav {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
}
ul.nav li { margin: 0; }
ul.nav li + li { margin-top: 7px; }
ul.nav a {
  font-family: var(--font-title);
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav-dot { margin-right: 6px; }
.nav-family-header {
  border-top: 1px solid var(--rule);
  margin-top: 10px !important;
  padding-top: 8px;
}
.nav-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-title);
  font-size: 0.78rem;
  color: var(--ink-dim);
}
.nav-group-head .nav-group-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 상단 바 모드(iframe 폭 300px 이상 = 모바일 가로 배치) */
@media (min-width: 300px) {
  ul.nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 16px;
    padding: 7px 10px;
  }
  ul.nav li + li { margin-top: 0; }
  ul.nav .nav-dot { display: none; }
  ul.nav .nav-family-header, ul.nav .nav-family-dynamic { display: none; }
}

/* ---------- 10. iframe 임베드 페이지 ---------- */
body.embed { display: flex; flex-direction: column; height: 100vh; margin: 0; }
.embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, var(--title-bg), var(--title-bg2));
  color: var(--title-ink);
  font-family: var(--font-title);
  font-size: 0.85rem;
  padding: 6px 10px;
}
.embed-bar a { color: var(--title-ink); }
.embed-frame { flex: 1 1 auto; width: 100%; border: none; display: block; min-height: 0; }

/* ---------- 11. 접근성 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Portfolio introduction and selected work */
.portfolio-hero{padding:24px;margin:18px 0 24px;border:3px double var(--ink);background:#fff}
.portfolio-hero h2{font-family:var(--font-body);font-size:clamp(1.5rem,4vw,2.3rem);line-height:1.35;margin:10px 0 16px;letter-spacing:-.04em}
.eyebrow{font-size:.78rem;color:#505078;line-height:1.65;word-break:keep-all}
.portfolio-actions{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
.portfolio-actions .btn{display:inline-flex;align-items:center;justify-content:center;min-height:42px;text-decoration:none;box-sizing:border-box}
.portfolio-facts{display:flex;flex-wrap:wrap;gap:16px;border-top:1px dashed var(--rule);padding-top:16px;font-size:.85rem}
.portfolio-facts strong{display:block;font-size:1.2rem;color:var(--title-bg);margin-top:5px}
.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.project-card{border:3px double var(--ink);background:#fff;overflow:hidden}
.project-card img{display:block;width:100%;height:240px;object-fit:contain;background:#e7e7ef;border-bottom:1px solid var(--rule)}
.project-copy{padding:18px}.project-copy h2{margin:8px 0;font-size:1.2rem}.project-copy p{line-height:1.75;font-size:.9rem}.project-lead{font-weight:bold}.project-copy .portfolio-actions{margin-bottom:0}
.store-note{padding:12px;border-left:4px solid var(--title-bg);background:#e7e7f2;font-size:.85rem;line-height:1.7}
.prose{overflow-wrap:anywhere}
@media(max-width:640px){.project-grid{grid-template-columns:1fr}.portfolio-hero{padding:18px}.project-card img{height:auto;max-height:360px}.portfolio-actions .btn{flex:1 1 auto}.portfolio-facts{gap:14px}.profile-grid{gap:18px}}
