/* =========================================================
   CODE:ON
   색, 글꼴, 여백은 맨 위 :root 에서 한 번에 바꿀 수 있습니다.
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f8f6;
  --bg-tint: #e9f8ef;
  --text: #17203a;
  --text-sub: #4e5970;
  --text-faint: #8b94a7;
  --line: #e3e8ee;
  --line-strong: #cdd5df;
  --accent: #1fbf6b;
  --accent-hover: #19a95d;
  --accent-text: #0b7d45;
  --accent-glow: rgba(31, 191, 107, 0.2);

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1080px;
  --gutter: 20px;
  --header-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --card-pad: 28px;
}

/* ---------- 기본 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* 내용이 짧은 페이지에서도 푸터가 화면 아래에 붙도록 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1, h2, h3, p, ul, ol, dl, dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 헤더 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-colon {
  margin: 0 -0.14em;
  color: var(--accent);
}

.nav-list {
  display: flex;
  gap: 2px;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

.nav-link[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease;
}

.menu-toggle span:first-child {
  top: 17px;
}

.menu-toggle span:last-child {
  top: 25px;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- 공통 요소 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--bg);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--text);
}

.btn-sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn.is-disabled {
  border-color: var(--line);
  background: var(--bg-soft);
  color: var(--text-faint);
  cursor: default;
}

.on-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.on-dot.is-live {
  animation: on-pulse 2.4s ease-in-out infinite;
}

@keyframes on-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(31, 191, 107, 0.08);
  }
}

/* 모눈 배경: 오른쪽 위에서 흐려지는 격자 */
.grid-bg {
  position: relative;
  overflow: hidden;
}

.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 90% 0%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 100% at 90% 0%, #000 10%, transparent 70%);
  pointer-events: none;
}

.grid-bg > .container {
  position: relative;
}

