:root {
  --gs-navy: #0f1b2d;
  --gs-navy-light: #1a2d4a;
  --gs-ice: #e8f4f8;
  --gs-ice-light: #f0f8fc;
  --gs-ice-bg: #f5fafd;
  --gs-copper: #b87333;
  --gs-copper-light: #d4956a;
  --gs-copper-dark: #8b5a2b;
  --gs-white: #ffffff;
  --gs-gray-50: #f8fafc;
  --gs-gray-100: #f1f5f9;
  --gs-gray-200: #e2e8f0;
  --gs-gray-300: #cbd5e1;
  --gs-gray-400: #94a3b8;
  --gs-gray-500: #64748b;
  --gs-gray-600: #475569;
  --gs-gray-700: #334155;
  --gs-gray-800: #1e293b;
  --gs-gray-900: #0f172a;
  --gs-radius-sm: 6px;
  --gs-radius-md: 10px;
  --gs-radius-lg: 16px;
  --gs-radius-xl: 24px;
  --gs-shadow-sm: 0 1px 3px rgba(15,27,45,0.06), 0 1px 2px rgba(15,27,45,0.04);
  --gs-shadow-md: 0 4px 12px rgba(15,27,45,0.08), 0 2px 4px rgba(15,27,45,0.04);
  --gs-shadow-lg: 0 12px 32px rgba(15,27,45,0.1), 0 4px 8px rgba(15,27,45,0.04);
  --gs-shadow-xl: 0 20px 48px rgba(15,27,45,0.12);
  --gs-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --gs-font-main: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --gs-font-heading: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif;
  --gs-content-width: 780px;
  --gs-wide-width: 1200px;
}

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

/* === GLOBAL RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--gs-font-main);
  color: var(--gs-gray-800);
  background: var(--gs-white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--gs-font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--gs-navy);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.015em; margin: 2em 0 0.8em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); letter-spacing: -0.01em; margin: 1.5em 0 0.6em; }

p { margin-bottom: 1.2em; line-height: 1.75; color: var(--gs-gray-700); }

a { color: var(--gs-copper); text-decoration: none; transition: color var(--gs-transition); }
a:hover { color: var(--gs-copper-dark); }

/* === WORDPRESS OVERRIDES === */
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { max-width: none !important; }

body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: var(--gs-wide-width);
  margin-left: auto;
  margin-right: auto;
}

/* Hide default WP header/footer */
body:not(.home) header.wp-block-template-part,
body header.wp-block-template-part { display: none !important; }
body footer.wp-block-template-part { display: none !important; }

/* === CUSTOM HEADER === */
.gs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gs-gray-200);
  transition: box-shadow var(--gs-transition);
}
.gs-header.scrolled { box-shadow: var(--gs-shadow-md); }
.gs-header-inner {
  max-width: var(--gs-wide-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.gs-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gs-navy);
}
.gs-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--gs-radius-sm);
}
.gs-logo-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gs-navy);
}
.gs-logo-text span { color: var(--gs-copper); }
.gs-nav { display: flex; align-items: center; gap: 4px; }
.gs-nav a {
  padding: 8px 14px;
  border-radius: var(--gs-radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gs-gray-600);
  transition: all var(--gs-transition);
  white-space: nowrap;
}
.gs-nav a:hover { color: var(--gs-navy); background: var(--gs-ice-light); }
.gs-nav a.active { color: var(--gs-copper); background: rgba(184,115,51,0.06); }

.gs-mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--gs-navy);
}
.gs-mobile-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .gs-mobile-toggle { display: block; }
  .gs-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--gs-white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--gs-gray-200);
    box-shadow: var(--gs-shadow-lg);
  }
  .gs-nav.open { display: flex; }
  .gs-nav a { padding: 12px 16px; width: 100%; border-radius: var(--gs-radius-md); }
}

/* === CONTENT AREA === */
.gs-content-wrap {
  max-width: var(--gs-content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === SINGLE POST === */
.gs-single-hero {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--gs-radius-lg);
  margin: 24px 0 32px;
  box-shadow: var(--gs-shadow-md);
}

.gs-post-content {
  max-width: var(--gs-content-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.gs-post-content h2 {
  position: relative;
  padding-bottom: 12px;
  margin-top: 48px;
  margin-bottom: 24px;
  color: var(--gs-navy);
}
.gs-post-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--gs-copper);
  border-radius: 2px;
}

.gs-post-content h3 {
  color: var(--gs-navy-light);
  font-weight: 600;
  margin-top: 32px;
}

.gs-post-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gs-gray-700);
}

