:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --ink: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #f0fdfa;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.narrow {
  max-width: 760px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}
.brand-en {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.brand-en span { color: var(--accent); }
.brand-ko {
  font-size: 13px;
  font-weight: 600;
  color: var(--subtle);
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover, .nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* Hero Banner */
.hero {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.hero-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #ccfbf1;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 680px;
}

/* Category Pills Section */
.section {
  padding: 36px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-head a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}

/* Card Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}
.card-thumb {
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.card-title {
  margin: 0 0 8px;
  font-size: 17.5px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card-desc {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--subtle);
}

/* Category Overview Cards (when empty or homepage) */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.cat-box {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.cat-box:hover {
  border-color: var(--accent);
  background: #fff;
}
.cat-box h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.cat-box p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* Article Page */
.article-wrap {
  padding: 36px 0 56px;
}
.breadcrumb {
  font-size: 13.5px;
  color: var(--subtle);
  margin-bottom: 14px;
}
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.article-title {
  margin: 0 0 14px;
  font-size: clamp(25px, 4vw, 35px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: var(--subtle);
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.article-hero {
  margin: 0 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.summary-box {
  background: var(--accent-soft);
  border: 1px solid #99f6e4;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 28px;
}
.summary-box strong {
  display: block;
  font-size: 14.5px;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.summary-box p {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink);
}

.article-body {
  font-size: 17px;
  line-height: 1.88;
  color: #1e293b;
}
.article-body h2 {
  margin: 40px 0 14px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.article-body h3 {
  margin: 28px 0 10px;
  font-size: 18.5px;
  font-weight: 700;
  color: var(--ink);
}
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.article-body li { margin-bottom: 8px; }
.article-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body blockquote.callout {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--ink);
  font-size: 15.5px;
}
.article-figure {
  margin: 26px 0;
}
.article-figure img {
  border-radius: 10px;
  border: 1px solid var(--border);
  width: 100%;
}
.article-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--subtle);
  text-align: center;
}
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  border: 1px solid var(--border);
  padding: 11px 14px;
  text-align: left;
}
th {
  background: var(--surface);
  font-weight: 700;
  color: var(--ink);
}
.author-card {
  margin-top: 40px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.author-card strong { font-size: 15.5px; color: var(--ink); }
.author-card p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* Static Page */
.prose {
  padding: 40px 0 64px;
}
.prose h1 {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.prose h2 {
  margin: 30px 0 10px;
  font-size: 19px;
  font-weight: 800;
}
.prose p, .prose li {
  color: #334155;
  font-size: 15.5px;
  line-height: 1.8;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 36px 0;
  margin-top: 48px;
  font-size: 13.5px;
  color: var(--subtle);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  font-weight: 600;
  color: var(--muted);
}
.footer-links a:hover { color: var(--accent); }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; gap: 8px; }
  .grid, .cat-grid { grid-template-columns: 1fr; }
  .article-body { font-size: 16px; }
}