.section {
  padding: 88px 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-title {
  margin-bottom: 32px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.card-grid {
  display: grid;
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

a.card {
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.card-label {
  margin-bottom: 14px;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.card-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.card-text {
  margin-top: 10px;
  color: var(--text-sub);
}

.card-more {
  margin-top: auto;
  padding-top: 20px;
  font-size: 15px;
  font-weight: 700;
}

.card-more::after {
  content: " \2192";
}

/* ---------- 페이지 상단 (About, Curriculum 등) ---------- */

.page-head {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--line);
}

.page-eyebrow {
  margin-bottom: 14px;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.page-title {
  font-size: clamp(28px, 4.6vw, 46px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.page-title.is-mono {
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
}

.page-lead {
  max-width: 720px;
  margin-top: 20px;
  color: var(--text-sub);
  font-size: clamp(16px, 1.6vw, 17px);
}

.page-lead + .page-lead {
  margin-top: 14px;
}

.page-lead strong {
  color: var(--text);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Home ---------- */

.recruit-banner {
  border-bottom: 1px solid #cdeedb;
  background: var(--bg-tint);
}

.recruit-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.recruit-banner-text {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
}

/* 첫 화면: 화면을 꽉 채우는 이름 + 스위치 그래픽 */
.home-hero {
  display: flex;
  align-items: center;
  min-height: min(780px, calc(100svh - var(--header-h)));
  padding: 72px 0;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.brand-title {
  font-family: var(--font-mono);
  font-size: clamp(60px, 10.5vw, 128px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-hero-lead {
  margin-top: 32px;
  font-size: clamp(19px, 2.3vw, 26px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

/* 켜지는 스위치. 처음엔 꺼져 있다가 0.5초 뒤 ON으로 바뀝니다 */
.power-switch {
  position: relative;
  justify-self: center;
  width: min(100%, 300px);
  aspect-ratio: 2 / 1;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: inset 0 2px 6px rgba(23, 32, 58, 0.12), 0 24px 60px -24px rgba(31, 191, 107, 0.7);
  animation: switch-track 0.5s ease 0.5s both;
}

.power-knob {
  position: absolute;
  top: 8%;
  right: 4%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(23, 32, 58, 0.18);
  animation: switch-knob 0.5s ease 0.5s both;
}

.power-text {
  position: absolute;
  top: 50%;
  left: 14%;
  font-family: var(--font-mono);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
  animation: switch-text 0.3s ease 0.9s both;
}

@keyframes switch-track {
  from {
    background: var(--line-strong);
    box-shadow: inset 0 2px 6px rgba(23, 32, 58, 0.12);
  }
}

@keyframes switch-knob {
  from {
    right: 54%;
  }
}

@keyframes switch-text {
  from {
    opacity: 0;
  }
}

/* 서브 문구 세 칸 */
.target-band {
  border-top: 1px solid #cdeedb;
  border-bottom: 1px solid #cdeedb;
  background: var(--bg-tint);
}

.target-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.target-list li {
  padding: 48px 28px;
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-align: center;
}

.target-list li + li {
  border-left: 1px solid #cdeedb;
}

.target-num {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 14px;
}

/* Home 섹션: 가운데 정렬된 영어 제목 */
.home-section {
  padding: 120px 0;
}

.home-head {
  margin-bottom: 56px;
  text-align: center;
}

.home-title {
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-sub {
  margin-top: 10px;
  color: var(--text-sub);
  font-size: 17px;
}

.more {
  margin-top: 48px;
  text-align: center;
}

.more-link {
  font-weight: 700;
}

.more-link::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 0 2px 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.more-link:hover {
  color: var(--accent-text);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

/* ---------- About ---------- */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 17px;
  font-weight: 600;
}

/* 우리가 쓰는 도구 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tool-grid li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.tool-name {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.tool-desc {
  color: var(--text-sub);
  font-size: 14px;
}

/* 운영진 */
.leader-photo {
  width: 100%;
  max-width: 720px;
  margin-bottom: 28px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  object-fit: cover;
}

.leader-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.leader-list li {
  display: grid;
  gap: 2px;
  min-width: 128px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.leader-role {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
}

.leader-name {
  font-size: 17px;
  font-weight: 800;
}

/* ---------- Curriculum ---------- */

/*
  타임라인 (커리큘럼, 모집 일정)
  휴대폰: 세로로 점과 내용이 이어집니다.
  PC: 가로선 위에 점이 찍히고, .timeline-zigzag 이면 내용 카드가 위아래로 번갈아 붙습니다.
*/
.timeline {
  display: grid;
  gap: 28px;
}

.timeline-label {
  font-size: 18px;
  font-weight: 700;
}

.timeline-label strong {
  margin-right: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 44px;
  line-height: 1;
}

.timeline-track {
  position: relative;
  display: grid;
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-areas:
    "dot label"
    "dot card";
  column-gap: 14px;
  padding-bottom: 28px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 13.5px;
  width: 1px;
  background: var(--line-strong);
}

.tl-label {
  grid-area: label;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
}

.tl-dot {
  grid-area: dot;
  width: 16px;
  height: 16px;
  margin: 4px 6px 0;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
}

.tl-card {
  grid-area: card;
  margin-top: 8px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-weight: 700;
  line-height: 1.5;
}

.tl-item.is-final .tl-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-glow);
}

.tl-item.is-final .tl-label {
  color: var(--accent-text);
}

.timeline-process .tl-card {
  padding: 10px 20px;
  border-radius: 999px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-list li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 14px;
  font-weight: 600;
}

/* Home 타임라인 아래 트랙 목록 */
.track-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 48px;
}

.track-row-label {
  color: var(--accent-text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
}

.track-row .chip-list {
  justify-content: center;
}

/* Curriculum 1단계 공통 기초 */
.basics-list {
  border-top: 2px solid var(--text);
}

.basics-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}

.basics-num {
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.7;
}

.basics-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.6;
}

.basics-text {
  margin-top: 4px;
  color: var(--text-sub);
}

/* Python 기초 문법: 개념 / 쉽게 말하면 / 예시 */
.concept-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.concept {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.concept dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 700;
}

.concept code {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--bg-tint);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.concept-plain {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
}

.concept-ex {
  margin-top: 6px;
  color: var(--text-sub);
  font-size: 14px;
}

.concept-ex::before {
  content: "예) ";
  color: var(--text-faint);
}

/* Curriculum 2단계 트랙 카드 */
.track-card .chip-list {
  margin: 18px 0 22px;
}

/* 카드 높이가 달라도 '이런 걸 만들어요'는 카드 아래쪽에 맞춰집니다 */
.track-result {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.track-result span {
  display: block;
  margin-bottom: 2px;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 700;
}

.callout {
  margin-top: 24px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-tint);
  font-weight: 600;
}

/* ---------- Projects ---------- */

.project-author {
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 600;
}

.empty-state {
  padding: 72px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text-sub);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

/* ---------- Recruit ---------- */

.recruit-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
}

.recruit-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.recruit-status.is-closed {
  background: var(--bg-soft);
  color: var(--text-sub);
}

.recruit-status.is-closed::before {
  background: var(--text-faint);
  box-shadow: none;
}

.info-list {
  border-top: 2px solid var(--text);
}

.info-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}

.info-row dt {
  font-weight: 700;
}

.info-sub {
  display: block;
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 15px;
}

.faq {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.faq-item summary {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 20px 56px 20px 22px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 24px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-sub);
  border-bottom: 2px solid var(--text-sub);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq-answer {
  display: flex;
  gap: 12px;
  padding: 0 22px 22px;
  color: var(--text-sub);
}

.faq-mark {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 700;
}

summary .faq-mark {
  color: var(--accent-text);
}

.faq-answer .faq-mark {
  color: var(--text-faint);
}

.cta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.cta-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.cta-text {
  margin-top: 6px;
  color: var(--text-sub);
}

.cta-box .page-actions {
  margin-top: 0;
}

.sub-title {
  margin: 48px 0 24px;
  font-size: 18px;
  font-weight: 800;
}

/* ---------- 결과물 슬라이드 ---------- */

.carousel-track {
  display: flex;
  gap: 16px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track > .card {
  flex: 0 0 calc((100% - 32px) / 3);
  scroll-snap-align: start;
}

.carousel-controls {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.carousel.is-scrollable .carousel-controls {
  display: flex;
}

.carousel-btn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
}

.carousel-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--text);
  border-right: 2px solid var(--text);
  transform: translate(-65%, -50%) rotate(45deg);
}

.carousel-btn[data-carousel-prev]::before {
  transform: translate(-35%, -50%) rotate(-135deg);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* 결과물 카드 대표 이미지 (data/projects.js의 image) */
.project-thumb {
  width: calc(100% + 2 * var(--card-pad));
  max-width: none;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 20px;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  background: var(--bg-soft);
  object-fit: cover;
}

.project-thumb.is-empty {
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-tint);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  opacity: 0.6;
}

/* 결과물 카드: 제목 버튼이 카드 전체를 덮어서 어디를 눌러도 상세 창이 열립니다 */
.project-card {
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.project-card:has(.card-open:focus-visible) {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.card-open {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.card-open:focus-visible {
  outline: none;
}

.card-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* ---------- 결과물 상세 창 ---------- */

.project-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.project-dialog::backdrop {
  background: rgba(23, 32, 58, 0.6);
}

.project-dialog .viewer-close {
  z-index: 1;
  top: 14px;
  right: 14px;
  background: var(--bg-soft);
}

.pd-body {
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 36px 36px 44px;
  overflow-y: auto;
}

.pd-head {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: start;
  gap: 28px;
  padding: 0 40px 28px 0;
  border-bottom: 1px solid var(--line);
}

/* 화면 캡처나 소개글이 없으면 아래 구분선을 숨깁니다 */
.pd-head:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.pd-thumb {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  object-fit: cover;
}

.pd-thumb.is-empty {
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--bg-tint);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.pd-title {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.pd-desc {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 17px;
}

.pd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pd-tags li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 14px;
  font-weight: 600;
}

/* 참여 · 도구 */
.pd-meta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.pd-meta > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd-meta dt {
  flex: none;
  width: 30px;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 700;
}

.pd-meta dd {
  margin: 0;
}

.pd-meta .pd-tags {
  margin-top: 0;
}

.pd-role {
  margin-right: 6px;
  font-weight: 800;
}

/* 대표(팀장·만든 사람) */
.pd-tags li.is-lead {
  border-color: var(--accent);
  background: var(--accent);
}

.pd-tags li.is-tool {
  background: var(--bg);
  color: var(--text-sub);
}

.pd-link {
  margin-top: 18px;
}

.pd-shots {
  display: flex;
  gap: 16px;
  margin: 28px -36px 0;
  padding: 0 36px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.pd-shot {
  flex: none;
  width: auto;
  max-width: none;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  scroll-snap-align: start;
}

.pd-section {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding-top: 32px;
}

.pd-section-title {
  color: var(--accent-text);
  font-size: 17px;
  font-weight: 800;
}

.pd-section-body {
  line-height: 1.8;
  white-space: pre-line;
}

.pd-items {
  display: grid;
  gap: 8px;
}

.pd-items li {
  position: relative;
  padding-left: 18px;
  line-height: 1.7;
}

.pd-items li::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.pd-steps {
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.pd-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  counter-increment: step;
}

.pd-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

/* 결과물이 아직 없을 때 보여주는 예시 카드 */
.example-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-sub);
  font-size: 15px;
}

.example-note strong {
  color: var(--text);
}

.example-note.is-center {
  justify-content: center;
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.example-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-sub);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
}

/* 한글 라벨은 코딩 글꼴 대신 본문 글꼴로 (띄어쓰기가 넓어지지 않게) */
.is-example .card-label,
.pd-info .card-label,
.page-eyebrow.is-ko {
  font-family: var(--font-sans);
}

.idea-tools {
  margin-top: auto;
  padding-top: 18px;
}

.idea-tools + .card-more {
  margin-top: 0;
  padding-top: 16px;
}

.idea-tools li {
  padding: 3px 10px;
  font-size: 13px;
}

/* ---------- 부원 후기 ---------- */

.quote-list {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.quote-card {
  position: relative;
  margin: 0;
  padding: 28px 32px 24px 80px;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.quote-card::before {
  content: "\201C";
  position: absolute;
  top: 18px;
  left: 28px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.quote-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
}

.quote-name {
  margin-top: 14px;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.quote-name::before {
  content: "- ";
}

.quote-major {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--accent-text);
  font-size: 12px;
}

/* ---------- Gallery ---------- */

/* 사진 슬라이드: 한 번에 한 장씩, 사진 비율은 자르지 않고 그대로 보여줍니다 */
.gallery-slider {
  max-width: 880px;
  margin: 0 auto;
}

.gallery-track {
  gap: 0;
  padding: 0;
}

.gallery-item {
  flex: 0 0 100%;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  scroll-snap-align: start;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  object-fit: contain;
  transition: opacity 0.15s ease;
}

.gallery-item:hover img {
  opacity: 0.9;
}

.gallery-caption {
  display: block;
  margin-top: 12px;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.gallery-slider .carousel-controls {
  margin-top: 16px;
}

.gallery-count {
  min-width: 64px;
  margin: 0;
  align-self: center;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: center;
}

.gallery-thumbs {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
}

/* 사진이 적으면 가운데, 많으면 왼쪽부터 (justify-content: center는 넘칠 때 앞이 잘림) */
.gallery-thumb:first-child {
  margin-left: auto;
}

.gallery-thumb:last-child {
  margin-right: auto;
}

.gallery-thumb {
  flex: 0 0 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  overflow: hidden;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-thumb:hover {
  opacity: 0.8;
}

.gallery-thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
}

.gallery-viewer {
  max-width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.gallery-viewer::backdrop {
  background: rgba(23, 32, 58, 0.8);
}

.gallery-viewer img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 110px);
  margin: 0 auto;
  object-fit: contain;
}

.viewer-caption {
  padding: 14px 20px;
  font-weight: 600;
}

.viewer-caption:empty {
  display: none;
}

.viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.viewer-close::before,
.viewer-close::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 12px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: rotate(45deg);
}

.viewer-close::after {
  transform: rotate(-45deg);
}

/* ---------- 다음 페이지 링크 ---------- */

.next-page {
  border-top: 1px solid var(--line);
}

.next-page a {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 14px;
  padding: 36px 0;
}

.next-label {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.next-title {
  font-size: 22px;
  font-weight: 800;
  transition: color 0.15s ease;
}

.next-title::after {
  content: " \2192";
}

.next-page a:hover .next-title {
  color: var(--accent-text);
}

/* ---------- 푸터 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 40px;
  padding-top: 44px;
  padding-bottom: 44px;
}

.footer-brand {
  display: grid;
  gap: 14px;
}

.footer-brand p {
  margin-top: 6px;
  color: var(--text-sub);
  font-size: 14px;
}

.social-list {
  display: flex;
  gap: 10px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  transition: background-color 0.15s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  background: var(--accent-text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.footer-nav li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  margin: 0 16px;
  background: var(--line-strong);
  vertical-align: middle;
}

.footer-nav a:hover {
  color: var(--accent-text);
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  padding-top: 16px;
  padding-bottom: 16px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
}

/* ---------- 반응형 ---------- */

@media (min-width: 640px) {
  .card-grid-2,
  .card-grid-4,
  .concept-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .tool-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 타임라인을 가로로 배치 (항목 수만큼 칸이 나뉩니다) */
  .timeline-zigzag {
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 16px;
  }

  .timeline-track {
    --tl-top: 112px;
    --tl-bottom: 112px;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
  }

  .timeline-process .timeline-track {
    --tl-top: 40px;
    --tl-bottom: 72px;
  }

  .timeline-track::before {
    content: "";
    position: absolute;
    top: calc(var(--tl-top) + 14px);
    right: 0;
    left: 0;
    height: 1px;
    background: var(--line-strong);
  }

  .tl-item {
    grid-template-columns: 1fr;
    grid-template-rows: var(--tl-top) 28px var(--tl-bottom);
    grid-template-areas:
      "label"
      "dot"
      "card";
    justify-items: center;
    padding: 0 8px;
    text-align: center;
  }

  .tl-item:not(:last-child)::before {
    display: none;
  }

  .tl-label {
    align-self: end;
    padding-bottom: 10px;
    font-size: 15px;
  }

  .tl-dot {
    position: relative;
    z-index: 1;
    align-self: center;
    margin: 0;
  }

  .tl-card {
    align-self: start;
    margin-top: 12px;
  }

  .timeline-zigzag .tl-label {
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
  }

  .timeline-zigzag .tl-item:nth-child(even) {
    grid-template-areas:
      "card"
      "dot"
      "label";
  }

  .timeline-zigzag .tl-item:nth-child(even) .tl-label {
    align-self: start;
    padding: 10px 0 0;
  }

  .timeline-zigzag .tl-item:nth-child(even) .tl-card {
    align-self: end;
    margin: 0 0 12px;
  }
}

@media (min-width: 960px) {
  .card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .concept-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 12px 24px rgba(23, 32, 58, 0.06);
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 12px;
  }

  .nav-list li + li {
    border-top: 1px solid var(--line);
  }

  .nav-link {
    padding: 15px 2px;
    border-radius: 0;
    font-size: 17px;
  }

  .nav-link:hover {
    background: none;
  }

  :root {
    --card-pad: 24px;
  }

  .section {
    padding: 60px 0;
  }

  .page-head {
    padding: 56px 0 44px;
  }

  .home-hero {
    min-height: 0;
    padding: 56px 0 64px;
  }

  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .power-switch {
    justify-self: start;
    width: 168px;
  }

  .power-text {
    font-size: 26px;
  }

  .target-list {
    grid-template-columns: 1fr;
  }

  .target-list li {
    padding: 22px 0;
    text-align: left;
  }

  .target-list li + li {
    border-top: 1px solid #cdeedb;
    border-left: 0;
  }

  .home-section {
    padding: 72px 0;
  }

  .home-head {
    margin-bottom: 36px;
  }

  .home-actions .btn,
  .page-actions .btn {
    flex: 1 1 auto;
  }

  .carousel-track > .card {
    flex-basis: 82%;
  }

  .quote-card {
    padding: 24px 22px 20px 60px;
  }

  .quote-card::before {
    top: 16px;
    left: 18px;
    font-size: 48px;
  }

  .cta-box {
    padding: 28px 24px;
  }

  .cta-box .page-actions {
    width: 100%;
  }

  .footer-nav {
    gap: 8px 20px;
  }

  .footer-nav li + li::before {
    display: none;
  }
}

@media (max-width: 639px) {
  .br-wide {
    display: none;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 2px;
  }

  .info-row dt {
    color: var(--accent-text);
    font-size: 14px;
  }

  .project-dialog,
  .pd-body {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .project-dialog {
    width: calc(100vw - 16px);
  }

  .pd-body {
    padding: 24px 20px 32px;
  }

  .pd-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-right: 0;
  }

  .pd-thumb {
    width: 96px;
  }

  .pd-thumb.is-empty {
    font-size: 13px;
  }

  .pd-shots {
    margin: 24px -20px 0;
    padding: 0 20px 8px;
  }

  .pd-shot {
    height: 180px;
  }

  .pd-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
