:root {
  --main-color: #2563eb;
  --main-dark: #1d4ed8;
  --accent-color: #0f766e;
  --warning-color: #b45309;
  --text-color: #111827;
  --sub-text-color: #5f6b7a;
  --background-color: #f7f9fc;
  --card-color: #ffffff;
  --border-color: #e5eaf1;
  --soft-blue: #eff6ff;
  --soft-green: #ecfdf5;
  --soft-amber: #fffbeb;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--text-color);
  background: var(--background-color);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

pre {
  margin: 0;
  overflow-x: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -44px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--text-color);
  color: #ffffff;
}

.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(229, 234, 241, 0.9);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-flex;
  min-width: 38px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--main-color);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: var(--radius);
  color: #344054;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--soft-blue);
  color: var(--main-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text-color);
  border-radius: 999px;
}

.hero-section {
  padding: 74px 0 44px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--main-dark);
  font-weight: 800;
  font-size: 0.9rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.28;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.25rem, 5vw, 4.3rem);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

h3 {
  font-size: 1.08rem;
}

.hero-text {
  max-width: 650px;
  margin: 22px 0 0;
  color: #344054;
  font-size: 1.13rem;
}

.hero-text.sub {
  margin-top: 10px;
  color: var(--sub-text-color);
}

.hero-actions,
.form-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-stats span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 800;
}

.button,
button.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--main-color);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.button.primary:hover {
  background: var(--main-dark);
}

.button.secondary {
  background: #ffffff;
  color: #1f2937;
  border-color: var(--border-color);
}

.button.secondary:hover {
  border-color: #bfdbfe;
  color: var(--main-dark);
}

.button.success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.button.success:hover {
  background: #bbf7d0;
  border-color: #4ade80;
}

.button.danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.button.danger:hover {
  background: #fecaca;
  border-color: #f87171;
}

.button.ghost {
  color: var(--main-dark);
  background: var(--soft-blue);
}

.hero-preview,
.panel,
.study-card,
.article-card,
.category-card,
.quiz-box,
.policy-box,
.toc-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--card-color);
  box-shadow: var(--shadow);
}

.hero-preview {
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background: #fbfdff;
}

.preview-toolbar span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #d1d5db;
}

.preview-toolbar span:first-child {
  background: #f87171;
}

.preview-toolbar span:nth-child(2) {
  background: #fbbf24;
}

.preview-toolbar span:nth-child(3) {
  background: #34d399;
}

.preview-content {
  padding: 24px;
}

.preview-content h2 {
  font-size: 1.25rem;
}

.preview-label {
  margin: 0 0 8px;
  color: var(--accent-color);
  font-size: 0.88rem;
  font-weight: 800;
}

.preview-content pre,
.concept-block pre,
.answer-block pre {
  margin: 18px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: #0f172a;
  color: #e5edf8;
}

.preview-content p {
  margin: 0;
  color: var(--sub-text-color);
}

.preview-link,
.text-link,
.study-card a,
.article-card a {
  color: var(--main-dark);
  font-weight: 800;
}

.preview-link {
  display: inline-flex;
  margin-top: 18px;
}

.section {
  padding: 70px 0;
}

.section.muted {
  background: #ffffff;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--sub-text-color);
}

.section-heading.inline {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.study-card,
.article-card,
.category-card {
  padding: 20px;
}

.study-card,
.article-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  gap: 12px;
}

.study-card p,
.article-card p,
.category-card p {
  margin: 0;
  color: var(--sub-text-color);
}

.card-meta {
  margin-top: auto;
  color: #667085;
  font-size: 0.9rem;
}

