@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg-color: #ffffff;
  --surface-color: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e2e8f0;
  --success-color: #059669;
  --error-color: #dc2626;
  --warning-color: #d97706;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all; /* 한글 단어 단위 줄바꿈 적용 */
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  padding-left: 12px;
  border-left: 4px solid var(--accent-color);
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: #1e293b;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

p {
  margin-bottom: 1.5rem;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

th, td {
  padding: 14px 16px;
  text-align: left;
}

th {
  background-color: var(--surface-color);
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

td {
  border-bottom: 1px solid var(--border-color);
}

tr:nth-child(even) td {
  background-color: var(--surface-color);
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.reading-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Redesign Default Markdown Code Blocks & Blockquotes (Fixing Black Terminal Boxes 100%) */
blockquote {
  background-color: #eff6ff !important;
  border-left: 5px solid #2563eb !important;
  border-radius: 8px !important;
  padding: 18px 22px !important;
  margin: 24px 0 !important;
  color: #1e3a8a !important;
  font-family: var(--font-family) !important;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.06) !important;
}

blockquote p {
  margin-bottom: 0.5rem !important;
  color: #1e3a8a !important;
}

blockquote strong {
  color: #1d4ed8 !important;
  background-color: #dbeafe !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

pre, code {
  font-family: var(--font-family) !important;
}

pre {
  background-color: #f8fafc !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #3b82f6 !important;
  border-radius: 8px !important;
  padding: 18px 22px !important;
  margin: 24px 0 !important;
  white-space: pre-wrap !important;
  word-break: break-all !important;
  font-size: 0.96rem !important;
  line-height: 1.7 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
}

code {
  background-color: #f1f5f9;
  color: #0f172a;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

pre code {
  background-color: transparent !important;
  padding: 0 !important;
  color: inherit !important;
}
