/* ===== 디자인 토큰 (Studio Seven hifi 시안 기반) ===== */
:root {
  --bg: #0a0a0a;
  --surface: #0e0e0e;
  --surface-hover: #131313;
  --fg: #ffffff;
  --fg-2: #9a9a9a;
  --fg-3: #888;
  --fg-4: #777;
  --fg-5: #555;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-hover: rgba(255, 255, 255, 0.28);
  --line-hover-strong: rgba(255, 255, 255, 0.4);
  --pad-x: clamp(20px, 5vw, 64px);
  --pad-top: clamp(40px, 7vh, 72px);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
::selection { background: #fff; color: #0a0a0a; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

@keyframes fadeUp { from { transform: translateY(12px); } to { transform: translateY(0); } }
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }

/* ===== 네비게이션 ===== */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad-x);
  background: rgba(10, 10, 10, 0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav .brand .logo { height: 22px; width: auto; display: block; }
@media (max-width: 600px) { .nav .brand .logo { height: 18px; } }
.nav .menu { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.nav .menu a { font-size: 14px; color: var(--fg-3); font-weight: 400; transition: color .2s ease; }
.nav .menu a:hover { color: #fff; }
.nav .menu a.active { color: #fff; font-weight: 600; }

/* ===== 페이지 섹션 공통 ===== */
.section { animation: fadeUp .5s ease; padding: var(--pad-top) var(--pad-x) 120px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em; color: #666; }
.page-title { margin: 14px 0 0; font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.02em; }
.page-desc { margin: 14px 0 0; color: #8a8a8a; font-size: 15px; }

/* ===== 칩(탭/필터) ===== */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 8px; }
.tab {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-soft);
  background: transparent; color: var(--fg-2); font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all .2s ease; font-family: inherit;
  border-color: rgba(255, 255, 255, 0.16);
}
.tab:hover { color: #fff; border-color: var(--line-hover); }
.tab.active { background: #fff; color: #0a0a0a; border-color: #fff; }

/* ===== 줄무늬 플레이스홀더 ===== */
.stripe {
  background: repeating-linear-gradient(135deg, #131313 0 13px, #191919 13px 26px);
  display: flex; align-items: center; justify-content: center;
}
.stripe .ph-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--fg-5);
  text-transform: uppercase; text-align: center; padding: 0 12px;
}

/* ===== 카드 공통 ===== */
.card {
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  overflow: hidden; transition: transform .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-hover); }
.thumb { overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 커리큘럼 ===== */
.subject-section { margin-top: 56px; }
.subject-head {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 14px;
}
.subject-head h3 { margin: 0; font-size: 23px; font-weight: 700; }
.subject-head .instructor { font-size: 13px; color: var(--fg-4); }
.subject-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--fg-2); max-width: 760px; }
.grid-cur { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.week-card .thumb { aspect-ratio: 4 / 3; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.week-card .body { padding: 20px 20px 22px; }
.week-badge {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: #0a0a0a; background: #fff; padding: 3px 9px; border-radius: 3px; font-weight: 600;
}
.week-card .summary { font-size: 16px; font-weight: 600; margin-top: 14px; line-height: 1.45; }
.week-card .detail {
  margin-top: 14px; font-size: 13.5px; line-height: 1.65; color: var(--fg-2);
  border-top: 1px solid var(--line-soft); padding-top: 14px; white-space: pre-line;
}
.week-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.week-card .toggle {
  font-size: 13px; color: #fff; cursor: pointer;
  border-bottom: 1px solid var(--line-hover-strong); padding-bottom: 2px; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit;
}
.week-card .teacher { font-size: 12px; color: var(--fg-4); }

/* ===== 행사 ===== */
.grid-event { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.event-card { display: flex; flex-direction: column; }
.event-card .poster { aspect-ratio: 3 / 2; position: relative; }
.event-card .tag {
  position: absolute; top: 14px; left: 14px; font-family: var(--mono); font-size: 11px;
  color: #0a0a0a; background: #fff; padding: 3px 9px; border-radius: 3px; font-weight: 600;
}
.event-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.event-card .title { font-size: 19px; font-weight: 700; line-height: 1.35; }
.event-card .meta { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.event-card .meta .row { display: flex; gap: 12px; font-size: 13px; }
.event-card .meta .k { color: #666; width: 38px; flex-shrink: 0; }
.event-card .meta .v { color: #cfcfcf; }
.event-card .desc {
  margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: #8f8f8f;
  border-top: 1px solid var(--line-soft); padding-top: 16px; white-space: pre-line;
}

/* ===== 포트폴리오 ===== */
.grid-pf { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pf-card { cursor: pointer; }
.pf-card:hover { border-color: rgba(255, 255, 255, 0.32); }
.pf-card .thumb { aspect-ratio: 4 / 5; }
.pf-card .body { padding: 16px 16px 18px; }
.pf-card .name { font-size: 15px; font-weight: 600; }
.pf-card .sub { font-size: 12.5px; color: var(--fg-4); margin-top: 5px; }

/* 라이트박스 */
.lightbox {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: rgba(5, 5, 5, 0.86); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; animation: fadeUp .25s ease; }
.lightbox .panel {
  display: flex; flex-direction: column; max-width: 880px; width: 100%; max-height: 90vh;
  background: #101010; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px;
  overflow: hidden; animation: lbIn .3s ease;
}
.lightbox .inner { display: flex; flex-wrap: wrap; }
.lightbox .media { flex: 1 1 340px; min-height: 300px; }
.lightbox .media img { width: 100%; height: 100%; object-fit: cover; }
.lightbox .media.stripe { background: repeating-linear-gradient(135deg, #141414 0 15px, #1c1c1c 15px 30px); }
.lightbox .info { flex: 1 1 300px; padding: 34px 32px; display: flex; flex-direction: column; }
.lightbox .info .dept { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--fg-4); }
.lightbox .info h3 { margin: 14px 0 0; font-size: 28px; font-weight: 700; line-height: 1.2; }
.lightbox .info .author { margin-top: 10px; font-size: 14px; color: var(--fg-2); }
.lightbox .info .desc { margin: 24px 0 0; font-size: 14.5px; line-height: 1.7; color: #bcbcbc; white-space: pre-line; }
.lightbox .info .close {
  margin-top: auto; align-self: flex-start; padding: 11px 22px; background: #fff; color: #0a0a0a;
  border: none; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* ===== 푸터 ===== */
.footer {
  border-top: 1px solid var(--line-soft); padding: 40px var(--pad-x);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  color: var(--fg-5); font-size: 12px;
}
.footer .mono { font-family: var(--mono); letter-spacing: 0.1em; }

/* ===== 커리큘럼: 전체 과정 프로세스(로드맵) ===== */
.process { margin-top: 40px; }
.process-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.process-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; color: #666; }
.process-title { font-size: 18px; font-weight: 700; }
.process-count { font-size: 12.5px; color: var(--fg-4); }
.roadmap {
  margin-top: 18px; display: flex; align-items: stretch; gap: 10px; flex-wrap: nowrap;
  overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: thin;
}
.rm-step {
  flex: 0 0 auto; min-width: 132px; display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.rm-no {
  font-family: var(--mono); font-size: 11px; font-weight: 600; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: #fff; color: #0a0a0a;
}
.rm-name { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.rm-weeks { font-size: 11.5px; color: var(--fg-4); font-family: var(--mono); }
.rm-arrow { flex: 0 0 auto; align-self: center; color: var(--fg-5); font-size: 16px; }

/* 전체 과정: 기초/심화/포트폴리오 카테고리 레인 */
.cat-lanes { margin-top: 20px; display: flex; flex-direction: column; gap: 24px; }
.cat-lane { border-left: 2px solid var(--line); padding-left: 18px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cat-name { font-size: 14px; font-weight: 700; letter-spacing: 0.01em; }
.cat-count {
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; line-height: 1.5;
}
.cat-lane .roadmap { margin-top: 0; }
/* 난이도 별점 */
.rm-stars { display: inline-flex; gap: 1px; margin-top: 3px; }
.rm-stars .star { font-size: 11px; line-height: 1; color: var(--fg-5); }
.rm-stars .star.on { color: #ffce4a; }

/* ===== 커리큘럼: 과목 목록 ===== */
.subject-list-head {
  margin: 52px 0 16px; font-size: 13px; color: var(--fg-3);
  font-family: var(--mono); letter-spacing: 0.06em;
}
.subject-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.subject-row {
  display: grid; grid-template-columns: 46px 1fr auto auto 18px; align-items: center; gap: 16px;
  width: 100%; text-align: left; padding: 20px 8px; background: none; cursor: pointer;
  border: none; border-bottom: 1px solid var(--line-soft); color: inherit; font-family: inherit;
  transition: background .2s ease, padding .2s ease;
}
.subject-row:hover { background: var(--surface-hover); padding-left: 16px; padding-right: 16px; }
.sr-index { font-family: var(--mono); font-size: 13px; color: var(--fg-5); }
.sr-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.sr-meta { font-size: 13px; color: var(--fg-3); white-space: nowrap; }
.sr-count {
  font-family: var(--mono); font-size: 11px; color: var(--fg-2); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.sr-arrow { font-size: 20px; color: var(--fg-5); justify-self: end; transition: color .2s ease, transform .2s ease; }
.subject-row:hover .sr-arrow { color: #fff; transform: translateX(3px); }
@media (max-width: 600px) {
  .subject-row { grid-template-columns: 32px 1fr 16px; gap: 12px; padding: 16px 6px; }
  .sr-meta, .sr-count { display: none; }
  .sr-name { font-size: 16px; }
}

/* ===== 커리큘럼: 과목 상세 모달 ===== */
.modal { position: fixed; inset: 0; z-index: 90; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 5, 0.84); backdrop-filter: blur(6px); }
.modal-panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(1520px, 97vw); max-height: 94vh; display: flex; flex-direction: column;
  background: #0d0d10; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 14px;
  overflow: hidden; animation: lbIn .28s ease;
}
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(20, 20, 20, 0.8);
  color: #fff; font-size: 14px; cursor: pointer; line-height: 1;
}
.modal-x:hover { border-color: var(--line-hover); }
.modal-scroll { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; }

/* 스플릿: 좌 소개 패널 | 우 주차 그리드 */
.cur-split { display: grid; grid-template-columns: 460px 1fr; width: 100%; min-height: 0; }

/* 좌측 소개 패널 */
.cur-intro {
  padding: 54px 46px; background: #0a0a0c; border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; overflow-y: auto;
}
.ci-eyebrow { font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: 0.22em; color: rgba(232, 232, 234, 0.45); }
.ci-title { margin: 22px 0 8px; font-size: clamp(32px, 3.4vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.ci-sub { font-size: 17px; font-weight: 500; color: rgba(232, 232, 234, 0.5); }
.ci-desc { margin: 24px 0 0; font-size: 16.5px; line-height: 1.8; color: rgba(232, 232, 234, 0.68); white-space: pre-line; }
.ci-stats { display: flex; gap: 34px; margin-top: 34px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ci-stat .v { font-family: var(--mono); font-weight: 600; font-size: 28px; }
.ci-stat .v.txt { font-family: inherit; letter-spacing: -0.01em; }
.ci-stat .l { font-size: 11.5px; color: rgba(232, 232, 234, 0.45); margin-top: 3px; }
.ci-spacer { flex: 1; min-height: 22px; }
.ci-instructor { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ci-avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; background-color: #1d1d23;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 6px, rgba(255, 255, 255, 0.012) 6px 12px);
}
.ci-name { font-size: 14px; font-weight: 600; }
.ci-role { font-size: 12px; color: rgba(232, 232, 234, 0.45); margin-top: 1px; }

/* 우측 주차 그리드 (2열, 넘치면 스크롤) */
.cur-weeks {
  padding: 34px 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  align-content: start; overflow-y: auto; min-height: 0;
}
.wk2 {
  display: flex; align-items: flex-start; gap: 22px; background: #15151a;
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 13px; padding: 18px 22px 18px 18px;
  transition: border-color .15s ease, transform .15s ease;
}
.wk2:hover { border-color: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }
.wk2-thumb {
  position: relative; width: 150px; height: 150px; flex: none; border-radius: 10px; overflow: hidden;
  background-color: #1d1d23;
}
.wk2-thumb.stripe { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.045) 0 9px, rgba(255, 255, 255, 0.012) 9px 18px); }
.wk2-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wk2-no {
  position: absolute; top: 8px; left: 8px; z-index: 1; font-family: var(--mono); font-weight: 600;
  font-size: 11.5px; padding: 3px 8px; background: rgba(0, 0, 0, 0.55); border-radius: 6px; color: #fff;
}
.wk2-img {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.26);
}
.wk2-text { min-width: 0; }
.wk2-title { font-size: 18.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.wk2-week { margin-top: 4px; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.02em; color: rgba(232, 232, 234, 0.42); }
.wk2-desc {
  margin: 9px 0 0; font-size: 13px; line-height: 1.6; color: rgba(232, 232, 234, 0.64);
  white-space: pre-line; /* 분량 제한 없이 학습내용 전문 표시 */
}

@media (max-width: 760px) {
  .modal-scroll { overflow-y: auto; }
  .cur-split { grid-template-columns: 1fr; }
  .cur-intro { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.08); overflow: visible; padding: 36px 24px; }
  .cur-weeks { grid-template-columns: 1fr; overflow: visible; padding: 24px; }
}

/* ===== 상태 메시지 ===== */
.state { padding: 60px 0; text-align: center; color: var(--fg-3); }
