/* ===========================================================
   이창훈 개인 웹페이지 — style.css
   톤: 차분·신뢰감(밝은 화이트). 접근성 최우선(WCAG AA).
   =========================================================== */

:root {
  --bg: #ffffff;
  --surface: #f4f7fb;
  --text: #1c2733;        /* 본문: 흰 배경 대비 ~13:1 */
  --muted: #4a5765;       /* 보조 텍스트: 대비 ~7:1 */
  --accent: #1d4e89;      /* 신뢰감 있는 딥블루: 흰 배경 대비 ~7:1 */
  --accent-strong: #16406f;
  --line: #d9e1ea;
  --focus: #b3471b;       /* 포커스 윤곽: 파랑 위에서도 보이는 주황 계열 */
  --maxw: 1080px;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(28, 39, 51, .08);
}

/* ---------- 리셋·기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 1.0625rem;          /* 17px 기준 */
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;          /* 한국어 줄바꿈 자연스럽게 */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.3; color: var(--text); }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, 720px); }

/* ---------- 접근성: 포커스 ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -120%;
  z-index: 1000;
  background: var(--accent-strong);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- 헤더·내비 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--text); letter-spacing: .01em; }

.primary-nav ul { list-style: none; display: flex; gap: .35rem; margin: 0; padding: 0; }
.primary-nav a {
  display: inline-block; padding: .55rem .8rem; border-radius: 8px;
  text-decoration: none; color: var(--text); font-weight: 600;
}
.primary-nav a:hover { background: var(--surface); }
.primary-nav .nav-cta { background: var(--accent); color: #fff; }
.primary-nav .nav-cta:hover { background: var(--accent-strong); color: #fff; }

.nav-toggle { display: none; }
.header-cta { display: none; }  /* 데스크톱은 상단 내비의 '섭외 문의'가 담당 */

/* ---------- 버튼 ---------- */
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent;
  font-size: 1rem; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: var(--surface); color: var(--accent-strong); }

