:root {
  --bg: #120F0C;
  --panel: #1D1712;
  --sepia: #B8894C;
  --sepia-light: #E8C888;
  --cream: #F4ECDD;
  --cream-soft: #C8BBA6;
  --red: #D8503C;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'IBM Plex Sans KR', sans-serif;
  font-size: 18px;
}

/* ============================
   1. 헤더 (Header & Nav)
============================ */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 15, 12, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #2A2119;
}

.nav-wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  font-family: 'Anton', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.brand span {
  color: var(--sepia-light);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--cream-soft);
  text-decoration: none;
  font-size: 1.05rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

nav a:hover {
  color: var(--cream);
  border-color: var(--red);
}

/* ============================
   2. 메인 히어로 섹션 (Hero)
============================ */
.film-strip {
  position: relative;
  overflow: hidden;
  padding: 14px 0;
  background: #0A0806;
}

.film-strip::before,
.film-strip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  background-image: repeating-linear-gradient(to right, #000 0 10px, transparent 10px 24px);
  height: 10px;
}

.film-strip::before { top: 0; }
.film-strip::after { bottom: 0; }

.hero {
  position: relative;
  padding: 120px 24px 130px;
  text-align: center;
  background: 
    linear-gradient(to bottom, rgba(14, 11, 8, 0.6), #0E0B08),
    url('https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?auto=format&fit=crop&q=80&w=1920') center/cover no-repeat;
}

/* ============================
   2.5 About Section
============================ */
.about-section {
  padding: 40px 24px;
}

.about-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--panel);
  border: 1px solid #3A2E20;
  border-radius: 8px;
  padding: 40px 24px;
  gap: 20px;
}

@media (min-width: 768px) {
  .about-card {
    flex-direction: row;
    text-align: left;
    padding: 50px 60px;
    gap: 40px;
  }
}

.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sepia-light);
  background: var(--cream);
}