.gs-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--gs-radius-md);
  margin: 24px 0;
  box-shadow: var(--gs-shadow-sm);
}

.gs-post-content figure {
  margin: 32px 0;
}

.gs-post-content figure img {
  width: 100%;
}

.gs-post-content figcaption {
  font-size: 0.85rem;
  color: var(--gs-gray-500);
  margin-top: 8px;
  text-align: center;
}

/* === TABLES === */
.gs-post-content table,
.gs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  border-radius: var(--gs-radius-md);
  overflow: hidden;
  border: 1px solid var(--gs-gray-200);
  font-size: 0.92rem;
}
.gs-post-content table thead th,
.gs-table thead th {
  background: var(--gs-navy);
  color: var(--gs-white);
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.gs-post-content table tbody td,
.gs-table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gs-gray-100);
  color: var(--gs-gray-700);
}
.gs-post-content table tbody tr:last-child td,
.gs-table tbody tr:last-child td { border-bottom: none; }
.gs-post-content table tbody tr:nth-child(even),
.gs-table tbody tr:nth-child(even) { background: var(--gs-gray-50); }
.gs-post-content table tbody tr:hover,
.gs-table tbody tr:hover { background: var(--gs-ice-light); }

@media (max-width: 640px) {
  .gs-post-content table,
  .gs-table { font-size: 0.82rem; display: block; overflow-x: auto; }
  .gs-post-content table thead th,
  .gs-table thead th,
  .gs-post-content table tbody td,
  .gs-table tbody td { padding: 8px 10px; white-space: nowrap; }
}

/* === LISTS === */
.gs-post-content ul, .gs-post-content ol {
  margin: 16px 0;
  padding-left: 24px;
}
.gs-post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: var(--gs-gray-700);
}

.gs-check-list {
  list-style: none;
  padding: 0;
}
.gs-check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}
.gs-check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gs-copper);
  border-radius: 4px;
}

/* === CALLOUT / BLOCKQUOTE === */
.gs-post-content blockquote,
.gs-callout {
  background: var(--gs-ice-light);
  border-left: 4px solid var(--gs-copper);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 var(--gs-radius-md) var(--gs-radius-md) 0;
  font-size: 0.95rem;
  color: var(--gs-gray-700);
}
.gs-post-content blockquote p:last-child { margin-bottom: 0; }

.gs-callout-title {
  font-weight: 700;
  color: var(--gs-navy);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* === INFO BOX === */
.gs-info-box {
  background: var(--gs-gray-50);
  border: 1px solid var(--gs-gray-200);
  border-radius: var(--gs-radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}

/* === BAR CHART (CSS only) === */
.gs-bar-chart { margin: 24px 0; }
.gs-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.gs-bar-label {
  min-width: 120px;
  font-size: 0.88rem;
  color: var(--gs-gray-600);
  font-weight: 500;
  text-align: right;
}
.gs-bar-track {
  flex: 1;
  background: var(--gs-gray-100);
  border-radius: 6px;
  height: 28px;
  overflow: hidden;
}
.gs-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gs-navy), var(--gs-copper));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 0.78rem;
  color: white;
  font-weight: 600;
  transition: width 0.6s ease;
}

@media (max-width: 640px) {
  .gs-bar-label { min-width: 80px; font-size: 0.8rem; }
  .gs-bar-fill { font-size: 0.72rem; }
}

/* === TOC === */
.gs-toc {
  background: var(--gs-gray-50);
  border: 1px solid var(--gs-gray-200);
  border-radius: var(--gs-radius-md);
  padding: 24px 28px;
  margin: 24px 0 40px;
}
.gs-toc-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gs-navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gs-toc ol {
  counter-reset: toc;
  list-style: none;
  padding: 0;
}
.gs-toc li {
  counter-increment: toc;
  margin-bottom: 6px;
}
.gs-toc li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--gs-copper);
  font-weight: 700;
  font-size: 0.82rem;
  margin-right: 8px;
}
.gs-toc a {
  color: var(--gs-gray-600);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--gs-transition);
}
.gs-toc a:hover { color: var(--gs-copper); }

