@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&family=Noto+Serif+KR:wght@400;700&display=swap');

:root {
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-muted: #f1f5f9;
  --color-text-primary: #0f172a;
  --color-text-body: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-accent: #0369a1;
  --color-conservative-bg: #dbeafe;
  --color-conservative: #1e40af;
  --color-conservative-border: #3b82f6;
  --color-progressive-bg: #fee2e2;
  --color-progressive: #991b1b;
  --color-progressive-border: #ef4444;
  --color-neutral-bg: #f3f4f6;
  --color-neutral: #374151;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --max-width: 720px;
}

html.dark {
  --color-bg: #0f172a;
  --color-bg-subtle: #1e293b;
  --color-bg-muted: #334155;
  --color-text-primary: #f1f5f9;
  --color-text-body: #e2e8f0;
  --color-text-muted: #a1b1c7;
  --color-border: #475569;
  --color-accent: #38bdf8;
  --color-conservative-bg: #1e3a5f;
  --color-conservative: #93c5fd;
  --color-progressive-bg: #4c1d1d;
  --color-progressive: #fca5a5;
  --color-neutral-bg: #1e293b;
  --color-neutral: #a1b1c7;
  --color-shadow: rgba(0, 0, 0, 0.32);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--color-text-body);
  background: var(--color-bg);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
  margin-bottom: 2.5rem;
  position: relative;
}

.site-header .container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.site-header-left {
  flex: 1;
  min-width: 0;
}

.site-title {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  text-decoration: none;
  display: inline-block;
}

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

.site-desc {
  color: var(--color-text-muted);
  font-size: 0.825rem;
  margin-top: 0.3rem;
  line-height: 1.5;
}

.theme-toggle {
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-accent);
  transform: scale(1.05);
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 4rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.7;
}

.site-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-list-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--color-bg);
  box-shadow: 0 1px 3px var(--color-shadow);
}

.news-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--color-shadow);
}

.news-list-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.news-list-link {
  display: block;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  text-decoration: none;
  margin-top: 0.25rem;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.news-list-link:hover {
  color: var(--color-accent);
}

.news-list-headlines {
  margin-top: 0.65rem;
  padding: 0;
  list-style: none;
  counter-reset: headline-counter;
}

.news-list-headlines li {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  padding: 0.2rem 0;
  counter-increment: headline-counter;
  display: flex;
  gap: 0.5rem;
}

.news-list-headlines li::before {
  content: counter(headline-counter);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-bg-muted);
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.news-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.news-header h1 {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.news-header time {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.news-content {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.05rem;
  line-height: 2.0;
  color: var(--color-text-body);
}

.news-content h1 {
  display: none;
}

.news-content h2 {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1rem;
  line-height: 1.4;
}

.news-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

.news-content p {
  margin-bottom: 1rem;
}

.news-content blockquote {
  border: none;
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg-subtle);
  padding: 0.75rem 1.25rem;
  margin: 1rem 0;
  font-style: normal;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  border-radius: 0 6px 6px 0;
  line-height: 1.6;
}

.news-content strong {
  font-weight: 700;
  color: var(--color-text-primary);
}

hr,
.news-content hr {
  height: 1px;
  background: linear-gradient(to right, transparent 0%, var(--color-border) 20%, var(--color-border) 80%, transparent 100%);
  border: none;
  margin: 2.5rem 0;
}

.news-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.news-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.news-content li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.news-content li a {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: var(--color-bg-muted);
  transition: background-color 0.15s ease, background-size 0.25s ease;
}

.news-content li a:hover {
  background: var(--color-bg-subtle);
}

.news-content a {
  color: var(--color-accent);
  text-decoration: none;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.25s ease;
}

.news-content a:hover {
  background-size: 100% 1px;
}

.news-content em {
  font-style: normal;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.news-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.88rem;
}

.news-nav a {
  color: var(--color-accent);
  text-decoration: none;
  max-width: 48%;
  line-height: 1.5;
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.news-nav a:hover {
  color: var(--color-text-primary);
}

.nav-prev::before {
  content: "\2190\00a0";
}

.nav-next::after {
  content: "\00a0\2192";
}

.nav-next {
  margin-left: auto;
  text-align: right;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.88rem;
}

.pagination a {
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pagination a:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-accent);
}

.pagination .pagination-current {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.15s ease;
}

.back-to-home:hover {
  color: var(--color-accent);
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .site-header {
    margin-bottom: 1.5rem;
    padding: 1.25rem 0;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .news-list-item {
    padding: 1rem;
  }

  .news-list-link {
    font-size: 1rem;
  }

  .news-list-headlines li {
    font-size: 0.8rem;
  }

  .news-content {
    font-size: 1rem;
    line-height: 1.9;
  }

  .news-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .news-nav a {
    max-width: 100%;
  }

  .nav-next {
    margin-left: 0;
    text-align: left;
  }

  .pagination {
    gap: 0.75rem;
  }
}
