/* ===== CSS Variables ===== */
:root {
  --ocean-deep: #0d2137;
  --ocean-blue: #1a3a5c;
  --ocean-mid: #2c5f8a;
  --ocean-light: #4a90c4;
  --steel-dark: #2d3436;
  --steel-grey: #636e72;
  --steel-light: #b2bec3;
  --steel-pale: #dfe6e9;
  --warning-orange: #e17055;
  --orange-hover: #d35400;
  --white: #ffffff;
  --off-white: #f5f6fa;
  --bg-warm: #f0ece4;
  --bg-cool: #e8eef3;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-inverse: #f5f6fa;
  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --max-w-narrow: 680px;
  --max-w-medium: 780px;
  --max-w-wide: 880px;
  --max-w-full: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean-mid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--warning-orange); }
ul, ol { padding-left: 1.5em; }

/* ===== Typography ===== */
h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; }
h2 { font-size: 1.65rem; font-weight: 700; line-height: 1.3; margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.05rem; font-weight: 600; line-height: 1.5; }
p { margin-bottom: 1.25rem; }
small { font-size: 0.85rem; color: var(--text-secondary); }

/* ===== Layout Utilities ===== */
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 var(--spacing-md); }
.container-medium { max-width: var(--max-w-medium); margin: 0 auto; padding: 0 var(--spacing-md); }
.container-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 var(--spacing-md); }
.container-full { max-width: var(--max-w-full); margin: 0 auto; padding: 0 var(--spacing-md); }
.section-pad { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.section-pad-lg { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,33,55,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  max-width: var(--max-w-full);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text-inverse); font-weight: 700; font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.site-logo img { width: 36px; height: 36px; }
.site-logo:hover { color: var(--text-inverse); }
.nav-links { display: flex; gap: 1.8rem; list-style: none; padding: 0; }
.nav-links a {
  color: var(--steel-light); font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--warning-orange); }
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-inverse); font-size: 1.5rem; padding: 0.25rem;
}

/* ===== Hero / Full-bleed Image ===== */
.hero-section {
  margin-top: 64px;
  position: relative;
  width: 100%;
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  background: var(--ocean-deep);
  overflow: hidden;
}
.hero-img-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hero-img-wrap img, .hero-img-wrap svg {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: relative; z-index: 2;
  width: 100%;
  padding: var(--spacing-lg) var(--spacing-md);
  background: linear-gradient(to top, rgba(13,33,55,0.92) 0%, rgba(13,33,55,0.4) 60%, transparent 100%);
}
.hero-content {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  color: var(--text-inverse);
}
.hero-content h1 { color: var(--white); margin-bottom: 0.75rem; }
.hero-subtitle {
  font-size: 1.05rem; line-height: 1.7; color: var(--steel-light);
  max-width: 600px; margin-bottom: 1.5rem;
}
.hero-operator {
  font-size: 0.85rem; color: var(--steel-light); opacity: 0.8;
  margin-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.75rem;
}

/* ===== CTA Button ===== */
.btn-primary {
  display: inline-block;
  background: var(--warning-orange);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--orange-hover); color: var(--white); }
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ocean-mid);
  padding: 0.65rem 1.5rem;
  border: 2px solid var(--ocean-mid);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--ocean-mid); color: var(--white); }

/* ===== Full-width Image Band ===== */
.img-band {
  width: 100%;
  overflow: hidden;
  background: var(--steel-pale);
}
.img-band img, .img-band svg {
  width: 100%;
  display: block;
}
.img-band-caption {
  text-align: center;
  padding: 0.5rem var(--spacing-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--off-white);
}

/* ===== Observation / Prose Section ===== */
.prose-section {
  background: var(--white);
}
.prose-block {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-primary);
}
.prose-block p:last-child { margin-bottom: 0; }

/* ===== Pull Quote / Citation Block ===== */
.pull-quote {
  background: var(--bg-cool);
  border-left: 4px solid var(--ocean-mid);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.pull-quote p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ocean-blue);
  margin-bottom: 0.5rem;
}
.pull-quote cite {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: normal;
}

/* ===== Asymmetric Image Grid ===== */
.img-grid {
  display: grid;
  gap: 1rem;
}
.img-grid-2-1 {
  grid-template-columns: 2fr 1fr;
}
.img-grid-1-2 {
  grid-template-columns: 1fr 2fr;
}
.img-grid-3 {
  grid-template-columns: 1.5fr 1fr 1.2fr;
}
.img-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--steel-pale);
  min-height: 200px;
}
.img-grid-item img, .img-grid-item svg {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.img-grid-item .img-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Service / Content Cards (Asymmetric) ===== */
.service-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--steel-pale);
}
.service-item:last-child { border-bottom: none; }
.service-item h3 {
  color: var(--ocean-blue);
  margin-top: 0;
}
.service-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.service-boundary {
  background: var(--bg-warm);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: 0.9rem;
}
.service-boundary strong {
  color: var(--warning-orange);
}

/* ===== Data Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.data-table th {
  background: var(--ocean-deep);
  color: var(--text-inverse);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--steel-pale);
}
.data-table tr:nth-child(even) { background: var(--off-white); }

/* ===== Article Meta ===== */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 1rem 0;
  border-bottom: 1px solid var(--steel-pale);
  margin-bottom: 2rem;
}
.article-meta span { white-space: nowrap; }
.article-summary {
  background: var(--bg-cool);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ocean-blue);
  margin-bottom: 2rem;
}

