:root {
  --navy: #10203f;
  --navy-deep: #0a1730;
  --navy-soft: #1f3a6e;
  --accent: #a97c3b;
  --accent-deep: #8a6329;
  --gold-soft: #e8caa0;
  --bg: #fffdf9;
  --bg-alt: #f6f1e8;
  --card-bg: #ffffff;
  --text: #10203f;
  --text-soft: #5a6478;
  --border: #e9e3d6;
  --shadow: 0 10px 30px rgba(16, 32, 63, 0.08);
  --shadow-lg: 0 20px 44px rgba(16, 32, 63, 0.14);
  --font-display: 'Noto Serif KR', 'Pretendard', serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --navy: #0d1830;
  --navy-deep: #060d1c;
  --navy-soft: #223d78;
  --accent: #d1a869;
  --accent-deep: #e8caa0;
  --gold-soft: #e8caa0;
  --bg: #0b1220;
  --bg-alt: #0f1830;
  --card-bg: #131f38;
  --text: #eef1f8;
  --text-soft: #a4aec4;
  --border: #223250;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1.6;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 15px;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-soft);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 10px 24px rgba(169, 124, 59, 0.28);
}

.btn-primary:hover { box-shadow: 0 14px 30px rgba(169, 124, 59, 0.38); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 14px; }

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 120px 0 100px;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 2; text-align: center; }

.eyebrow {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(100deg, #ffd76a, #ffb020);
  color: #3a2400;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(255, 176, 32, 0.35);
  animation: eyebrow-pop 0.6s ease;
}

@keyframes eyebrow-pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.accent { color: var(--gold-soft); }

.hero-desc {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 auto 36px;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* Hero background slideshow */
.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-fade 24s ease-in-out infinite;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  opacity: 0.78;
}

@keyframes hero-fade {
  0%, 100% { opacity: 0; }
  4% { opacity: 1; }
  13% { opacity: 1; }
  17% { opacity: 0; }
}

.hero-slider {
  position: relative;
  padding: 40px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-slider-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: hero-slide 40s linear infinite;
}

.hero-slider-track img {
  height: 220px;
  width: auto;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@keyframes hero-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg img, .hero-slider-track, .gallery-slider-track { animation: none; }
  .hero-bg img:first-child { opacity: 0.35; }
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  .review-grid { grid-template-columns: repeat(2, 1fr); }
}

.review-frame { aspect-ratio: 3 / 4; background: #fff; }
.review-frame img { object-fit: contain; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.section-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 33px;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section-desc {
  color: var(--text-soft);
  font-size: 16px;
  max-width: 640px;
  margin: 0 0 48px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-icon { font-size: 28px; margin-bottom: 14px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--text-soft); font-size: 14.5px; }

/* Feature highlight */
.feature-highlight {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(120deg, var(--navy), var(--navy-deep));
  color: #fff;
  border-radius: 20px;
  padding: 28px 32px;
  border: 1px solid rgba(233, 202, 160, 0.18);
}

.feature-highlight-icon { font-size: 32px; }
.feature-highlight h3 { margin: 0 0 6px; font-size: 17px; }
.feature-highlight p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 14.5px; }

/* Textbook showcase */
.textbook-showcase {
  margin-top: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.textbook-info { max-width: 640px; margin: 0 0 24px; }
.textbook-info h3 { margin: 0 0 10px; font-size: 19px; }
.textbook-info p { margin: 0; color: var(--text-soft); font-size: 14.5px; }

.textbook-main-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.img-frame {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.img-frame:hover { box-shadow: var(--shadow-lg); }
.img-frame:hover img { transform: scale(1.06); }

.textbook-main-grid .img-frame { aspect-ratio: 3 / 4; }

/* Gallery */
.gallery-slider {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.gallery-slider-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: hero-slide 36s linear infinite;
}

.gallery-slider-track:hover { animation-play-state: paused; }

.gallery-slider-track figure { margin: 0; flex: 0 0 260px; }

.gallery-slider-track .img-frame {
  width: 260px;
  height: 180px;
  border-radius: 16px;
}

.gallery-slider-track figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-soft);
  text-align: center;
}

/* Level row */
.level-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.level-badge {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
}

.level-arrow { color: var(--text-soft); font-weight: 700; }

.subheading {
  font-size: 18px;
  margin: 0 0 20px;
  color: var(--text-soft);
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.timeline-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.timeline-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.timeline-badge {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.timeline-item p { margin: 0; font-size: 14px; color: var(--text-soft); }

.poster-figure {
  margin: 0;
  text-align: center;
}

.poster-figure img {
  max-width: 320px;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poster-figure img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.poster-figure figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-soft);
}

/* Director */
.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.profile-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.profile-list li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.profile-list li span { font-size: 20px; }

/* Notice card */
.notice-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.notice-card p {
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 16px;
}

.hours-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-soft);
}

/* Map */
.map-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.map-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 56px 0;
  text-align: center;
  border-top: 1px solid rgba(233, 202, 160, 0.25);
}

