@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500;700&family=Inter:wght@400;600;700;800&family=Outfit:wght@400;600;800&family=Noto+Sans+KR:wght@400;700;900&display=swap');

:root {
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.08);
  
  /* HSL tailwind colors */
  --blue: #2563eb;
  --blue-lt: #eff6ff;
  --blue-bd: #93c5fd;

  --green: #16a34a;
  --grn-lt: #f0fdf4;
  --grn-bd: #86efac;

  --rose: #e11d48;
  --rose-lt: #fff1f2;
  --rose-bd: #fca5a5;

  --purple: #7c3aed;
  --pur-lt: #f5f3ff;
  --pur-bd: #ddd6fe;

  --orange: #ea580c;
  --ora-lt: #fff7ed;
  --ora-bd: #fed7aa;

  --teal: #0d9488;
  --teal-lt: #f0fdfa;
  --teal-bd: #99f6e4;

  --muted: #475569;
  --dim: #64748b;
  
  /* Legacy Color mappings compatibility */
  --blu-lt: #eff6ff;
  --blu-bd: #93c5fd;
  --ora-lt: #fff7ed;
  --ora-bd: #fed7aa;
  --tel-lt: #f0fdfa;
  --tel-bd: #99f6e4;
  --ros-lt: #fff1f2;
  --ros-bd: #fca5a5;
}

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

body {
  background-color: #f1f5f9;
  color: var(--text);
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  line-height: 1.6;
  padding: 2rem 1rem;
}

.post-body {
  max-width: 860px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

/* Header Area */
.header {
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1.5rem;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.header p {
  font-size: 15px;
  color: var(--dim);
  margin-bottom: 0;
}

/* Concept Grid Layout */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 2.5rem;
}

.concept-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.concept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}

.concept-card h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.concept-card p {
  font-size: 13px;
  margin-bottom: 0;
  line-height: 1.65;
}

/* Card Component */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 10px;
}

/* Horizontal List Cards */
.metrics-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.metric-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  gap: 20px;
  text-align: left;
}

.ml-info {
  width: 240px;
  flex-shrink: 0;
  text-align: left;
}

.ml-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}

.ml-eng {
  font-family: 'DM+Mono', 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--dim);
  display: block;
  margin-top: 2px;
  font-weight: 500;
}

.ml-desc {
  flex-grow: 1;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  text-align: left;
}

@media (max-width: 768px) {
  .metric-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ml-info { width: 100%; }
}

/* Separator & Summary box */
.sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2.5rem 0;
}

.sep span {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sep::before, .sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.summary-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

.summary-box p {
  margin-bottom: 0;
}

.summary-box b {
  color: var(--text);
}

/* Styled Table */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 13.5px;
  text-align: left;
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.styled-table th {
  background-color: var(--bg);
  color: var(--text);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
}

.styled-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background-color: var(--card-bg);
  color: var(--muted);
}

.styled-table tr:last-of-type td {
  border-bottom: none;
}

/* 은서파 블로그 시그니처 타이틀 스타일 */
.post-body h3 {
  border-left: 6px solid var(--purple) !important;
  padding-left: 14px !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1.25rem !important;
  line-height: 1.4 !important;
}

.post-body h4 {
  border-left: 10px solid var(--rose-lt) !important;
  color: #953b34 !important;
  padding-left: 12px !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  line-height: 1.4 !important;
}

.post-body .highlight {
  background-color: #fef08a;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
}

/* 인용구 스타일 */
.styled-blockquote {
  border-left: 4px solid var(--rose) !important;
  background-color: var(--rose-lt) !important;
  color: #9f1239 !important;
  padding: 1.25rem !important;
  border-radius: 0 12px 12px 0 !important;
  margin: 1.5rem 0 !important;
}
.styled-blockquote strong {
  color: #9f1239 !important;
}

/* 코드 블록 스타일 */
.code-block-header {
  background: #1e1b4b;
  color: #a5b4fc;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.code-block {
  background: #0f172a;
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: 0 0 8px 8px;
  font-family: 'Fira Code', 'Courier New', 'DM Mono', monospace;
  font-size: 0.9rem;
  overflow: auto !important;
  margin-bottom: 2rem;
  border: 1px solid #1e293b;
  white-space: pre-wrap;
  word-break: break-all;
  text-align: left;
}
.code-comment {
  color: #64748b;
  font-style: italic;
}
.code-keyword {
  color: #f472b6;
}
.code-function {
  color: #38bdf8;
}
.code-arg {
  color: #fb923c;
}

/* SVG 다이어그램 컨테이너 */
.svg-container {
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}
.svg-container svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
}
.svg-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
