/* The Seoulist — Common Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: #fafafa;
  color: #1A2B4C;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body[data-lang="kr"] { font-family: 'Inter', 'Noto Sans KR', sans-serif; }

a { color: inherit; text-decoration: none; }
a:hover { color: #FF6B6B; }

/* Header */
header {
  background: white;
  border-bottom: 1px solid #eee;
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.95);
}
header .header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  header { padding: 14px 20px; }
  header .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  header .logo { font-size: 1.4em; }
  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 4px;
  }
  nav a { padding: 6px 10px; font-size: 0.88em; }
  /* Force lang toggle onto its own row regardless of menu width (EN vs KR) */
  nav .lang-toggle-wrap {
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: center;
    margin-top: 6px;
    order: 1;
  }
  nav a { order: 0; }
}

/* Desktop: wrapper is invisible — lang-toggle behaves like a normal nav child */
@media (min-width: 769px) {
  .lang-toggle-wrap { display: contents; }
}
header .logo {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.6em;
  letter-spacing: -0.01em;
}
header .logo .the { color: #1A2B4C; font-weight: 400; font-size: 0.7em; vertical-align: middle; margin-right: 5px; opacity: 0.85; }
header .logo .name { color: #FF6B6B; }
nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
nav a {
  padding: 8px 14px;
  font-size: 0.9em;
  font-weight: 500;
  color: #555;
  border-radius: 100px;
  transition: all 0.2s;
}
nav a:hover, nav a.active { background: #f4f4f4; color: #1A2B4C; }

/* Language toggle */
.lang-toggle {
  display: flex;
  gap: 4px;
  background: #f4f4f4;
  padding: 3px;
  border-radius: 100px;
  font-size: 0.8em;
  font-weight: 600;
}
.lang-toggle button {
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 100px;
  cursor: pointer;
  color: #999;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}
.lang-toggle button.active { background: #1A2B4C; color: white; }

/* Main container */
main { flex: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 60px 24px; }
.container.narrow { max-width: 760px; }

/* Hero */
.hero { text-align: center; margin-bottom: 70px; padding: 30px 0; }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2em, 5vw, 3em);
  margin-bottom: 16px;
  color: #1A2B4C;
}
.hero h1 .accent { color: #FF6B6B; }
.hero p {
  color: #666;
  max-width: 580px;
  margin: 0 auto;
  font-size: 1.1em;
}
body[data-lang="kr"] .hero h1 { font-family: 'Noto Sans KR', sans-serif; font-style: normal; font-weight: 700; }

/* Section title */
.section-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 2em;
  margin-bottom: 12px;
  color: #1A2B4C;
}
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-subtitle {
  color: #888;
  margin-bottom: 30px;
}
.see-all { color: #FF6B6B; font-weight: 600; font-size: 0.9em; }
.see-all:hover { text-decoration: underline; }
body[data-lang="kr"] .section-title { font-family: 'Noto Sans KR', sans-serif; font-style: normal; font-weight: 700; }

/* Article cards */
.posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 70px;
}
@media (min-width: 700px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .posts.three-col { grid-template-columns: 1fr 1fr 1fr; } }

.post-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.post-card .post-cover {
  height: 180px;
  background: linear-gradient(135deg, #FF6B6B 0%, #FFB8B8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  color: white;
}
.post-card.heads .post-cover {
  background: linear-gradient(135deg, #1A2B4C 0%, #4a5e8c 100%);
}
.post-card .post-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-card .post-cat {
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 10px;
  color: #FF6B6B;
}
.post-card.heads .post-cat { color: #1A2B4C; }
.post-card h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3em;
  margin-bottom: 10px;
  color: #1A2B4C;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
body[data-lang="kr"] .post-card h3 { font-family: 'Noto Sans KR', sans-serif; font-weight: 700; }
.post-card .excerpt { color: #4a5568; font-size: 0.92em; line-height: 1.65; flex: 1; }
.post-card .post-meta { margin-top: 16px; color: #999; font-size: 0.82em; }

/* Categories preview (home) */
.cat-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 70px;
}
@media (min-width: 700px) { .cat-preview { grid-template-columns: 1fr 1fr; } }
.cat-card {
  background: white;
  padding: 36px 32px;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  border-top: 4px solid;
  transition: all 0.25s;
  display: block;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.08); color: inherit; }
.cat-card.bright { border-top-color: #FF6B6B; }
.cat-card.heads { border-top-color: #1A2B4C; }
.cat-card .icon { font-size: 1.8em; margin-bottom: 12px; }
.cat-card h3 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #1A2B4C;
}
body[data-lang="kr"] .cat-card h3 { font-family: 'Noto Sans KR', sans-serif; font-style: normal; font-weight: 700; }
.cat-card p { color: #4a5568; font-size: 0.95em; line-height: 1.65; }

/* Article body */
article { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,0.05); }
article .cover {
  height: 260px;
  background: linear-gradient(135deg, #FF6B6B 0%, #FFB8B8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5em;
  color: white;
}
article.heads .cover { background: linear-gradient(135deg, #1A2B4C 0%, #4a5e8c 100%); }
article .body-pad { padding: 50px 40px; }
@media (max-width: 600px) { article .body-pad { padding: 32px 24px; } }
article .cat-tag {
  display: inline-block;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 18px;
  color: #FF6B6B;
}
article.heads .cat-tag { color: #1A2B4C; }
article h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.8em, 4vw, 2.6em);
  line-height: 1.25;
  margin-bottom: 20px;
  color: #1A2B4C;
  letter-spacing: -0.01em;
}
body[data-lang="kr"] article h1 { font-family: 'Noto Sans KR', sans-serif; font-weight: 700; }
article .meta {
  color: #888;
  font-size: 0.88em;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}
article .meta a { color: #FF6B6B; font-weight: 500; }
article .meta a:hover { text-decoration: underline; }

article .content { color: #2d3748; font-size: 1.05em; line-height: 1.85; }
article .content p { margin-bottom: 26px; }
article .content h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5em;
  margin: 56px 0 20px;
  color: #1A2B4C;
  letter-spacing: -0.005em;
}
body[data-lang="kr"] article .content h2 { font-family: 'Noto Sans KR', sans-serif; font-weight: 700; }
article .content ul { margin: 0 0 28px 22px; }
article .content li { margin-bottom: 14px; line-height: 1.75; }
article .content blockquote {
  border-left: 4px solid #FF6B6B;
  padding: 8px 24px;
  margin: 24px 0;
  background: #fff5f5;
  font-style: italic;
  color: #4a5568;
  border-radius: 0 8px 8px 0;
}
article.heads .content blockquote { border-left-color: #1A2B4C; background: #f5f7fb; }

article .source-box {
  margin-top: 40px;
  padding: 20px 24px;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 0.9em;
  color: #555;
}
article .source-box strong { color: #1A2B4C; display: block; margin-bottom: 10px; font-size: 1.05em; }
article .source-box a { color: #FF6B6B; word-break: break-word; }
article .source-box a:hover { text-decoration: underline; }
article .source-box ul { margin: 0; padding-left: 20px; }
article .source-box li { margin-bottom: 6px; line-height: 1.55; }
article .source-box .src-note { color: #888; }

article .back-row {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #eee;
  text-align: center;
}
article .back-row a {
  color: #FF6B6B;
  font-weight: 600;
  font-size: 0.92em;
}
article .back-row a:hover { text-decoration: underline; }

/* Footer */
footer {
  text-align: center;
  padding: 40px 24px;
  color: #888;
  font-size: 0.85em;
  border-top: 1px solid #eee;
  background: white;
}
footer a { color: #FF6B6B; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .copyright { margin-top: 8px; opacity: 0.7; }

/* lang display: spans stay inline; block elements (h1/h2/p/li) keep their default block flow */
span[data-en], span[data-kr] { display: inline; }
body[data-lang="en"] [data-kr] { display: none !important; }
body[data-lang="kr"] [data-en] { display: none !important; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.empty-state .icon { font-size: 2.5em; margin-bottom: 12px; opacity: 0.6; }
