/* ============================================================
   hwansang.kr — 경력 · 프로젝트 사이트
   흰 종이 위 문서형 레이아웃. 강조색은 유튜브 빨강 하나뿐.
   ============================================================ */

:root{
  --bg:#ffffff;
  --surf:#f7f8fa;
  --ink:#0f172a;
  --sub:#475569;
  --mut:#94a3b8;
  --line:#e6e9ef;
  --accent:#1d4ed8;
  --accent-soft:#eff4ff;

  --yt:#e0210f;
  --yt-deep:#b4180a;
  --yt-soft:#fff6f4;
  --yt-line:#f7cec6;

  --maxw:960px;
  --tabh:56px;

  --font:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Pretendard",
         "Malgun Gothic","맑은 고딕","Noto Sans KR",system-ui,sans-serif;
}

*{box-sizing:border-box}

html{-webkit-text-size-adjust:100%}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font);
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  word-break:keep-all;
  overflow-wrap:anywhere;
  padding-bottom:64px;
}

.wrap{max-width:var(--maxw); margin:0 auto; padding:0 22px}

a{color:var(--accent)}
img{max-width:100%; display:block}

:focus-visible{outline:2px solid var(--accent); outline-offset:3px; border-radius:4px}

.skip{position:absolute; left:-9999px}
.skip:focus{left:12px; top:12px; z-index:99; background:var(--ink); color:#fff;
  padding:10px 16px; border-radius:8px; text-decoration:none}

/* ── 히어로 ─────────────────────────────────────────────── */
.hero{padding:56px 0 34px; border-bottom:1px solid var(--line)}

.eyebrow{
  margin:0 0 16px; font-size:12px; font-weight:700;
  letter-spacing:.12em; color:var(--accent);
}

.hero-top{display:flex; align-items:center; gap:20px; flex-wrap:wrap}

.avatar{
  width:96px; height:96px; border-radius:50%; object-fit:cover;
  border:1px solid var(--line); flex:none;
}

.hero h1{
  margin:0; font-size:clamp(36px,7vw,56px); font-weight:800;
  letter-spacing:-.045em; line-height:1.08; text-wrap:balance;
}
.hero h1 em{
  display:block; margin-top:8px; font-style:normal;
  font-size:.36em; font-weight:500; color:var(--mut); letter-spacing:-.01em;
}

.intro{
  margin:24px 0 0; max-width:62ch;
  font-size:17px; line-height:1.85; color:var(--sub);
}

.facts{
  list-style:none; margin:24px 0 0; padding:0;
  display:flex; flex-wrap:wrap; gap:8px 22px;
  font-size:13.5px; color:var(--mut);
}
.facts b{color:var(--ink); font-weight:700; font-variant-numeric:tabular-nums}
.facts .dim{color:var(--mut); font-variant-numeric:tabular-nums}

/* ── 유튜브 카드 (페이지에서 가장 눈에 띄는 요소) ───────── */
.yt{
  display:flex; align-items:center; gap:18px;
  margin-top:30px; padding:18px 20px;
  background:var(--yt-soft);
  border:1px solid var(--yt-line);
  border-radius:16px;
  text-decoration:none; color:inherit;
  transition:border-color .16s, box-shadow .16s, transform .16s;
}
.yt:hover{
  border-color:var(--yt);
  box-shadow:0 10px 28px rgba(224,33,15,.13);
  transform:translateY(-2px);
}

.yt-play{
  flex:none; width:62px; height:44px; border-radius:12px;
  display:grid; place-items:center;
  background:var(--yt); color:var(--yt);
  box-shadow:0 4px 12px rgba(224,33,15,.28);
}
.yt:hover .yt-play{background:var(--yt-deep); color:var(--yt-deep)}

.yt-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px}

.yt-head{display:flex; align-items:center; gap:9px; flex-wrap:wrap}
.yt-head b{font-size:19px; font-weight:800; letter-spacing:-.02em}
.yt-chip{
  font-size:11px; font-weight:700; letter-spacing:.02em;
  color:var(--yt); background:#fff;
  border:1px solid var(--yt-line); border-radius:99px; padding:2px 9px;
}
.yt-desc{font-size:14px; color:var(--sub)}
.yt-facts{font-size:12.5px; color:var(--mut); font-variant-numeric:tabular-nums}

.yt-cta{
  flex:none; display:inline-flex; align-items:center; gap:7px;
  background:var(--yt); color:#fff;
  font-size:14px; font-weight:700;
  padding:11px 20px; border-radius:10px;
  transition:background .16s;
}
.yt:hover .yt-cta{background:var(--yt-deep)}

