/*
Theme Name: Hongsik Log V2
Theme URI: https://example.com/hongsik-log
Author: Hongsik
Description: A warm, lightweight revenue journey, curriculum and product portfolio theme for hongsik.blog.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: hongsik-log
*/

:root {
  --bg: #f4f9fc;
  --surface: #ffffff;
  --text: #132033;
  --muted: #5e7082;
  --quiet: #91a0ae;
  --line: #d9e7ef;
  --accent: #0c7cc3;
  --accent-2: #12b99f;
  --accent-ink: #061b2f;
  --accent-soft: #e8f8f4;
  --code-bg: #edf5f8;
  --rail: 248px;
  --content: 780px;
  --gap: 58px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f7fbfd 0%, var(--bg) 38%, #eef8f6 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.72;
  letter-spacing: 0;
  overflow-x: hidden;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 32%, transparent);
  text-underline-offset: 0.18em;
}

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

img {
  max-width: 100%;
  height: auto;
}

pre,
code,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--code-bg);
}

code {
  padding: 0.12em 0.28em;
  border-radius: 4px;
  background: var(--code-bg);
  font-size: 0.94em;
}

pre code {
  padding: 0;
  background: transparent;
}

blockquote {
  margin: 28px 0;
  padding: 0 0 0 18px;
  border-left: 3px solid color-mix(in srgb, var(--accent-2) 55%, var(--line));
  color: #3f5265;
}

.site-shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--content));
  gap: var(--gap);
  align-items: start;
  width: min(100%, calc(var(--rail) + var(--content) + var(--gap) + 48px));
  margin: 0 auto;
  padding: 28px 24px 44px;
}

.site-header {
  position: sticky;
  top: 24px;
  min-height: calc(100vh - 48px);
  padding: 28px 24px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(18, 185, 159, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(6, 27, 47, 0.9), rgba(7, 42, 67, 0.96)),
    linear-gradient(145deg, #061b2f 0%, #0b4f72 56%, #12b99f 124%);
  background-size: 28px 28px, 28px 28px, auto, auto;
  color: #f6fffb;
  box-shadow: 0 18px 42px rgba(6, 27, 47, 0.18);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(18, 185, 159, 0.24), transparent 36%),
    linear-gradient(0deg, rgba(12, 124, 195, 0.2), transparent 48%);
  opacity: 0.9;
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.profile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #f6fffb;
  text-align: center;
  text-decoration: none;
}

.profile-link:hover {
  color: #fff;
}

.profile-avatar {
  width: 108px;
  height: 108px;
  border: 4px solid rgba(216, 255, 247, 0.9);
  border-radius: 50%;
  background: var(--accent-ink);
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(4, 16, 30, 0.38);
}

.profile-name {
  display: block;
  font-size: 1.28rem;
  font-weight: 820;
  line-height: 1.15;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 10px;
  border: 1px solid rgba(18, 185, 159, 0.48);
  border-radius: 999px;
  background: rgba(18, 185, 159, 0.14);
  color: #dffcf5;
  font-size: 0.74rem;
  font-weight: 840;
  line-height: 1;
}