.site-footer p { margin: 6px 0; font-size: 13.5px; }
.copyright { margin-top: 18px; color: rgba(255, 255, 255, 0.45); }

/* Responsive */
@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .btn-call { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .profile-list { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .section-title { font-size: 26px; }
  .feature-highlight { flex-direction: column; text-align: center; }
  .level-row { justify-content: center; }
  .textbook-main-grid { grid-template-columns: 1fr; }
  .hero-slider-track img { height: 160px; }
  .gallery-slider-track figure { flex: 0 0 200px; }
  .gallery-slider-track .img-frame { width: 200px; height: 150px; }

  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .timeline { grid-template-columns: 1fr; }
  .hero { padding: 96px 0 72px; }
}

/* Journal (학습 소식) */
.breadcrumb {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0 0 20px;
}

.breadcrumb a { text-decoration: none; color: var(--text-soft); }
.breadcrumb a:hover { color: var(--accent); }

.post-header { max-width: 760px; margin: 0 0 40px; }

.post-tag {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.post-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.4;
  margin: 0 0 14px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13.5px;
  color: var(--text-soft);
}

.post-body { max-width: 760px; }
.post-body p { margin: 0 0 18px; font-size: 16px; line-height: 1.85; color: var(--text); }
.post-body h2 { font-size: 22px; margin: 44px 0 16px; font-family: var(--font-display); }
.post-body .section-desc { margin-bottom: 24px; }

.post-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 760px;
}

.post-list li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: var(--shadow);
}

.post-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 32px 0 8px;
}

.post-gallery-grid .img-frame { aspect-ratio: 1 / 1; border-radius: 12px; }
.post-gallery-grid figure { margin: 0; }
.post-gallery-grid figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
}

.post-table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  margin: 0 0 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-table th, .post-table td {
  padding: 12px 18px;
  text-align: left;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
}

.post-table th { background: var(--bg-alt); font-weight: 700; }
.post-table tr:last-child td { border-bottom: none; }

.post-note { font-size: 13.5px; color: var(--text-soft); margin: 0 0 32px; }

.post-hero-figure { margin: 0 0 28px; max-width: 760px; }
.post-hero-figure .img-frame { aspect-ratio: 794 / 1123; }

.faq-list { max-width: 760px; margin: 0 0 32px; }

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
}

.faq-item summary .faq-q {
  display: inline;
  margin: 0;
  font: inherit;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: 'Q. '; color: var(--accent); }
.faq-item p { margin: 0 0 16px; color: var(--text-soft); font-size: 14.5px; }
.faq-item p::before { content: 'A. '; color: var(--accent); font-weight: 700; }

.related-card {
  margin-top: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 760px;
}

.related-card h3 { margin: 0 0 16px; font-size: 18px; }

/* Journal list page */
.journal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.journal-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.journal-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.journal-card-thumb { height: 200px; overflow: hidden; }
.journal-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.journal-card-body { padding: 22px 24px 26px; }
.journal-card-date { font-size: 12.5px; color: var(--text-soft); font-weight: 600; }
.journal-card-title { margin: 8px 0 10px; font-size: 18px; font-family: var(--font-display); }
.journal-card-excerpt { margin: 0; font-size: 14px; color: var(--text-soft); }

@media (max-width: 860px) {
  .post-list { grid-template-columns: 1fr; }
  .post-gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .journal-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .post-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .post-title { font-size: 26px; }
}