/* ===== Featured Articles (Asymmetric) ===== */
.articles-featured {
  display: grid;
  gap: 1.5rem;
}
.articles-featured-3 {
  grid-template-columns: 1fr;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--steel-pale);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--steel-pale);
  position: relative;
  overflow: hidden;
}
.article-card-img img, .article-card-img svg {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
.article-card.featured-large .article-card-img {
  aspect-ratio: 2/1;
}
.article-card-body {
  padding: 1.25rem;
}
.article-card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.article-card-body .meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ===== FAQ ===== */
.faq-list { list-style: none; padding: 0; }
.faq-item {
  border-bottom: 1px solid var(--steel-pale);
  padding: 1.25rem 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-question {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ocean-blue);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--warning-orange);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.open .faq-question::after {
  content: '−';
}
.faq-answer {
  display: none;
  padding-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.faq-item.open .faq-answer { display: block; }

/* ===== Author Block ===== */
.author-block {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--off-white);
  border-radius: var(--radius-md);
  margin: 2rem 0;
}
.author-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--steel-pale);
  flex-shrink: 0;
  overflow: hidden;
}
.author-avatar img, .author-avatar svg {
  width: 100%; height: 100%; object-fit: cover;
}
.author-info h4 { margin: 0 0 0.25rem; }
.author-info p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }

/* ===== Contact Form ===== */
.contact-form { max-width: 560px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--steel-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ocean-mid);
  box-shadow: 0 0 0 3px rgba(44,95,138,0.1);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ocean-deep);
  color: var(--steel-light);
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
}
.footer-inner {
  max-width: var(--max-w-full);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.7; margin-top: 0.75rem; }
.footer-links h4 { color: var(--white); margin-bottom: 0.75rem; font-size: 0.95rem; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: var(--steel-light); font-size: 0.88rem; }
.footer-links a:hover { color: var(--warning-orange); }
.footer-bottom {
  max-width: var(--max-w-full);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ===== Warning Banner ===== */
.warning-banner {
  background: #c0392b;
  color: var(--white);
  text-align: center;
  padding: 0.6rem var(--spacing-md);
  font-size: 0.85rem;
  font-weight: 600;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
}
.warning-banner ~ .site-header { top: 36px; }
.warning-banner ~ .hero-section { margin-top: 100px; }
.warning-banner ~ main { margin-top: 36px; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.breadcrumb a { color: var(--ocean-mid); }
.breadcrumb span { margin: 0 0.4rem; color: var(--steel-light); }

/* ===== Disclaimer Notice (SENSITIVE) ===== */
.disclaimer-notice {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

/* ===== References & Related ===== */
.references {
  background: var(--off-white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
}
.references h3 { margin-top: 0; color: var(--ocean-blue); }
.references ol { font-size: 0.9rem; }
.references li { margin-bottom: 0.5rem; }
.related-links { margin: 2rem 0; }
.related-links ul { list-style: none; padding: 0; }
.related-links li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--steel-pale);
}

/* ===== Placeholder SVG Style ===== */
.placeholder-img {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}
.ph-hero { background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-blue) 100%); min-height: 400px; }
.ph-about { background: var(--steel-grey); min-height: 300px; }
.ph-service { background: var(--bg-cool); min-height: 250px; color: var(--steel-grey); }
.ph-article { background: var(--ocean-mid); min-height: 220px; }
.ph-gallery { background: var(--steel-pale); min-height: 280px; color: var(--steel-grey); }
.ph-author { background: var(--steel-light); min-height: 64px; }

/* ===== TOC ===== */
.toc {
  background: var(--off-white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0 2rem;
}
.toc h4 { margin: 0 0 0.75rem; font-size: 0.95rem; }
.toc ul { list-style: none; padding: 0; }
.toc li { margin-bottom: 0.35rem; }
.toc a { font-size: 0.9rem; color: var(--ocean-mid); }

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .articles-featured-3 {
    grid-template-columns: 1fr 1fr;
  }
  .articles-featured-3 .article-card:first-child {
    grid-column: 1 / -1;
  }
  .img-grid-2-1, .img-grid-1-2 { min-height: 320px; }
}

@media (max-width: 767px) {
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.35rem; }
  .hero-section { min-height: 55vh; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--ocean-deep);
    padding: 1rem var(--spacing-md);
    gap: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .menu-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr; }
  .img-grid-2-1, .img-grid-1-2, .img-grid-3 {
    grid-template-columns: 1fr;
  }
  .author-block { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ===== Page Header (non-home) ===== */
.page-header {
  margin-top: 64px;
  background: var(--ocean-deep);
  padding: var(--spacing-lg) var(--spacing-md);
  position: relative;
  overflow: hidden;
}
.page-header-img {
  position: absolute; inset: 0; opacity: 0.25;
}
.page-header-img img, .page-header-img svg {
  width: 100%; height: 100%; object-fit: cover;
}
.page-header-content {
  position: relative; z-index: 2;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  color: var(--text-inverse);
}
.page-header-content h1 { color: var(--white); }
.page-header-content p { color: var(--steel-light); margin-top: 0.75rem; max-width: 600px; }

/* ===== Offset Layout ===== */
.offset-right {
  padding-left: 5%;
}
.offset-left {
  padding-right: 8%;
}

/* ===== Inline Image in Prose ===== */
.prose-img {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--steel-pale);
}
.prose-img img, .prose-img svg {
  width: 100%;
  display: block;
}
.prose-img-caption {
  padding: 0.5rem 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ===== Stat Band (minimal, no pseudo-rolling) ===== */
.stat-band {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.5rem 0;
}
.stat-item {
  flex: 1;
  min-width: 140px;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ocean-blue);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ===== Contact Grid ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