/* ── 탭 바 ──────────────────────────────────────────────── */
.tabbar{
  position:sticky; top:0; z-index:40;
  background:rgba(255,255,255,.94);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.tabbar .wrap{display:flex; align-items:center; justify-content:space-between; gap:14px}

.tabs{display:flex; gap:30px}
.tab{
  position:relative; display:inline-flex; align-items:center;
  height:var(--tabh); padding:0;
  font-size:15.5px; font-weight:700; letter-spacing:-.01em;
  color:var(--mut); text-decoration:none;
}
.tab:hover{color:var(--sub)}
.tab[aria-selected="true"]{color:var(--ink)}
.tab[aria-selected="true"]::after{
  content:""; position:absolute; left:0; right:0; bottom:-1px;
  height:2px; background:var(--ink);
}
.tab .n{
  margin-left:7px; font-size:11.5px; font-weight:700; color:var(--mut);
  background:var(--surf); border-radius:99px; padding:2px 8px;
  font-variant-numeric:tabular-nums;
}

.yt-mini{
  flex:none; display:inline-flex; align-items:center; gap:7px;
  color:var(--yt); background:#fff;
  border:1px solid var(--yt-line); border-radius:99px;
  padding:7px 15px 7px 12px;
  font-size:13px; font-weight:700; text-decoration:none;
  transition:background .15s, color .15s, border-color .15s;
}
.yt-mini:hover{background:var(--yt); border-color:var(--yt); color:#fff}
.yt-mini:hover svg path:last-child{fill:var(--yt)}

/* ── 패널 ───────────────────────────────────────────────── */
.js .panel[data-on="0"]{display:none}
.panel{padding-bottom:8px}

.shead{
  margin:44px 0 4px; font-size:12.5px; font-weight:700;
  letter-spacing:.12em; text-transform:uppercase; color:var(--mut);
}

.empty{
  margin:28px 0; padding:22px; border:1px dashed var(--line);
  border-radius:12px; color:var(--mut); font-size:14.5px; text-align:center;
}

/* ── 분야 필터 ──────────────────────────────────────────── */
.chips{display:flex; flex-wrap:wrap; gap:7px; margin:20px 0 4px}
.chip{
  appearance:none; cursor:pointer; font:inherit;
  display:inline-flex; align-items:center; gap:7px;
  font-size:12.5px; font-weight:600; color:var(--sub);
  background:var(--bg); border:1px solid var(--line);
  padding:6px 13px; border-radius:99px;
  transition:background .14s, border-color .14s, color .14s;
}
.chip:hover{border-color:var(--mut)}
.chip[aria-pressed="true"]{background:var(--ink); border-color:var(--ink); color:#fff}
.chip .ct{font-size:11px; font-weight:700; color:var(--mut); font-variant-numeric:tabular-nums}
.chip[aria-pressed="true"] .ct{color:rgba(255,255,255,.65)}

/* ── 경력 목록 ──────────────────────────────────────────── */
.rows{border-top:1px solid var(--line); margin-top:20px}

.yr{
  display:grid; grid-template-columns:112px 1fr;
  border-bottom:1px solid var(--line);
}
.yr[hidden]{display:none}

.yr-label{
  margin:0; padding:22px 0;
  font-size:22px; font-weight:800; letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;
  position:sticky; top:calc(var(--tabh) + 1px); align-self:start;
  background:var(--bg);
}
.yr-label small{
  display:block; margin-top:2px;
  font-size:11.5px; font-weight:600; color:var(--mut); letter-spacing:0;
}

.yr-items{padding:8px 0}

.row{
  position:relative; padding:13px 0 13px 22px;
  border-left:1px solid var(--line);
}
.row[hidden]{display:none}
.row::before{
  content:""; position:absolute; left:-3.5px; top:22px;
  width:7px; height:7px; border-radius:50%; background:var(--mut);
}
.row.hi::before{background:var(--accent)}

.row-title{
  margin:0; font-size:15.5px; font-weight:600;
  letter-spacing:-.012em; line-height:1.58;
}
.row-sub{
  margin:5px 0 0; font-size:13px; color:var(--mut);
  display:flex; flex-wrap:wrap; gap:5px 12px; align-items:center;
}
.tag{
  font-size:11.5px; font-weight:700; color:var(--sub);
  background:var(--surf); border-radius:5px; padding:2px 8px;
}
/* 월·일 또는 기간 표시 (예: 09.19, 2023~2025) */
.date{
  font-size:11.5px; font-weight:700; color:var(--ink);
  font-variant-numeric:tabular-nums; letter-spacing:-.01em;
}
.row-sub a{font-weight:600; text-decoration:none}
.row-sub a:hover{text-decoration:underline}

/* ── 프로젝트 카드 ──────────────────────────────────────── */
.grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:22px; margin-top:24px;
}

.pcard{
  position:relative; display:flex; flex-direction:column;
  background:var(--bg); border:1px solid var(--line);
  border-radius:14px; overflow:hidden;
  transition:border-color .16s, box-shadow .16s, transform .16s;
}
.pcard:hover{
  border-color:var(--mut);
  box-shadow:0 10px 26px rgba(15,23,42,.07);
  transform:translateY(-2px);
}
.pcard:focus-within{border-color:var(--accent)}

.pcard-link{position:absolute; inset:0; z-index:2}

.thumb{
  width:100%; aspect-ratio:16/9; object-fit:cover;
  background:var(--surf); border-bottom:1px solid var(--line);
}
/* 썸네일이 없을 때 — 제목을 되풀이하지 않고 조용한 자리표시만 */
.thumb-alt{
  display:grid; place-items:center;
  background:linear-gradient(135deg,#f2f5f9,#e6ebf2);
  color:#b3bfcd;
}

.pbody{padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; flex:1}

.pmeta{margin:0; display:flex; align-items:center; gap:8px; min-width:0}
.ptag{
  flex:none; font-size:11px; font-weight:700; letter-spacing:.05em;
  color:var(--accent); background:var(--accent-soft);
  padding:3px 9px; border-radius:5px;
}
.phost{
  font-size:11.5px; color:var(--mut);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.pbody h3{margin:0; font-size:17px; font-weight:800; letter-spacing:-.025em; line-height:1.4}
.pdesc{margin:0; font-size:13.5px; line-height:1.72; color:var(--sub); flex:1}
.plink{margin:4px 0 0; font-size:13.5px; font-weight:700; color:var(--accent)}

/* ── 푸터 ───────────────────────────────────────────────── */
.site-foot{
  margin-top:56px; padding-top:26px; border-top:1px solid var(--line);
  font-size:13px; color:var(--mut);
}
.foot-yt{
  display:inline-flex; align-items:center; gap:9px;
  color:var(--yt); text-decoration:none; font-weight:700; font-size:14px;
  border:1px solid var(--yt-line); background:var(--yt-soft);
  border-radius:99px; padding:9px 18px 9px 15px;
  transition:background .15s, color .15s;
}
.foot-yt:hover{background:var(--yt); border-color:var(--yt); color:#fff}
.foot-yt:hover svg path:last-child{fill:var(--yt)}
.site-foot p{margin:18px 0 0}

/* ── 모바일 ─────────────────────────────────────────────── */
@media (max-width:720px){
  body{padding-bottom:40px}
  .wrap{padding:0 18px}

  .hero{padding:38px 0 28px}
  .hero-top{gap:16px}
  .avatar{width:72px; height:72px}
  .intro{font-size:15.5px; line-height:1.8; margin-top:20px}
  .facts{gap:6px 16px; font-size:13px}

  /* 유튜브 카드: 세로로 쌓고 버튼을 가로 전체로 */
  .yt{flex-wrap:wrap; gap:14px; padding:16px; border-radius:14px}
  .yt-play{width:52px; height:38px; border-radius:10px}
  .yt-body{flex:1 1 60%}
  .yt-head b{font-size:17px}
  .yt-cta{flex:1 0 100%; justify-content:center; padding:13px; font-size:15px}

  .tabs{gap:22px}
  .tab{font-size:15px}
  .yt-mini{padding:6px 12px 6px 10px; font-size:12.5px}
  .yt-mini span{display:none}
  .yt-mini{border-radius:50%; width:34px; height:34px; padding:0; justify-content:center}

  .shead{margin-top:32px}

  /* 연도 목록: 연도를 위로 */
  .yr{grid-template-columns:1fr}
  .yr-label{
    position:static; padding:20px 0 2px; font-size:19px;
    display:flex; align-items:baseline; gap:9px;
  }
  .yr-label small{display:inline; margin-top:0}
  .yr-items{padding:0 0 14px}
  .row{padding:11px 0 11px 18px}
  .row::before{top:19px}
  .row-title{font-size:15px}

  .grid{grid-template-columns:1fr; gap:18px; margin-top:20px}
}

@media (max-width:380px){
  .hero h1{font-size:32px}
  .yt-cta{font-size:14px}
}

/* ── 접근성 · 인쇄 ──────────────────────────────────────── */
@media (prefers-reduced-motion:reduce){
  *{transition:none !important; animation:none !important}
  .yt:hover,.pcard:hover{transform:none}
}

@media print{
  .tabbar,.yt,.yt-mini,.chips,.foot-yt,.skip{display:none !important}
  .js .panel[data-on="0"]{display:block !important}
  body{padding:0; font-size:11pt}
  .pcard,.row{break-inside:avoid}
  a{color:inherit; text-decoration:none}
}