.site-title {
  margin: 6px 0 0;
  color: rgba(226, 246, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 760;
  text-align: center;
}

.site-description {
  margin: 12px 0 0;
  color: rgba(226, 246, 255, 0.8);
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: center;
}

.camp-quick-facts {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.camp-quick-facts span {
  display: block;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(213, 245, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(246, 255, 251, 0.88);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.35;
  text-align: center;
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
  font-size: 1rem;
  font-weight: 760;
}

.site-nav a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 38px;
  color: rgba(246, 255, 251, 0.9);
  text-decoration: none;
}

.site-nav a:hover {
  color: #fff;
}

.site-nav svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.rail-tags {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(226, 246, 255, 0.25);
}

.rail-tags .section-label {
  color: rgba(226, 246, 255, 0.64);
}

.rail-tags .tag-list {
  color: rgba(246, 255, 251, 0.84);
}

.rail-tags .tag-list .count {
  color: rgba(226, 246, 255, 0.5);
}

.rail-tags .tag-empty {
  color: rgba(226, 246, 255, 0.64);
}

main {
  min-width: 0;
  padding-top: 18px;
}

.layout {
  display: block;
}

.tag-panel {
  position: sticky;
  top: 28px;
}

.section-label {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.tag-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.35;
}

.tag-list a {
  text-decoration: none;
}

.tag-list .count {
  color: var(--quiet);
}

.tag-list li {
  max-width: 100%;
}

.tag-empty {
  margin: 0;
  color: var(--quiet);
  font-size: 0.91rem;
}

.content-area,
.single-article {
  min-width: 0;
  max-width: var(--content);
}

.archive-heading {
  margin: 0 0 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.archive-kicker {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 840;
  letter-spacing: 0.08em;
}

.archive-title {
  max-width: 700px;
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.38;
}

.archive-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.archive-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 80%, #fff);
  color: color-mix(in srgb, var(--accent-ink) 78%, var(--accent));
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-card {
  padding: 24px 0 28px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.post-card-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 780;
}

.post-card-title a {
  text-decoration: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 9px 0 15px;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-excerpt {
  margin: 0;
  color: #3f4f60;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.post-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #4b6174;
  font-size: 0.82rem;
  line-height: 1;
  text-decoration: none;
}

.post-tags a:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 78%, var(--accent-ink));
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  font-size: 0.94rem;
}

.pagination a,
.post-navigation a {
  color: var(--muted);
  text-decoration: none;
}

.pagination a:hover,
.post-navigation a:hover {
  color: var(--accent);
}

.single-header {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.single-title {
  margin: 0;
  font-size: 2.14rem;
  line-height: 1.22;
  font-weight: 800;
}

.entry-content {
  font-size: 1.04rem;
}

.entry-content h2 {
  margin: 42px 0 14px;
  font-size: 1.42rem;
  line-height: 1.35;
}

.entry-content h3 {
  margin: 32px 0 12px;
  font-size: 1.18rem;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 20px;
}

.entry-content li + li {
  margin-top: 6px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.96rem;
}

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

.entry-content th {
  background: #edf7fb;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 28px;
  margin-top: 38px;
  border-top: 1px solid var(--line);
}

.post-navigation .next {
  text-align: right;
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.learning-map-page {
  min-width: 0;
  max-width: var(--content);
}

.map-intro {
  max-width: 680px;
  margin: 16px 0 0;
  color: #50677a;
  overflow-wrap: anywhere;
  word-break: normal;
}

.map-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, #e8f8f4);
  box-shadow: 0 16px 34px rgba(6, 27, 47, 0.08);
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.map-toolbar button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #42586a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
}

.map-toolbar button:hover,
.map-toolbar button.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.map-stage {
  position: relative;
  min-height: 420px;
  height: 580px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
  border-radius: 8px;
  background:
    linear-gradient(rgba(12, 124, 195, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 124, 195, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(232, 248, 244, 0.72), rgba(255, 255, 255, 0.94)),
    #fbfdff;
  background-size: 28px 28px, 28px 28px, auto, auto;
}

#learning-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#learning-map-canvas.is-clickable {
  cursor: pointer;
}

.map-hint {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(217, 231, 239, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #516779;
  font-size: 0.86rem;
  line-height: 1.35;
  pointer-events: none;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.87rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--quiet);
}

.map-legend i.root {
  width: 13px;
  height: 13px;
  background: var(--accent-ink);
}

.map-legend i.category {
  background: var(--accent);
}

.map-legend i.post {
  background: var(--accent-2);
}

.map-legend i.tag {
  background: #6e7f91;
}

.map-list {
  margin-top: 44px;
}

.archive-heading.compact {
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.category-index {
  display: grid;
  gap: 18px;
}

.category-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(6, 27, 47, 0.04);
}

.category-block h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.category-block h3 a {
  text-decoration: none;
}

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

.category-block li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.category-block li a {
  min-width: 0;
  color: #203346;
  font-weight: 720;
  line-height: 1.45;
  text-decoration: none;
}

.category-block li a:hover {
  color: var(--accent);
}

.category-block time {
  color: var(--quiet);
  font-size: 0.84rem;
  white-space: nowrap;
}

.learning-assistant-page {
  min-width: 0;
  max-width: var(--content);
}

.assistant-intro {
  max-width: 700px;
  margin: 16px 0 0;
  color: #50677a;
  overflow-wrap: anywhere;
  word-break: normal;
}

.assistant-workbench {
  margin-top: 30px;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.assistant-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(31, 37, 45, 0.07);
}

.assistant-panel-head {
  margin-bottom: 18px;
}

.assistant-panel-head h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.assistant-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.assistant-field span {
  color: #3d444b;
  font-size: 0.9rem;
  font-weight: 760;
}

.assistant-field input,
.assistant-field select,
.assistant-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}

.assistant-field input,
.assistant-field select {
  min-height: 42px;
  padding: 8px 10px;
}

.assistant-field textarea {
  min-height: 104px;
  padding: 10px;
  line-height: 1.6;
  resize: vertical;
}

.assistant-field input:focus,
.assistant-field select:focus,
.assistant-field textarea:focus,
.assistant-output textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  outline: 3px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.assistant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr);
  gap: 12px;
}

