/* 산벌레 개인 홈 — 깔끔한 IT 사이트 느낌: 흰 바탕 · 회색 면 · 파란 강조 · Pretendard(고딕) */
:root {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --card: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --faint: #8b929c;
  --line: #e5e7eb;
  --line2: #d1d5db;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #eff6ff;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--font); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 28px; }
main.wrap { flex: 1; padding-bottom: 56px; }

/* 맨 위 줄 */
.top { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.topin { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -.3px; flex: none; }
.top nav { display: flex; gap: 2px; margin-right: auto; }
.top nav a { height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--muted); font-size: 15px; font-weight: 500; }
.top nav a:hover { background: var(--surface); color: var(--ink); }
.top nav a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }
.gh { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.gh:hover { color: var(--ink); border-color: var(--line2); }
.gh svg { width: 16px; height: 16px; }

/* 첫 화면: 소개 + 대표작 화면 */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; margin-top: 36px; padding: 40px 44px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, #fbfcfd, var(--surface)); }
.hero h1 { font-size: clamp(28px, 3.3vw, 38px); line-height: 1.32; letter-spacing: -1px; font-weight: 700; }
.hero h1 strong { color: var(--accent); }
.introtext { margin-top: 16px; color: var(--muted); font-size: 17px; line-height: 1.75; max-width: 36em; }
.introtext p { margin: 0 0 10px; }
.introtext strong { color: var(--ink); font-weight: 600; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.shot { margin: 0; }
/* 대표 그림(로고 같은 그림): 테두리 없이 비율 그대로 */
.shot img { width: 100%; height: auto; max-height: 340px; object-fit: contain; }
.shot figcaption { margin-top: 10px; color: var(--faint); font-size: 13px; text-align: center; }

/* 칸 */
.sec { margin-top: 48px; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sechead h2 { font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.sechead a { color: var(--accent); font-size: 14px; font-weight: 600; }
.sechead a:hover { color: var(--accent-ink); }

/* 작품 카드 */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { transform: translateY(-2px); border-color: #bfd0f5; box-shadow: 0 14px 30px -16px rgba(15, 23, 42, .22); }
.cover { height: 156px; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.none { display: grid; place-items: center; color: var(--faint); font-weight: 700; }
.cardbody { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 14px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 500; }
.badge.kind { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); }
.card h3 { margin-top: 10px; font-size: 20px; line-height: 1.35; font-weight: 700; letter-spacing: -.4px; }
.card { position: relative; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.card:hover h3 a { color: var(--accent-ink); }
.card .go { position: relative; z-index: 1; }
.sum { margin-top: 6px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.cardfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 16px; }
.ver { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.go { color: var(--accent); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.go:hover { color: var(--accent-ink); }

/* 글 목록 */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a { font-size: 16px; font-weight: 600; }
.list a:hover { color: var(--accent-ink); }
.list time { flex: none; color: var(--faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.list.big li { padding: 18px 20px; }
.list.big a { font-size: 18px; }
.list.links li { justify-content: flex-start; flex-wrap: wrap; }
.list.links span { color: var(--faint); font-size: 14px; }
.empty { padding: 24px 18px; border: 1px dashed var(--line2); border-radius: 14px; color: var(--faint); }

/* 소개 쪽: 왼쪽 소개 글 + 링크, 오른쪽 피드백 */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; }
.about.solo { grid-template-columns: minmax(0, 1fr); }
.about .post { max-width: 720px; }
.aboutlinks { margin-top: 36px; }
.aboutside { margin-top: 40px; }
.aboutside .fb { max-width: none; }

/* 피드백: 사이트 모양 입력칸 */
.fbnote { margin: -4px 0 14px; color: var(--muted); font-size: 15px; }
.fb { display: grid; gap: 16px; max-width: 640px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.field { display: grid; gap: 6px; }
.flabel { font-size: 14.5px; font-weight: 600; }
.flabel em { margin-left: 6px; font-style: normal; font-weight: 500; color: var(--faint); font-size: 13px; }
.fb input, .fb textarea, .fb select { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--card); color: var(--ink); font: 15.5px/1.6 var(--font); transition: border-color .15s, box-shadow .15s; }
.fb textarea { resize: vertical; min-height: 140px; }
.fb select { appearance: none; -webkit-appearance: none; padding-right: 36px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; max-width: 280px; }
.fb input:focus, .fb textarea:focus, .fb select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.fbacts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fbacts .btn { cursor: pointer; font-family: var(--font); }
.fbacts .btn:disabled { opacity: .6; cursor: default; }
.fbmsg { margin: 0; font-size: 14.5px; color: var(--muted); }
.fbmsg.ok { color: #15803d; font-weight: 600; }
.fbmsg.bad { color: #b91c1c; }

/* 쪽 머리 */
.pagehead { margin-top: 40px; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.pagehead h1 { font-size: clamp(28px, 3.2vw, 36px); line-height: 1.3; letter-spacing: -.8px; font-weight: 700; }
.pagehead p { margin-top: 6px; color: var(--faint); font-size: 15px; }
.pagehead .btns { margin-top: 18px; }

/* 만든 것 쪽 탭(처음 사이트의 분류 단추처럼) */
[hidden] { display: none !important; }
.tabs { display: inline-flex; gap: 2px; margin-top: 16px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tab { border: 0; border-radius: 7px; background: transparent; color: var(--muted); min-height: 36px; padding: 6px 16px; font: 500 15px/1 var(--font); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.tab span { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.tab[aria-selected="true"] span { color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 만든 것 쪽 */
.work { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; padding: 28px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); scroll-margin-top: 84px; }
.wshot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); align-self: start; }
.wshot img { width: 100%; height: auto; max-height: 380px; object-fit: cover; object-position: top center; }
.wshot.art { aspect-ratio: 220 / 150; }
.wshot.art img { height: 100%; object-fit: cover; }
.wmedia { display: grid; gap: 10px; align-self: start; }
.wshots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.thumb { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s; }
.wshots .thumb { aspect-ratio: 3 / 4; }
.wshots .thumb:nth-child(n+3) { display: none; }
.wshots .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.thumb[data-more]::after { content: attr(data-more); position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 12px; font-weight: 600; }
.thumb:hover { border-color: var(--accent); }
.thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(15, 23, 42, .8); }
.lightbox img { max-width: 94vw; max-height: 92vh; width: auto; height: auto; border-radius: 12px; cursor: zoom-out; }
.lbnav { display: none; position: fixed; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #111; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox.many .lbnav { display: block; }
.lbnav.prev { left: 14px; }
.lbnav.next { right: 14px; }
.lbclose { position: fixed; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #111; font-size: 18px; cursor: pointer; }
.work h2 { margin-top: 10px; font-size: 26px; line-height: 1.3; letter-spacing: -.6px; font-weight: 700; }
.work h2 a:hover { color: var(--accent-ink); }
.wmeta { margin-top: 4px; color: var(--faint); font-size: 14px; }

/* 작품 소개 페이지 */
.wpage { margin-top: 32px; }
.whero { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 44px; align-items: center; padding: 36px 40px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, #fbfcfd, var(--surface)); }
.whero h1 { margin-top: 12px; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.25; letter-spacing: -1px; font-weight: 700; }
.whero .wmeta { margin-top: 6px; }
.lead { margin-top: 14px; color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 32em; }
.whero .wshot { align-self: center; }
.gallery { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.gallery .thumb { flex: none; border-radius: 12px; scroll-snap-align: start; }
.gallery .thumb img { height: 440px; width: auto; max-width: none; }
.log { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.log > li { padding: 16px 20px; border-top: 1px solid var(--line); }
.log > li:first-child { border-top: 0; }
.loghead { display: flex; align-items: baseline; gap: 10px; }
.loghead strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.loghead time { color: var(--faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.log ul { margin: 6px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 15px; line-height: 1.7; }
.log ul li { margin-top: 2px; }
.logmore { margin-top: 12px; }
.logmore summary { cursor: pointer; color: var(--accent); font-size: 15px; font-weight: 600; padding: 6px 0; }
.logmore summary:hover { color: var(--accent-ink); }
.logmore .log { margin-top: 8px; }

/* 글 */
.prose { font-size: 16.5px; line-height: 1.85; color: #1f2937; max-width: 42em; }
.work .prose { margin-top: 14px; color: var(--muted); }
.prose p { margin: 0 0 14px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose h2, .prose h3 { line-height: 1.4; margin: 30px 0 10px; font-weight: 700; letter-spacing: -.4px; }
.prose h2 { font-size: 23px; } .prose h3 { font-size: 19px; }
.prose img { margin: 20px 0; border-radius: 12px; border: 1px solid var(--line); }
.prose blockquote { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: var(--surface); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; overflow-x: auto; border-radius: 10px; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 14px; }
.prose table { width: 100%; margin: 4px 0 16px; border-collapse: collapse; font-size: 15px; line-height: 1.6; overflow-wrap: normal; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface); font-weight: 600; white-space: nowrap; }
.post { max-width: 760px; margin-top: 40px; }
.post h1 { font-size: clamp(28px, 3.2vw, 36px); line-height: 1.32; letter-spacing: -.8px; font-weight: 700; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
/* 약관처럼 빽빽하게: 개인정보 처리방침 */
.terms h1 { font-size: 24px; padding-bottom: 14px; margin-bottom: 18px; }
.terms .prose { font-size: 13.5px; line-height: 1.65; color: var(--muted); max-width: none; }
.terms .prose h3 { margin: 18px 0 4px; font-size: 14px; color: var(--ink); letter-spacing: 0; }
.terms .prose p { margin: 0 0 4px; }
.terms .prose ol, .terms .prose ul { margin: 0 0 4px; padding-left: 1.5em; }
.terms .prose table { margin: 4px 0 6px; font-size: 13px; line-height: 1.5; }
.terms .prose th, .terms .prose td { padding: 5px 8px; }
.terms .prose a { color: inherit; }
.crumb { color: var(--faint); font-size: 14px; margin-bottom: 8px; }
.crumb a { color: var(--accent); font-weight: 600; }
.back { margin-top: 36px; }
.back a { color: var(--accent); font-weight: 600; font-size: 15px; }

/* 아래 */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.footin { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 26px; color: var(--faint); font-size: 14px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

/* 중간 폭 */
@media (max-width: 960px) {
  .about { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .whero { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 32px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; padding: 32px; }
  .shot img { max-height: 280px; }
}
/* 휴대폰 */
@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .topin { height: auto; flex-wrap: wrap; gap: 6px 10px; padding-top: 12px; padding-bottom: 8px; }
  .top nav { order: 3; width: 100%; margin: 0 -10px; overflow-x: auto; }
  .top nav a { padding: 0 10px; font-size: 14.5px; }
  .gh { margin-left: auto; height: 32px; padding: 0 10px; }
  .gh span { display: none; }
  .hero { grid-template-columns: 1fr; gap: 24px; margin-top: 18px; padding: 24px 20px; border-radius: 16px; }
  .hero h1 { font-size: 25px; }
  .introtext { font-size: 15.5px; }
  .shot { max-width: 300px; margin: 0 auto; }
  .shot img { max-height: 240px; }
  .sec { margin-top: 36px; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .cover { height: 150px; }
  .work { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .wshot { max-width: 220px; }
  .wshot.art { max-width: none; }
  .wpage { margin-top: 20px; }
  .whero { grid-template-columns: 1fr; gap: 20px; padding: 20px; border-radius: 16px; }
  .whero .wshot { order: -1; }
  .lead { font-size: 16px; }
  .gallery .thumb img { height: 360px; }
  .log > li { padding: 14px 16px; }
  .list li { flex-direction: column; gap: 2px; padding: 12px 16px; }
  .pagehead, .post { margin-top: 26px; }
  .footin { flex-direction: column; gap: 4px; }
  .about { grid-template-columns: 1fr; gap: 0; }
  .aboutside { margin-top: 36px; }
  .fb { padding: 16px; }
  .fb select { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .card, .btn { transition: none; } .card:hover { transform: none; } }