.about-text h2 {
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.about-text p {
  color: var(--cream-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 600px;
}

.about-text strong {
  color: var(--sepia-light);
}

.about-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  display: inline-block;
  transition: opacity 0.2s;
}

.about-link:hover {
  opacity: 0.8;
}

.hero .script {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--sepia-light);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 10px 0 6px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero .sub {
  color: var(--cream-soft);
  max-width: 46ch;
  margin: 18px auto 34px;
  font-size: 1rem;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 2px;
  text-decoration: none;
  border: 1.5px solid var(--sepia-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.btn-primary {
  background: var(--sepia-light);
  color: #241B12;
}

.btn-ghost {
  color: var(--cream);
}

/* ============================
   3. 공통 섹션 스타일
============================ */
section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-head {
  margin-bottom: 32px;
}

.section-head .eyebrow {
  font-family: 'Space Mono', monospace;
  color: var(--red);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2 {
  font-family: 'Anton', sans-serif;
  font-size: 2.2rem;
  margin: 6px 0 8px;
  letter-spacing: 0.01em;
}

.section-head p {
  color: var(--cream-soft);
  margin: 0;
  max-width: 58ch;
  font-size: 1.05rem;
}

/* ============================
   4. 이번 주 영상 (Reel)
============================ */
.reel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.frame {
  flex: 0 0 340px;
  position: relative;
  border: 1px solid #3A2E20;
  background: var(--panel);
}

.frame .sprocket {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: #0A0806;
}

.frame .sprocket i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3A2E20;
  display: block;
}

.frame-thumb {
  height: 191px;
  background: linear-gradient(160deg, #3A2E1D, #12100C);
  display: flex;
  align-items: flex-end;
  padding: 10px;
  position: relative;
}

.frame-thumb .num {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-family: 'Pretendard', sans-serif;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.frame-thumb .cap {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-bottom: 2px solid var(--red);
}

.frame-body {
  padding: 18px 14px;
}

.frame-body h3 {
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.frame-body p {
  font-size: 0.95rem;
  color: var(--cream-soft);
  margin: 0;
}

/* ============================
   5. 단어장 (Vocab Flashcards)
============================ */
.deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.flash {
  perspective: 1000px;
  height: 220px;
  cursor: pointer;
}

.flash-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.flash.flipped .flash-inner {
  transform: rotateY(180deg);
}

.flash-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: 1px solid #3A2E20;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flash-front {
  background: var(--panel);
}

.flash-front .word {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--sepia-light);
}

.flash-front .tap {
  font-size: 0.85rem;
  color: var(--cream-soft);
}

.flash-back {
  background: #241B12;
  transform: rotateY(180deg);
}

.flash-back .mean {
  font-weight: 600;
  font-size: 1.1rem;
}

.flash-back .ex {
  font-size: 0.95rem;
  color: var(--cream-soft);
  font-style: italic;
  margin-top: 8px;
}

.flash-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--red);
}

/* ============================
   6. 문장 확장 드릴 (Drill)
============================ */
.drill-container {
  background: var(--panel);
  border: 1px solid #3A2E20;
  border-radius: 8px;
  padding: 30px;
  margin-top: 30px;
}

.drill-block {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px dashed #3A2E20;
}

.drill-number {
  color: var(--red);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: inline-block;
  padding: 4px 10px;
  background: rgba(229, 61, 48, 0.1);
  border-radius: 4px;
}
.drill-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.drill-step {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
}

.drill-en { 
  font-size: 1.6rem;
  font-weight: 700; 
  color: var(--cream);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.drill-en span.new {
  color: var(--sepia-light);
  font-weight: 700;
}

.drill-en span.highlight-blue {
  color: #73C2FB;
  font-weight: 700;
}

.drill-ko { 
  color: rgba(200, 187, 166, 0.85); 
  font-size: 1.15rem;
  font-weight: 500;
}

.drill-full {
  margin-top: 40px;
  padding: 24px;
  background: rgba(244, 236, 221, 0.03);
  border: 1px solid rgba(232, 200, 136, 0.2);
  border-left: 4px solid var(--sepia-light);
  border-radius: 6px;
}

.drill-full .full-en {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 8px;
  line-height: 1.4;
}

.drill-full .full-ko {
  font-size: 1.05rem;
  color: var(--cream-soft);
  padding-left: 30px;
}

/* ============================
   7. 푸터 (Footer)
============================ */
footer {
  padding: 70px 24px 60px;
  text-align: center;
  border-top: 1px solid #2A2119;
  margin-top: 30px;
}

footer p {
  color: var(--cream-soft);
  font-size: 1rem;
}

footer .btn {
  margin-top: 14px;
}

/* ============================
   8. 라우팅 및 상세 페이지 추가 스타일
============================ */

/* 뷰(View) 숨김 처리용 클래스 */
.view.hidden {
  display: none !important;
}

/* 그리드 레이아웃 (Lessons 뷰용) */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.lesson-card {
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.lesson-card:hover {
  transform: translateY(-5px);
  border-color: var(--sepia-light);
}

.lesson-card .frame-thumb {
  height: 191px;
}

/* 레슨 상세 페이지 (Lesson Detail) */
.lesson-title-area {
  margin-bottom: 30px;
}

.lesson-title-area .ep-badge {
  font-family: 'Space Mono', monospace;
  background: var(--red);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 12px;
}

.lesson-title-area h2 {
  font-family: 'Anton', sans-serif;
  font-size: 2.2rem;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}

.lesson-title-area p {
  color: var(--cream-soft);
  font-size: 1.05rem;
  margin: 0;
}

/* 유튜브 임베드 컨테이너 (반응형 16:9) */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin-bottom: 50px;
  border: 1px solid #3A2E20;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 오늘의 표현 리스트 */
.expression-list {
  background: var(--panel);
  border: 1px solid #3A2E20;
  padding: 24px 32px;
  margin-bottom: 50px;
  border-radius: 4px;
}

.expression-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px dashed #3A2E20;
}

.expression-item:last-child {
  border-bottom: none;
}

.expression-item .en {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  color: var(--sepia-light);
}

.expression-item .ko {
  color: var(--cream);
  font-size: 18px;
}

/* PDF 다운로드 영역 */
.pdf-section {
  text-align: center;
  padding: 40px;
  background: rgba(184, 137, 76, 0.05);
  border: 1px dashed var(--sepia-light);
  margin-top: 50px;
  border-radius: 4px;
}

.pdf-section p {
  margin-bottom: 16px;
  color: var(--cream-soft);
}

.btn-pdf {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-pdf:hover {
  background: #B64332;
  border-color: #B64332;
}

/* 기존 nav 탭 활성화 표시 수정용 */
nav a.active {
  color: var(--cream);
  border-color: var(--red);
}
