/* 장도균 개인 홈페이지 (2026-10-31 A안: 역할별 네 구역)
   색은 프로필 사진 배경(연보라 #CCBAEA)에서 뽑은 v06 색을 그대로 쓴다. 글꼴은 제목·본문 모두 나눔고딕(10-31 대표님 "직접 운영하는 곳의 모든 폰트는 나눔고딕").
   색과 크기는 :root 에서만 바꾼다. */
:root {
  --bg: #FFFFFF;
  --alt: #F7F4FC;
  --ink: #1F1730;
  --body: #4A4358;
  --muted: #6F6680;
  --line: #E6DEF3;
  --accent: #5B3D9C;
  --accent-soft: #ECE4FA;
  --photo: #CCBAEA;
  --max: 1120px;
  --r: 18px;
  --serif: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background: var(--bg); color: var(--body); line-height: 1.7; word-break: keep-all; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 위쪽 메뉴: 떠 있는 알약 모양(v06 그대로) */
.top { position: sticky; top: 12px; z-index: 10; padding: 0 12px; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 56px; max-width: 980px; margin: 0 auto; background: rgba(255, 255, 255, .82); border: 1px solid rgba(91, 61, 156, .14); border-radius: 999px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 30px -18px rgba(91, 61, 156, .45); padding: 0 10px 0 24px; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 4px; }
.nav a { font-size: 14px; font-weight: 600; color: var(--body); text-decoration: none; padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.menu-btn { display: none; border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* HOME */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--alt) 0%, var(--bg) 100%); }
.hero-in { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.name { font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: 18px; }
h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(34px, 4.8vw, 56px); line-height: 1.25; color: var(--ink); letter-spacing: -.01em; }
.titles { margin-top: 20px; font-size: 16px; font-weight: 700; color: var(--ink); }
.lead { margin-top: 14px; font-size: 17px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; padding: 13px 24px; border-radius: 999px; border: 1px solid var(--accent); }
.btn:hover { background: #4A3082; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.hero-photo img { width: 100%; max-width: 360px; margin-left: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; border-radius: var(--r); background: var(--photo); }

/* 세 줄 흐름 */
.flow { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.flow li { border-top: 2px solid var(--accent); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.flow-year { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.flow strong { font-size: 17px; color: var(--ink); }
.flow li > span:last-child { font-size: 14.5px; color: var(--muted); }

/* 구역 공통 */
.section { padding: 88px 0; }
.section.alt { background: var(--alt); }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
h2 { font-family: var(--serif); font-weight: 800; font-size: clamp(27px, 3.2vw, 38px); line-height: 1.3; color: var(--ink); }
.text { margin-top: 14px; font-size: 16.5px; max-width: 46em; }
h3 { font-size: 19px; color: var(--ink); line-height: 1.4; }

/* 네 갈래 */
.group { margin-top: 64px; }
.group-head { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.group-no { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1; color: var(--accent); min-width: 52px; }
.group-head h3 { font-family: var(--serif); font-size: 23px; }
.group-head p { margin-top: 4px; font-size: 15.5px; color: var(--muted); }
.group-note { margin-top: 16px; font-size: 14.5px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards--two { grid-template-columns: repeat(2, 1fr); max-width: calc((100% - 40px) / 3 * 2 + 20px); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.card:hover { border-color: var(--accent); box-shadow: 0 16px 36px -24px rgba(91, 61, 156, .55); transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); background: var(--alt); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 22px; flex: 1; }
.card-kind { font-size: 13px; font-weight: 700; color: var(--accent); }
.card-name { font-size: 18.5px; color: var(--ink); line-height: 1.4; }
.card-desc { font-size: 15px; color: var(--body); line-height: 1.7; flex: 1; }
.card-url { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
a.card .card-url::after { content: " ↗"; }
.card--text { background: var(--alt); border-color: transparent; }
.section.alt .card--text { background: #fff; }
.card--text .card-body { padding: 26px 24px; justify-content: flex-start; }

.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.facts li { background: var(--alt); border-radius: var(--r); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.facts strong { font-size: 16.5px; color: var(--ink); }
.facts span { font-size: 14.5px; color: var(--muted); }
.photos { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr; gap: 12px; margin-top: 20px; }
.photos img { width: 100%; height: 190px; object-fit: cover; border-radius: 12px; }

.pub { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.pub li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto; gap: 8px 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub strong { color: var(--ink); font-size: 16px; }
.pub span { font-size: 15px; color: var(--muted); }
.pub-link { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.pub-link::after { content: " ↗"; }
.pub-link:hover { text-decoration: underline; }

/* 최근 글 */
.posts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.posts a { display: flex; flex-direction: column; gap: 8px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; text-decoration: none; transition: border-color .2s; }
.posts a:hover { border-color: var(--accent); }
.post-meta { font-size: 13px; font-weight: 700; color: var(--accent); }
.post-meta time { color: var(--muted); font-weight: 600; margin-left: 8px; }
.post-title { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }

/* 소개 */
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; margin-top: 36px; }
.two h3 { margin-bottom: 14px; }
.two h3:not(:first-child) { margin-top: 32px; }
.timeline { list-style: none; border-left: 2px solid var(--line); padding-left: 20px; }
.timeline li { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 7px 0; font-size: 15px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.year { font-weight: 700; color: var(--ink); }
.list { list-style: none; display: grid; gap: 10px; font-size: 15px; }
.list li { padding-left: 16px; position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* 문의 */
.contact-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 760px; }
.contact-list li { display: flex; gap: 16px; align-items: baseline; background: var(--alt); border-radius: 14px; padding: 16px 20px; }
.contact-list span { font-size: 13.5px; font-weight: 700; color: var(--accent); min-width: 44px; }
.contact-list a { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }
.foot { padding: 28px 0 40px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }

/* 태블릿 */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo img { margin: 0; max-width: 280px; }
  .cards, .posts { grid-template-columns: repeat(2, 1fr); }
  .cards--two { max-width: none; }
  .facts { grid-template-columns: 1fr; }
  .photos { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; gap: 12px; }
  .pub li { grid-template-columns: 1fr; gap: 4px; }
}
/* 휴대폰 */
@media (max-width: 640px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 12px; right: 12px; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: 0 16px 40px -20px rgba(31, 23, 48, .4); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; font-size: 15px; }
  .hero { padding: 48px 0 40px; }
  .flow { grid-template-columns: 1fr; margin-top: 40px; }
  .section { padding: 64px 0; }
  .group { margin-top: 48px; }
  .group-head { gap: 14px; }
  .group-no { font-size: 28px; min-width: 40px; }
  .cards, .posts { grid-template-columns: 1fr; }
  .photos img { height: 140px; }
  .contact-list { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
}