/* === RELATED POSTS === */
.gs-related {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--gs-gray-200);
}
.gs-related-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gs-navy);
  margin-bottom: 24px;
}
.gs-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.gs-related-card {
  border-radius: var(--gs-radius-md);
  overflow: hidden;
  border: 1px solid var(--gs-gray-200);
  transition: all var(--gs-transition);
  text-decoration: none;
  display: block;
}
.gs-related-card:hover {
  box-shadow: var(--gs-shadow-md);
  transform: translateY(-2px);
  border-color: var(--gs-copper-light);
}
.gs-related-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.gs-related-card-body {
  padding: 16px;
}
.gs-related-card-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gs-navy);
  margin: 0;
  line-height: 1.4;
}

/* === FOOTER === */
.gs-footer {
  background: var(--gs-navy);
  color: var(--gs-gray-400);
  padding: 64px 24px 32px;
  margin-top: 80px;
}
.gs-footer-inner {
  max-width: var(--gs-wide-width);
  margin: 0 auto;
}
.gs-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gs-footer-brand h3 {
  color: var(--gs-white);
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.gs-footer-brand p {
  color: var(--gs-gray-400);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 360px;
}
.gs-footer-links h4 {
  color: var(--gs-gray-300);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.gs-footer-links a {
  display: block;
  color: var(--gs-gray-400);
  font-size: 0.88rem;
  margin-bottom: 8px;
  transition: color var(--gs-transition);
}
.gs-footer-links a:hover { color: var(--gs-white); }

.gs-footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.gs-footer-copy {
  font-size: 0.8rem;
  color: var(--gs-gray-500);
}
.gs-footer-notices {
  font-size: 0.78rem;
  color: var(--gs-gray-500);
  line-height: 1.6;
  max-width: 700px;
}

.gs-legal-notice {
  font-size: 0.78rem;
  color: var(--gs-gray-500);
  line-height: 1.6;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
  .gs-footer-top { flex-direction: column; gap: 32px; }
}

/* === CARD GRID === */
.gs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.gs-card {
  background: var(--gs-white);
  border-radius: var(--gs-radius-lg);
  overflow: hidden;
  border: 1px solid var(--gs-gray-200);
  transition: all var(--gs-transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.gs-card:hover {
  box-shadow: var(--gs-shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.gs-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.gs-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.gs-card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gs-navy);
  margin: 0 0 8px;
  line-height: 1.4;
}
.gs-card-body p {
  font-size: 0.88rem;
  color: var(--gs-gray-500);
  line-height: 1.6;
  flex: 1;
}
.gs-card-tag {
  display: inline-block;
  background: var(--gs-ice);
  color: var(--gs-navy-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
}

/* === LEGAL NOTICES IN POSTS === */
.legal-notice {
  font-size: 0.85em;
  color: #777;
  background: #f8f9fa;
  border-left: 3px solid #cbd5e1;
  padding: 10px 14px;
  margin-top: 2em;
  border-radius: 0 6px 6px 0;
}
.legal-notice p { margin: 4px 0; font-size: inherit; color: inherit; }

.ai-notice {
  font-size: 0.85em;
  color: #888;
  margin-top: 2em;
}

/* === SCROLL ANIMATION === */
.gs-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.gs-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === ACCESSIBILITY === */
:focus-visible {
  outline: 2px solid var(--gs-copper);
  outline-offset: 2px;
  border-radius: 2px;
}

/* === POST NAVIGATION === */
.gs-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--gs-gray-200);
}
.gs-post-nav a {
  padding: 12px 20px;
  background: var(--gs-gray-50);
  border-radius: var(--gs-radius-md);
  font-size: 0.9rem;
  color: var(--gs-gray-600);
  transition: all var(--gs-transition);
  max-width: 45%;
}
.gs-post-nav a:hover { background: var(--gs-ice-light); color: var(--gs-navy); }

/* === SUMMARY BOX === */
.gs-summary-box {
  background: linear-gradient(135deg, var(--gs-ice-light), var(--gs-ice));
  border: 1px solid rgba(184,115,51,0.12);
  border-radius: var(--gs-radius-lg);
  padding: 24px 28px;
  margin: 0 0 40px;
}
.gs-summary-box h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gs-copper-dark);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gs-summary-box p {
  font-size: 0.92rem;
  color: var(--gs-gray-700);
  line-height: 1.7;
  margin: 0;
}
