/* 데일리푸드파이터 (DailyFoodFighter) 초경량 고속 반응형 스타일 */
:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.brand {
  display: flex;
  flex-direction: column;
}

.site-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.site-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  gap: 16px;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s;
}

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

/* Main */
.site-main {
  padding-top: 36px;
  padding-bottom: 60px;
  min-height: calc(100vh - 250px);
}

/* Home Intro */
.home-intro {
  margin-bottom: 32px;
  text-align: center;
  padding: 16px 0;
}

.home-intro h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.home-intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Article */
.post-article {
  background: var(--bg-card);
  padding: 44px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.post-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.post-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.35;
  color: #111827;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

/* Post Content & Typography */
.post-content h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  color: #111827;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.post-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: #111827;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 26px 0 12px;
  color: #1f2937;
  line-height: 1.45;
}

.post-content p {
  margin-bottom: 20px;
  font-size: 1.02rem;
  line-height: 1.85;
  letter-spacing: -0.01em;
}

.post-content strong {
  font-weight: 700;
  color: #111827;
}

.post-content ul, .post-content ol {
  margin: 16px 0 22px 20px;
  padding-left: 4px;
}

.post-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* Tables - Responsive Horizontal Scroll */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.92rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  display: block;
  -webkit-overflow-scrolling: touch;
}

.post-content th, .post-content td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.post-content tr:nth-child(even) td {
  background: #f8fafc;
}

/* Post List & Cards */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-card {
  background: var(--bg-card);
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: block;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #111827;
  letter-spacing: -0.02em;
}

.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 36px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-disclaimer {
  max-width: 640px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-top: 4px;
  word-break: keep-all;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #34d399;
    --primary-dark: #10b981;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --bg-main: #0b0f19;
    --bg-card: #131b2e;
    --border: #243048;
  }

  body {
    background-color: var(--bg-main);
    color: var(--text-main);
  }

  .site-header, .site-footer, .post-article, .post-card {
    background-color: var(--bg-card);
    border-color: var(--border);
  }

  .site-logo {
    color: var(--primary);
  }

  .home-intro h1, .post-title, .post-card-title,
  .post-content h1, .post-content h2, .post-content strong {
    color: #f8fafc;
  }

  .post-content h3 {
    color: #e2e8f0;
  }

  .site-nav a {
    color: #cbd5e1;
  }

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

  .post-content th {
    background: #1c273e;
    color: #f8fafc;
    border-color: var(--border);
  }

  .post-content td {
    background: var(--bg-card);
    color: #cbd5e1;
    border-color: var(--border);
  }

  .post-content tr:nth-child(even) td {
    background: #0f172a;
  }

  .post-content table {
    background: var(--bg-card);
    border-color: var(--border);
  }

  .footer-disclaimer {
    color: #64748b;
  }
}

/* Mobile Media Query (max-width: 640px) */
@media (max-width: 640px) {
  .wrapper {
    padding: 0 16px;
  }

  .site-main {
    padding-top: 18px;
    padding-bottom: 36px;
  }

  .header-inner {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-logo {
    font-size: 1.2rem;
  }

  .site-tagline {
    font-size: 0.72rem;
  }

  /* Horizontal Scrolling Category Nav Pills */
  .site-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    width: 100%;
    padding: 4px 0 6px;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex-shrink: 0;
    padding: 6px 13px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .home-intro {
    margin-bottom: 20px;
    padding: 10px 0;
  }

  .home-intro h1 {
    font-size: 1.45rem;
    line-height: 1.35;
  }

  .home-intro p {
    font-size: 0.92rem;
  }

  .post-article {
    padding: 22px 16px;
    border-radius: 8px;
  }

  .post-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .post-title {
    font-size: 1.38rem;
    line-height: 1.4;
  }

  .post-content h1 {
    font-size: 1.35rem;
    margin: 28px 0 14px;
  }

  .post-content h2 {
    font-size: 1.18rem;
    margin: 26px 0 12px;
    padding-bottom: 6px;
  }

  .post-content h3 {
    font-size: 1.05rem;
    margin: 20px 0 10px;
  }

  .post-content p {
    font-size: 0.98rem;
    line-height: 1.8;
    margin-bottom: 16px;
  }

  .post-content ul, .post-content ol {
    margin: 12px 0 18px 16px;
  }

  .post-content li {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .post-content table {
    font-size: 0.82rem;
    margin: 18px 0;
  }

  .post-content th, .post-content td {
    padding: 9px 11px;
  }

  .post-card {
    padding: 18px 16px;
    border-radius: 8px;
  }

  .post-card-title {
    font-size: 1.12rem;
    line-height: 1.45;
  }

  .post-card-excerpt {
    font-size: 0.86rem;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
