/* =====================================================
   FDE 협업 인터뷰 페이지
   컨셉: 실제 K님이 만드는 "구글 스프레드시트 자동화 대시보드"의
   크롬(메뉴바 · 수식 입력줄 · 셀 그리드 · 시트 탭)을 오마주.
   개발자(K)=블루, 마케터(J)=코랄, 데이터 하이라이트=옐로.
   ===================================================== */

:root{
  --bg:            #F6F7F2;
  --bg-alt:        #ECEEE6;
  --paper:         #FFFFFF;
  --ink:           #15181A;
  --ink-soft:      #5C6259;
  --ink-faint:     #9CA097;
  --line:          #D8DBCE;
  --line-strong:   #B9BEAC;

  --dev:           #2C56E0;
  --dev-soft:      #E9EDFC;
  --mkt:           #FF5836;
  --mkt-soft:      #FFE9E2;
  --highlight:     #FFD23F;
  --highlight-ink: #4A3B00;

  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 3px;
  --radius-md: 6px;
  --max-w: 880px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 64px; /* 하단 시트 탭 여백 */
}

::selection{ background: var(--highlight); color: var(--highlight-ink); }

a{ color: inherit; }

/* ---------- 메뉴바 (장식) ---------- */
.menubar{
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.menubar-inner{
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.menubar-doc{ color: var(--ink-soft); font-weight: 500; }
.menubar-items{ display: flex; gap: 16px; }
.menubar-items span{ letter-spacing: 0.02em; }

/* ---------- 수식 입력줄 (시그니처 요소) ---------- */
.formula-bar{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.formula-bar-inner{
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cell-ref-box{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--dev);
  background: var(--dev-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  min-width: 42px;
  text-align: center;
  transition: color 0.2s ease, background 0.2s ease;
}
.fx-label{
  font-family: var(--font-mono);
  font-style: italic;
  font-weight: 600;
  color: var(--ink-faint);
  font-size: 13px;
  border-right: 1px solid var(--line);
  padding-right: 12px;
}
.fx-preview{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 공통 레이아웃 ---------- */
main{ max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.chapter-kicker{
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 0 0 8px;
}
.chapter-title{
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0 0 32px;
}
.chapter-title-sub{
  display: inline-block;
  font-size: 0.62em;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 4px;
}

.chapter{ padding: 72px 0; border-top: 1px solid var(--line); }

/* ---------- HERO ---------- */
.hero{
  position: relative;
  padding: 56px 20px 72px 56px;
  margin-bottom: 8px;
}
.ruler-col{
  position: absolute;
  left: 20px;
  top: 56px;
  bottom: 8px;
  width: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  border-right: 1px solid var(--line);
  padding-right: 6px;
  text-align: right;
}
.ruler-row{
  display: flex;
  gap: 40px;
  padding-left: 56px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.hero-cell{
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 48px clamp(24px, 5vw, 56px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.eyebrow-mono{
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--dev);
  margin: 0 0 18px;
}
.hero h1{
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.hero-sub{
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 32px;
}
.hero-meta-row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.meta-chip{
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
}
.chip-ref{
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.chip-ref.dev{ background: var(--dev); }
.chip-ref.mkt{ background: var(--mkt); }
.chip-text{ font-size: 13px; color: var(--ink-soft); font-weight: 500; }

/* ---------- 인트로 섹션 ---------- */
.intro-section{ padding: 56px 0 72px; }

.profile-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.profile-cell{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  border-top: 3px solid var(--line-strong);
}
.profile-cell.dev-cell{ border-top-color: var(--dev); }
.profile-cell.mkt-cell{ border-top-color: var(--mkt); }

.profile-head{ display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar-cell{
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.avatar-cell.dev{ background: var(--dev); }
.avatar-cell.mkt{ background: var(--mkt); }
.profile-name{ font-weight: 700; font-size: 16px; margin: 0; }
.profile-role-mono{ font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--ink-faint); }
.profile-quote{
  font-weight: 600;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
  color: var(--ink);
}
.profile-desc{ font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.7; }

/* ---------- Q&A 로우 (스프레드시트 셀) ---------- */
.qa-row{
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.qa-row.in-view{ opacity: 1; transform: translateY(0); }
.qa-row:first-of-type{ padding-top: 0; }
.qa-row:last-of-type{ border-bottom: none; }

.qa-ref-col{ display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.cell-tag{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
}
.cell-tag.dev{ background: var(--dev-soft); color: var(--dev); }
.cell-tag.mkt{ background: var(--mkt-soft); color: var(--mkt); }
.asker-mono{ font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

.qa-q{
  font-weight: 700;
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 14px;
  padding-left: 14px;
  border-left: 2px solid var(--line-strong);
}
.qa-a{
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin: 0 0 12px;
}
.qa-a:last-child{ margin-bottom: 0; }

/* ---------- 기술 스택 칩 ---------- */
.stack-row{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stack-chip{
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
}

/* ---------- 인용구 수식바 (시그니처 반복) ---------- */
.quote-formula{
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: var(--ink);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 40px;
}
.quote-formula .fx-label{ color: rgba(255,255,255,0.4); border-right-color: rgba(255,255,255,0.2); }
.quote-formula-text{
  font-family: var(--font-mono);
  font-size: clamp(14px, 2.2vw, 17px);
  font-weight: 600;
  color: var(--highlight);
  line-height: 1.5;
}

/* ---------- 통계 셀 (선택된 셀 오마주) ---------- */
.stat-cells{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.stat-cell{
  position: relative;
  background: var(--paper);
  border: 2px solid var(--highlight);
  border-radius: var(--radius-sm);
  padding: 18px 18px 16px;
}
.stat-cell::after{
  content: "";
  position: absolute;
  right: -5px; bottom: -5px;
  width: 8px; height: 8px;
  background: var(--highlight);
  border: 1.5px solid var(--paper);
}
.stat-formula{
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.stat-value{
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.stat-arrow{ color: var(--dev); margin: 0 4px; }
.stat-label{ font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ---------- 페르소나 (Ch5) ---------- */
.persona-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
.persona-cell{
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.persona-cell.dev-cell{ border-left-color: var(--dev); }
.persona-cell.mkt-cell{ border-left-color: var(--mkt); }
.persona-text{ font-size: 15px; line-height: 1.8; color: var(--ink); margin: 12px 0 0; }

/* ---------- 빈칸 채우기 ---------- */
.fillblank-block{
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px dashed var(--line-strong);
}
.fillblank-title-mono{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.fillblank-question{
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  margin: 0 0 32px;
}
.blank{
  color: var(--dev);
  border-bottom: 2px solid var(--dev);
}
.fill-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fill-cell{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}
.fill-cell.dev-cell{ box-shadow: inset 3px 0 0 var(--dev); }
.fill-cell.mkt-cell{ box-shadow: inset 3px 0 0 var(--mkt); }
.fill-name{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-faint);
}
.fill-eq{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(15px, 2vw, 17px);
  color: var(--ink);
  margin: 10px 0 14px;
  line-height: 1.5;
}
.fill-desc{ font-size: 14px; color: var(--ink-soft); line-height: 1.75; margin: 0; }

/* ---------- 클로징 ---------- */
.closing{ padding: 72px 0 96px; border-top: 1px solid var(--line); }
.closing-title{
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 32px;
}
.closing-grid{ display: grid; grid-template-columns: 1fr; gap: 16px; }
.closing-cell{
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--dev);
  border-radius: var(--radius-md);
  padding: 32px;
}
.closing-text{ font-size: 15px; line-height: 1.85; color: var(--ink-soft); margin: 0 0 16px; }
.closing-text:last-child{ margin-bottom: 0; }

.page-footer{ margin-top: 48px; text-align: center; }
.footer-mono{ font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

/* ---------- 하단 시트 탭 바 ---------- */
.sheet-tabs{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg-alt);
  border-top: 1px solid var(--line-strong);
  display: flex;
  gap: 2px;
  padding: 6px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet-tabs::-webkit-scrollbar{ display: none; }
.tab{
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.tab:hover{ background: rgba(255,255,255,0.5); }
.tab.active{
  background: var(--paper);
  color: var(--dev);
  border-color: var(--line-strong);
  border-bottom-color: var(--paper);
  box-shadow: 0 -1px 3px rgba(0,0,0,0.04);
}

/* ---------- 반응형 ---------- */
@media (max-width: 720px){
  .menubar-items{ display: none; }
  .ruler-row, .ruler-col{ display: none; }
  .hero{ padding: 32px 4px 48px; }
  .hero-cell{ padding: 32px 22px; border-radius: var(--radius-sm); }
  .profile-grid, .persona-grid, .fill-grid, .stat-cells{ grid-template-columns: 1fr; }
  .qa-row{ grid-template-columns: 1fr; gap: 10px; }
  .qa-ref-col{ flex-direction: row; align-items: center; }
  .chapter{ padding: 48px 0; }
  .fx-preview{ display: none; }
  body{ padding-bottom: 56px; }
}
