/* 밤: 심야 방송국 부스. 낮: 회보라 판에 자연광 */
:root, [data-theme="night"] {
  --bg: #141318;       /* 먹색 */
  --board: #211e29;    /* 푸른빛 차콜 */
  --frame: #2b2735;
  --line: #3a3546;
  --text: #f1ede3;     /* 아이보리 */
  --sub: #ada3c6;      /* 흐린 보라(라벨용으로 살짝 밝게) */
  --glow: rgba(145, 131, 180, .55);
  --glow-2: rgba(145, 131, 180, 0);
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
[data-theme="day"] {
  --bg: #d9d5e1;
  --board: #eceaf2;    /* 밝은 회보라 판 */
  --frame: #f8f6fb;
  --line: #cdc7d8;
  --text: #221f29;
  --sub: #5c5577;
  --glow: rgba(255, 246, 224, .95);   /* 창으로 드는 낮빛 */
  --glow-2: rgba(255, 246, 224, 0);
  --shadow: 0 18px 40px rgba(60, 50, 90, .14);
  color-scheme: light;
}
:root {
  --point: #beaf2e;    /* 닉네임 색: 고른 조명과 포커스에만 */
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body, .profile, .frame, .light label, .list li, .qa div { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure, ol { margin: 0; }
ol { padding: 0; list-style: none; }
/* 포커스: 닉네임 색 고리 + 바깥 테두리로 낮과 밤 모두에서 보이게 */
:focus-visible { outline: 3px solid var(--point); outline-offset: 3px; box-shadow: 0 0 0 7px var(--bg); border-radius: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 48px 28px 40px; }

/* ── 프로필 판 ───────────── */
.profile {
  display: grid; grid-template-columns: 38fr 62fr; grid-template-areas: "booth who" "booth qa" "booth links"; grid-template-rows: auto auto 1fr;
  column-gap: 48px; padding: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--board); box-shadow: var(--shadow);
  overflow: hidden; /* 초상 뒤 조명이 판 밖으로 번지지 않게 */
}
.who { grid-area: who; padding-top: 6px; }
.mark { font: 400 76px/.95 var(--serif); letter-spacing: -.015em; }
.intro { margin-top: 14px; font-size: 18px; line-height: 1.55; word-break: keep-all; }

.booth { grid-area: booth; position: relative; }
/* 초상 뒤에만 비치는 조명 */
.booth::before {
  content: ""; position: absolute; left: -14%; right: -14%; top: -10%; height: 86%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), var(--glow-2));
  transition: background .3s ease;
}
.frame { position: relative; z-index: 1; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--frame); }
.frame img { display: block; width: 100%; height: auto; aspect-ratio: 481 / 601; object-fit: cover; border-radius: 2px; }

.light { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; margin: 16px 0 0; padding: 0; border: 0; }
.light legend { float: left; margin-right: 8px; font: 700 12px/44px var(--mono); letter-spacing: .08em; color: var(--sub); }
.light label { position: relative; display: inline-flex; align-items: center; gap: 7px; min-width: 64px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; }
.light input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.light label span::before { content: "○"; margin-right: 6px; font-size: 11px; }
.light label:has(input:checked) { border-color: var(--point); font-weight: 800; }
.light label:has(input:checked) span::before { content: "●"; color: var(--point); }
.light label:has(input:focus-visible) { outline: 3px solid var(--point); outline-offset: 3px; }
.light input:focus-visible { outline: none; box-shadow: none; }

/* 문답: 라벨과 답 두 열, 얇은 선으로만 */
.qa { grid-area: qa; margin-top: 34px; border-top: 1px solid var(--line); }
.qa div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.qa dt { font-size: 14px; color: var(--sub); }
.qa dd { font-size: 16px; line-height: 1.55; word-break: keep-all; }

.links { grid-area: links; align-self: end; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.links a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none;
}
.links a:first-child { background: var(--text); color: var(--board); border-color: var(--text); }
.links a:hover { border-color: var(--text); }

/* ── 만든 것 ───────────── */
.works { margin-top: 64px; scroll-margin-top: 20px; }
.works-h { display: flex; align-items: baseline; gap: 10px; padding-bottom: 14px; font: 400 34px/1 var(--serif); }
.works-h small { font: 400 13px var(--sans); color: var(--sub); }
.list { border-top: 1px dotted var(--sub); }
.list li {
  display: grid; grid-template-columns: 5.2em 10.5em 4em minmax(0, 1fr) auto; align-items: baseline; column-gap: 18px;
  padding: 13px 4px; border-bottom: 1px dotted var(--line);
}
.list .ch { font: 700 12px var(--mono); color: var(--sub); }
.list .t { font-size: 16px; font-weight: 700; word-break: keep-all; }
.list .k { font-size: 13px; color: var(--sub); }
.list .d { font-size: 14.5px; line-height: 1.55; color: var(--text); opacity: .85; word-break: keep-all; }
.list .c {
  justify-self: end; display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 700; white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px;
}
.list .c:hover { text-decoration-color: var(--text); }
.soon { display: flex; gap: 14px; align-items: baseline; margin-top: 18px; font-size: 14px; }
.soon h3 { flex: none; font-size: 14px; font-weight: 700; }
.soon p { color: var(--sub); word-break: keep-all; }

.foot { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--sub); }

/* ── 좁은 화면: 이름 → 초상 → 문답 → 링크 ───────────── */
@media (max-width: 760px) {
  .wrap { padding: 20px 14px 32px; }
  .profile { grid-template-columns: 1fr; grid-template-areas: "who" "booth" "qa" "links"; grid-template-rows: none; padding: 26px 20px 24px; }
  .mark { font-size: 56px; }
  .intro { font-size: 16px; }
  .booth { margin-top: 24px; max-width: 420px; }
  .qa { margin-top: 26px; }
  .qa div { grid-template-columns: 6.5em minmax(0, 1fr); gap: 14px; padding: 13px 0; }
  .qa dt { font-size: 13px; }
  .qa dd { font-size: 15px; }
  .links { margin-top: 22px; }
  .links a { flex: 1; justify-content: center; }
  .works { margin-top: 48px; }
  .works-h { font-size: 28px; }
  .list li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t k" "d d" "c c"; row-gap: 4px; padding: 14px 2px; }
  .list .ch { display: none; }
  .list .t { grid-area: t; }
  .list .k { grid-area: k; justify-self: end; }
  .list .d { grid-area: d; font-size: 14px; }
  .list .c { grid-area: c; justify-self: start; min-height: 44px; }
  .soon { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .profile, .frame, .light label, .list li, .qa div, .booth::before { transition: none; }
}