.chip {
  align-self: flex-start;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.chip.sql {
  color: var(--main-dark);
  background: var(--soft-blue);
}

.chip.db {
  color: #047857;
  background: var(--soft-green);
}

.chip.cs {
  color: var(--warning-color);
  background: var(--soft-amber);
}

.chip.git {
  color: #7c2d12;
  background: #fff7ed;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  min-height: 210px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
}

.category-icon {
  display: inline-flex;
  min-width: 54px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: #eef4ff;
  color: var(--main-dark);
  font-weight: 900;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.learning-path {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 34px;
}

.learning-path .button {
  justify-self: start;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
}

.steps span {
  color: var(--sub-text-color);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 38px;
}

.body-copy p {
  margin: 0 0 14px;
  color: #344054;
}

.site-footer {
  padding: 44px 0 22px;
  border-top: 1px solid var(--border-color);
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
}

.footer-brand {
  color: #ffffff;
}

.footer-grid p {
  max-width: 520px;
  margin: 16px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 14px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 28px;
  color: #9ca3af;
  font-size: 0.9rem;
}

.page-hero {
  padding: 58px 0 34px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.page-hero .container {
  display: grid;
  gap: 14px;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--sub-text-color);
  font-size: 1.06rem;
}

.content-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.toc-box {
  position: sticky;
  top: 88px;
  padding: 18px;
  box-shadow: none;
}

.toc-box strong {
  display: block;
  margin-bottom: 12px;
}

.toc-box a {
  display: block;
  padding: 8px 0;
  color: var(--sub-text-color);
  font-weight: 700;
}

.toc-box a:hover {
  color: var(--main-dark);
}

.concept-stack {
  display: grid;
  gap: 18px;
}

.concept-block,
.policy-box,
.panel {
  padding: 24px;
}

.concept-block h2,
.policy-box h2,
.panel h2,
.article-card h2 {
  font-size: 1.45rem;
}

.concept-block {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
}

.concept-block p,
.concept-block li,
.policy-box p,
.policy-box li,
.panel p {
  color: #344054;
}

.concept-block h2 {
  margin-bottom: 12px;
}

.concept-block h3 {
  margin-top: 22px;
  margin-bottom: 8px;
}

.concept-block ul,
.policy-box ul {
  padding-left: 20px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: var(--soft-blue);
  color: var(--main-dark);
}

.note-box {
  margin: 18px 0;
  padding: 16px;
  border-left: 4px solid var(--main-color);
  border-radius: var(--radius);
  background: var(--soft-blue);
  color: #1e3a8a;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.quiz-box {
  padding: 24px;
}

.quiz-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.quiz-question {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.quiz-prompt {
  color: #344054;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.answer-block {
  display: none;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.answer-block.open {
  display: block;
}

.answer-block strong {
  color: var(--main-dark);
}

.answer-block p {
  white-space: pre-line;
}

.answer-sql {
  display: grid;
  gap: 10px;
}

.question-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.filters-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text-color);
  background: #ffffff;
  font: inherit;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.mini-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-list button,
.mini-list a {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
  color: #344054;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mini-list button:hover,
.mini-list a:hover {
  border-color: #bfdbfe;
  color: var(--main-dark);
}

.empty-state {
  padding: 28px;
  border: 1px dashed #bfdbfe;
  border-radius: var(--radius);
  background: var(--soft-blue);
  color: #1e3a8a;
}

.erd-box {
  display: grid;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #fbfdff;
}

.erd-box p {
  margin: 6px 0 0;
  color: var(--sub-text-color);
}

.erd-intro {
  display: grid;
  gap: 12px;
}

.erd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erd-legend-item {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.erd-legend-item.pk {
  color: var(--main-dark);
  background: var(--soft-blue);
}

.erd-legend-item.fk {
  color: #0f766e;
  background: var(--soft-green);
}

.erd-legend-item.col {
  color: #475569;
  background: #e2e8f0;
}

.erd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.erd-table {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.erd-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-bottom: 1px solid #dbe7f6;
}

.erd-table-head strong {
  color: var(--main-dark);
  font-size: 0.95rem;
}

.erd-table-head span {
  color: var(--sub-text-color);
  font-size: 0.8rem;
  font-weight: 800;
}

.erd-table ul,
.erd-relations {
  margin: 0;
  padding: 0;
  list-style: none;
}

.erd-table li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid var(--border-color);
  color: #344054;
  font-size: 0.9rem;
}

.erd-table li.key {
  background: #f0f9ff;
}

.erd-table li.fk {
  background: #f0fdfa;
}

.erd-table li.col {
  background: #ffffff;
}

.erd-column-name {
  font-weight: 800;
}

.erd-column-tag {
  min-width: 34px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  color: #475569;
  background: #e2e8f0;
}

.erd-table li.key .erd-column-tag {
  color: var(--main-dark);
  background: #dbeafe;
}

.erd-table li.fk .erd-column-tag {
  color: #0f766e;
  background: #ccfbf1;
}

.erd-relations {
  display: grid;
  gap: 8px;
}

.erd-relations li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ecfdf5 0%, #f8fffc 100%);
  color: #065f46;
  font-size: 0.9rem;
  font-weight: 800;
}

.erd-relations li span:nth-child(2) {
  padding: 4px 10px;
  border-radius: 999px;
  background: #d1fae5;
  text-align: center;
}

.erd-note {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--soft-blue);
}

.progress-bar {
  height: 10px;
  margin: 14px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf1;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--main-color);
  transition: width 0.2s ease;
}

.panel-divider {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.problem-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.problem-list-item {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text-color);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.problem-list-item:hover {
  border-color: #bfdbfe;
}

.problem-list-item strong {
  line-height: 1.35;
}

.problem-list-item span:not(.chip) {
  color: var(--sub-text-color);
  font-size: 0.9rem;
}

.problem-list-item .status-solved,
.problem-list-item .status-review,
.problem-list-item .status-unsolved {
  justify-self: start;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.chip.status-solved,
.problem-list-item .status-solved {
  color: #166534;
  background: #dcfce7;
}

.chip.status-review,
.problem-list-item .status-review {
  color: #991b1b;
  background: #fee2e2;
}

.chip.status-unsolved,
.problem-list-item .status-unsolved {
  color: #475569;
  background: #e2e8f0;
}

.article-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
}

.report-form {
  display: grid;
  gap: 16px;
}

.report-preview {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #f8fafc;
  color: #344054;
  font-size: 0.9rem;
}

.form-status {
  margin: 0;
  color: var(--warning-color);
  font-weight: 800;
}

@media (max-width: 1080px) {
  .card-grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 14px;
    right: 14px;
    display: none;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: grid;
  }

  .nav-links a {
    width: 100%;
  }

  .hero-section {
    padding-top: 48px;
  }

  .hero-grid,
  .learning-path,
  .split-section,
  .content-layout,
  .quiz-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    order: -1;
  }

  .section {
    padding: 52px 0;
  }

  .section-heading.inline {
    align-items: start;
    flex-direction: column;
  }

  .toc-box {
    position: static;
  }

  .card-grid,
  .card-grid.five,
  .article-list,
  .article-index {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .filters-grid,
  .erd-grid,
  .problem-list {
    grid-template-columns: 1fr;
  }

  .erd-relations li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.2rem;
  }

  .hero-actions,
  .form-actions,
  .button-row {
    display: grid;
  }

  .button,
  button.button {
    width: 100%;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .study-card,
  .article-card {
    min-height: auto;
  }

  .footer-links {
    display: grid;
  }
}