.assistant-actions,
.assistant-output-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.assistant-actions {
  justify-content: flex-start;
  margin-top: 8px;
}

.assistant-primary,
.assistant-quiet,
.assistant-output-head button,
.assistant-output-tabs button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
}

.assistant-primary {
  border-color: color-mix(in srgb, var(--accent) 64%, #1d4f7a);
  background: var(--accent);
  color: #fff;
}

.assistant-quiet,
.assistant-output-head button,
.assistant-output-tabs button {
  background: #ffffff;
  color: #42586a;
}

.assistant-primary:hover,
.assistant-quiet:hover,
.assistant-output-head button:hover,
.assistant-output-tabs button:hover,
.assistant-output-tabs button.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.assistant-save-state {
  margin: 12px 0 0;
  color: var(--quiet);
  font-size: 0.84rem;
}

.assistant-output-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.assistant-output {
  display: none;
}

.assistant-output.is-active {
  display: block;
}

.assistant-output-head {
  margin-bottom: 10px;
}

.assistant-output-head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.assistant-output textarea {
  width: 100%;
  min-height: 430px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfd;
  color: #203346;
  font: 0.9rem/1.62 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  resize: vertical;
}

.assistant-tag-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.assistant-tag-box span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 780;
}

.assistant-plan-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.assistant-plan-box th,
.assistant-plan-box td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.assistant-plan-box th {
  width: 118px;
  background: #edf7fb;
  color: #2a4155;
}

.assistant-checklist {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 21px;
  color: #42586a;
  font-size: 0.94rem;
}

.site-footer {
  grid-column: 2;
  max-width: var(--content);
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.86rem;
}

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

@media (max-width: 960px) {
  body {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .site-shell {
    display: block;
    width: 100%;
    padding: 0 16px 42px;
  }

  .site-header {
    position: relative;
    top: auto;
    min-height: 0;
    padding: 30px 20px 24px;
    margin: 0 -16px 32px;
    border-width: 0 0 1px;
    border-radius: 0 0 8px 8px;
  }

  .profile-avatar {
    width: 104px;
    height: 104px;
  }

  .site-description {
    max-width: 310px;
    margin-right: auto;
    margin-left: auto;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
  }

  .site-nav a {
    min-height: 40px;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 10px;
  }

  .rail-tags {
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
  }

  .rail-tags .tag-list {
    flex-flow: row wrap;
  }

  main {
    padding-top: 0;
  }

  .layout {
    display: block;
  }

  .tag-panel {
    position: static;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
  }

  .tag-list li {
    white-space: normal;
  }

  .single-title {
    font-size: 1.74rem;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .post-card-title {
    font-size: 1.18rem;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .archive-title,
  .post-excerpt {
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .archive-title {
    font-size: 1.24rem;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-navigation .next {
    text-align: left;
  }

  .map-panel {
    padding: 14px;
  }

  .map-stage {
    height: 440px;
    min-height: 360px;
  }

  .map-toolbar button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .map-hint {
    left: 10px;
    right: 10px;
    bottom: 10px;
    font-size: 0.8rem;
  }

  .category-block {
    padding: 17px 16px;
  }

  .category-block li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .category-block time {
    white-space: normal;
  }

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

  .assistant-panel {
    padding: 16px;
  }

  .assistant-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .assistant-actions,
  .assistant-output-head {
    align-items: stretch;
  }

  .assistant-primary,
  .assistant-quiet,
  .assistant-output-head button {
    flex: 1 1 auto;
  }

  .assistant-output textarea {
    min-height: 360px;
    font-size: 0.84rem;
  }

  .assistant-plan-box {
    overflow-x: auto;
  }
}