/* ---------- 히어로 ---------- */
.hero { background: linear-gradient(180deg, var(--surface), #fff); padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .4rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4rem); margin: 0 0 .5rem; letter-spacing: -.01em; }
.hero-roles { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.2rem; font-weight: 600; }
.hero-quote { font-size: 1.35rem; font-weight: 700; color: var(--text); margin: 0 0 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }
.hero-figure { margin: 0; }
.hero-figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }

/* ---------- 섹션 ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--surface); }
.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 0 0 1.5rem; padding-bottom: .6rem;
  border-bottom: 3px solid var(--accent); display: inline-block;
}
/* 스크린리더 전용(시각적으로 숨김) */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* 마일스톤 강조 카드 (첫 방송 등) */
.milestone {
  margin: 0 0 2rem; padding: 1.2rem 1.4rem;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 5px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem;
}
.milestone__body { flex: 1 1 18rem; }
.milestone__label { margin: 0 0 .2rem; color: var(--accent); font-weight: 800; font-size: .9rem; letter-spacing: .02em; }
.milestone__text { margin: 0; font-weight: 600; }
.milestone .btn { white-space: nowrap; }

/* 강조형(feature) 마일스톤 — 더 크고 눈에 띄게 */
.milestone--feature {
  padding: clamp(1.4rem, 3.5vw, 2.1rem) clamp(1.4rem, 3.5vw, 2.3rem);
  border-left-width: 7px;
  background: linear-gradient(180deg, #e9f1fb, var(--surface));
  box-shadow: var(--shadow);
  gap: 1rem 1.8rem;
}
.milestone--feature .milestone__label { font-size: 1.05rem; }
.milestone--feature .milestone__text {
  font-size: clamp(1.15rem, 2.6vw, 1.35rem); line-height: 1.5; color: var(--text);
}

/* 큰 버튼 */
.btn-lg { padding: 1rem 2rem; font-size: 1.15rem; }

/* 소개 영상 */
.intro-video { margin: 0 0 2rem; }
.intro-video video {
  width: 100%; height: auto; aspect-ratio: 16 / 9;
  display: block; background: #000;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.intro-video figcaption { color: var(--muted); font-size: .92rem; margin-top: .6rem; max-width: 65ch; }

/* 소개: 글 + 포트레이트 2단 */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.about-portrait { margin: 0; }
.about-portrait img {
  width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block;
}
@media (min-width: 760px) {
  .about-grid { grid-template-columns: 1.7fr .9fr; gap: 2.5rem; align-items: start; }
}

.prose p { margin: 0 0 1.1rem; max-width: 65ch; }
.lead { font-size: 1.15rem; color: var(--text); max-width: 65ch; }

.pullquote {
  margin: 2rem 0 0; padding: 1.2rem 1.5rem; border-left: 5px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
}
.section-alt .pullquote { background: #fff; }
.pullquote p { font-size: 1.2rem; font-weight: 600; margin: 0 0 .5rem; }
.pullquote cite { color: var(--muted); font-style: normal; font-size: .95rem; }

/* 강의 실적(재초청) — 대시보드 + 표 */
.proof {
  margin: 1.4rem 0; padding: 1.2rem 1.35rem;
  background: #fff; border: 1px solid var(--line);
  border-left: 5px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
}
.proof-head { margin: 0 0 .8rem; color: var(--accent-strong); font-weight: 800; font-size: 1.05rem; }

/* 숫자 카드 (정의목록 — 스크린리더는 라벨:값으로 읽음) */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin: 0 0 1rem; padding: 0; }
@media (min-width: 620px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border-radius: 10px; padding: .85rem .6rem; text-align: center; }
.stat dt { color: var(--muted); font-size: .85rem; margin: 0 0 .3rem; }
.stat dd { margin: 0; color: var(--accent-strong); font-weight: 800; font-size: 1.8rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat dd span { font-size: .9rem; font-weight: 700; margin-left: .1rem; }

/* 재초청 표 (caption + scope 머리글 — 스크린리더 친화) */
.reinvite-table { width: 100%; border-collapse: collapse; margin: 0 0 .7rem; font-size: 1rem; }
.reinvite-table caption { text-align: left; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.reinvite-table th, .reinvite-table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.reinvite-table thead th { background: var(--surface); font-size: .85rem; color: var(--muted); font-weight: 700; }
.reinvite-table td:first-child { font-weight: 700; }
.proof-note { margin: 0; color: var(--muted); font-size: .95rem; }

/* 강의 안내 (실무 정보) */
.info-list { margin: 0 0 1rem; }
.info-list dt { font-weight: 700; color: var(--accent-strong); margin-top: .55rem; }
.info-list dd { margin: 0; }

/* ---------- 강의 ---------- */
.lecture-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.lecture-intro h3 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
.lecture-intro h3:first-of-type { margin-top: 1rem; }
.check-list, .topic-list { padding-left: 1.2rem; margin: 0; }
.check-list li, .topic-list li { margin: .35rem 0; }
.lecture-cta { margin-top: 1.8rem; }
.lecture-figure { margin: 0; position: sticky; top: 84px; }
.lecture-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

/* ---------- 경력 ---------- */
.career-highlight { margin: 0 0 2rem; max-width: 360px; }
.career-highlight img { border-radius: var(--radius); box-shadow: var(--shadow); }
.career-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem 2.5rem; }
.career-block h3 {
  font-size: 1.15rem; margin: 0 0 .7rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line);
}
.career-block ul { list-style: none; margin: 0; padding: 0; }
.career-block li { margin: .5rem 0; padding-left: 4.6rem; position: relative; }
.career-block .yr {
  position: absolute; left: 0; top: 0; width: 4.2rem;
  color: var(--accent); font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums;
}

/* ---------- 미디어 ---------- */
.media-list { list-style: none; margin: 0 0 2rem; padding: 0; max-width: 70ch; }
.media-list li { margin: .6rem 0; padding-left: 1rem; border-left: 3px solid var(--line); }
.media-list strong { color: var(--accent-strong); }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.media-gallery figure { margin: 0; }
.media-gallery img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 200px; object-fit: cover; }

/* 영상으로 만나기 — 클릭하면 그 자리에서 재생되는 카드 (facade) */
.media-videos-title { margin: 0 0 1rem; font-size: 1.1rem; color: var(--accent-strong); }
.video-grid { list-style: none; margin: 0 0 2.4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.video-card { margin: 0; }
.video-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.video-card__link:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(28, 39, 51, .14); color: var(--text); }
.video-card__link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.video-card__thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.video-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card__play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 999px;
  background: rgba(29, 78, 137, .92); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.video-card__play::before { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.video-card__link:hover .video-card__play { background: var(--accent-strong); }
.video-card__body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1.1rem; }
.video-card__title { font-weight: 800; font-size: 1.02rem; color: var(--accent-strong); }
.video-card__desc { font-size: .92rem; color: var(--text); line-height: 1.45; }
.video-card__src { font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.video-card__iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.video-card__close {
  display: block; width: 100%; border: 0; cursor: pointer;
  background: var(--accent-strong); color: #fff; font: inherit; font-weight: 700;
  padding: .6rem 1rem; text-align: center;
}
.video-card__close:hover { background: #0f335c; color: #fff; }
.video-card__close:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.video-card__link--playing:hover { transform: none; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) {
  .video-card__link { transition: none; }
  .video-card__link:hover { transform: none; }
}

/* 섭외: 강의 사진 + 안내 */
/* 폼 오류 안내 (스크린리더 즉시 안내 + 시각 경고) */
.form-status { margin: 0 0 1.2rem; padding: .8rem 1rem; border-radius: var(--radius); background: #fdecec; border: 1px solid #d99; color: #8a1f1f; font-weight: 700; }
.form-status:empty { display: none; }
.contact-form [aria-invalid="true"] { border-color: #c0392b; }
/* 영상 안내 한 줄 */
.media-videos-note { margin: -.4rem 0 1.2rem; color: var(--muted); font-size: .92rem; }

.contact-intro { margin-bottom: 1.8rem; }
.contact-portrait { margin: 0 0 1.2rem; max-width: 600px; }
.contact-portrait img {
  width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact-intro .lead { margin: 0; font-size: 1.15rem; }

/* ---------- 폼 ---------- */
.contact-form { margin-top: 1.5rem; }
.field { margin-bottom: 1.3rem; }
.field > label, .field legend { display: block; font-weight: 700; margin-bottom: .4rem; }
.req { color: #b3471b; }
.optional { color: var(--muted); font-weight: 400; font-size: .9rem; }
input[type=text], input[type=email], textarea {
  width: 100%; padding: .75rem .9rem; font: inherit; color: var(--text);
  border: 2px solid var(--line); border-radius: 8px; background: #fff;
}
input[type=text]:focus, input[type=email]:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; }
.help { display: block; color: var(--muted); font-size: .88rem; margin-top: .35rem; }
fieldset.field { border: 0; padding: 0; margin-inline: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.radio-row label { font-weight: 400; display: inline-flex; align-items: center; gap: .4rem; }
.contact-form .btn { margin-top: .4rem; }
.contact-direct { margin-top: 1.5rem; color: var(--muted); }
.hp-field { position: absolute; left: -9999px; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--text); color: #e6ebf1; padding: 2.5rem 0; margin-top: 0; }
.site-footer p { margin: .3rem 0; }
.site-footer a { color: #cfe0f5; }
.footer-a11y { font-size: .92rem; color: #aebccd; }

/* ---------- 반응형 ---------- */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { max-width: 320px; margin-top: 1.6rem; }   /* 모바일: 이름·역할·CTA 먼저, 사진은 그 뒤로 */
  .header-cta {
    display: inline-block; margin-left: auto; margin-right: .6rem;
    background: var(--accent); color: #fff; padding: .5rem .9rem;
    border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none;
  }
  .header-cta:hover { background: var(--accent-strong); color: #fff; }
  .lecture-grid { grid-template-columns: 1fr; }
  .lecture-figure { position: static; }

  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
    padding: .55rem .8rem; font: inherit; font-weight: 700; color: var(--text); cursor: pointer;
  }
  .nav-toggle__bars { width: 20px; height: 2px; background: var(--text); position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after {
    content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--text);
  }
  .nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }

  .primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: .5rem; }
  .primary-nav a { display: block; padding: .85rem 1rem; }
}

/* ---------- 모션 최소화 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
