/* ============================================================
   CSS VARIABLES & RESET
   ============================================================ */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --sidebar-bg: #f8fafc;
  --topbar-h: 56px;
  --sidebar-w: 220px;
  --font-serif: "Noto Serif KR", Georgia, serif;
  --font-sans: "Noto Sans KR", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius: 6px;
}

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

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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
ul {
  list-style: none;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-sm);
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.2s;
}
.logo:hover {
  color: var(--accent);
}
.logo-dot {
  color: var(--accent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* SEARCH */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap input {
  width: 220px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 0 36px 0 14px;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition:
    border-color 0.2s,
    width 0.3s;
}
.search-wrap input:focus {
  border-color: var(--accent);
  width: 280px;
}
.search-btn {
  position: absolute;
  right: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.search-btn:hover {
  color: var(--accent);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}
.search-results.open {
  display: block;
}
.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: var(--accent-light);
}
.sr-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.sr-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - var(--topbar-h));
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 28px 0 40px;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 20px;
  margin-bottom: 10px;
}

/* CATEGORY NAV */
.category-nav {
  margin-bottom: 28px;
}

.cat-group {
  margin-bottom: 2px;
}

/* Intro 링크 */
.cat-intro {
  margin-bottom: 8px;
}
.cat-intro-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: background 0.15s;
  border-left: 2px solid transparent;
}
.cat-intro-link:hover {
  background: var(--accent-light);
  border-left-color: var(--accent);
}

.cat-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.cat-toggle:hover {
  color: var(--accent);
}
.cat-toggle-link {
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.chevron {
  transition: transform 0.22s;
  flex-shrink: 0;
}
.cat-toggle.collapsed .chevron {
  transform: rotate(-90deg);
}

.cat-list {
  overflow: hidden;
  max-height: 400px;
  transition: max-height 0.25s ease;
}
.cat-list.closed {
  max-height: 0;
}

.cat-list li a {
  display: block;
  padding: 5px 20px 5px 36px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition:
    color 0.15s,
    background 0.15s;
  border-left: 2px solid transparent;
}
.cat-list li a:hover,
.cat-list li a.active {
  color: var(--accent);
  background: var(--accent-light);
  border-left-color: var(--accent);
}

.cat-all {
  display: block;
  margin: 10px 20px 0;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
  transition:
    background 0.15s,
    color 0.15s;
}
.cat-all:hover {
  background: var(--accent);
  color: #fff;
}

/* HASHTAGS */
.hashtag-section {
  padding: 0 16px;
}
.hashtag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.hashtag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  border-radius: 12px;
  background: var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--border);
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.hashtag:hover,
.hashtag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
  flex: 1;
  padding: 36px 40px 60px;
  min-width: 0;
}

/* FILTER BAR */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}
.filter-bar button {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  transition: color 0.15s;
}
.filter-bar button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* POST LIST */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  display: flex;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 20px;
  animation: fadeUp 0.3s ease both;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--radius);
}
.post-card:hover {
  background: var(--accent-light);
  padding-left: 12px;
  padding-right: 12px;
  margin: 0 -12px;
}
.post-card:first-child {
  border-top: 1px solid var(--border-light);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card-thumb {
  width: 130px;
  height: 86px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--border-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-thumb .thumb-placeholder {
  font-size: 1.8rem;
  line-height: 1;
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.post-cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 10px;
}
.post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card:hover .post-card-title {
  color: var(--accent);
}

.post-card-summary {
  font-size: 0.83rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  line-height: 1.6;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.post-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 40px;
}
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.15s;
}
.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.page-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ============================================================
   POST DETAIL
   ============================================================ */
.post-detail-wrap {
  padding: 36px 48px 80px;
}

.post-detail {
}

.post-detail-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.post-detail-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.post-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.post-source-btn:hover {
  background: var(--accent);
  color: #fff;
}

.post-detail-cat {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.post-detail-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
  word-break: keep-all;
}
.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.post-detail-meta span::before {
  content: "·";
  margin-right: 12px;
}
.post-detail-meta span:first-child::before {
  display: none;
}

.post-detail-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.post-detail-tags .post-tag {
  font-size: 0.78rem;
  padding: 3px 10px;
}

/* ARTICLE BODY */
.post-body {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.post-body h1,
.post-body h2,
.post-body h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 2em 0 0.6em;
  line-height: 1.35;
}
.post-body h1 {
  font-size: 1.6rem;
}
.post-body h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.post-body h3 {
  font-size: 1.1rem;
  color: var(--accent);
}
.post-body p {
  margin-bottom: 1.2em;
}
.post-body img {
  max-width: min(600px, 100%) !important;
  width: auto !important;
  height: auto !important;
  display: block;
  border-radius: var(--radius);
  margin: 1.2em auto;
  box-shadow: var(--shadow-md);
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--border-light);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}
.post-body pre {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
}
.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5em 0;
  padding: 12px 20px;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.post-body ul,
.post-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.2em;
}
.post-body li {
  margin-bottom: 0.4em;
}
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-body strong {
  font-weight: 700;
  color: var(--text-primary);
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.88rem;
}
.post-body th {
  background: var(--border-light);
  padding: 10px 14px;
  font-weight: 600;
  text-align: left;
  border: 1px solid var(--border);
}
.post-body td {
  padding: 9px 14px;
  border: 1px solid var(--border);
}
.post-body tr:nth-child(even) td {
  background: #f8fafc;
}

/* POST NAV */
.post-nav {
  margin-top: 48px;
}
.post-nav-item {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  background: var(--surface);
}
.post-nav-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.post-nav-dir {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.post-nav-item.next {
  text-align: right;
}
.post-nav-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* BACK BUTTON */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 28px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main {
    padding: 24px 20px 60px;
  }
  .post-detail-wrap {
    padding: 24px 20px 60px;
  }
  .post-detail-title {
    font-size: 1.4rem;
  }
  .post-card-thumb {
    width: 90px;
    height: 60px;
  }
  .search-wrap input {
    width: 160px;
  }
  .post-nav {
    grid-template-columns: 1fr;
  }
  .post-body img,
  .naver-post img,
  .naver-post .se-img {
    max-width: 100% !important;
  }
}

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.no-results .nr-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* About Page */
.about-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0 80px;
}
.about-hero {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.about-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #93c5fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}
.about-name {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.about-name span {
  color: var(--accent);
}
.about-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-section {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.5s ease forwards;
}
.about-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.about-text {
  font-size: 0.97rem;
  line-height: 1.95;
  color: var(--text-secondary);
  word-break: keep-all;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  background: var(--surface);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.project-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.project-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.posting-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.exp-group-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.exp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.exp-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
}
.exp-list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* sidebar용 CSS에 추가하면 좋습니다 */
.cat-group.single-link a {
  display: block;
  padding: 6px 10px; /* 기존 버튼과 높이 맞춤 */
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.cat-group.single-link a:hover {
  background-color: rgba(0, 0, 0, 0.05); /* 마우스 올렸을 때 피드백 */
  border-radius: 4px;
}

/* 이메일 복사 스타일 */
.email-copy-wrapper {
  position: relative;
  display: inline-block;
}

.email-address {
  color: var(--accent);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.email-address:hover {
  background: var(--accent-light);
}

.copy-badge {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.copy-badge.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* ── 네이버 블로그 본문 클린업 스타일 ──────────────────────── */
.naver-post {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-primary);
  word-break: keep-all;
}

/* 네이버 텍스트 단락 */
.naver-post .se-text-paragraph {
  margin-bottom: 0.5em;
}
.naver-post .se-text-paragraph-align-center {
  text-align: center;
}
.naver-post .se-text-paragraph-align-right {
  text-align: right;
}
.naver-post .se-text-paragraph-align-left {
  text-align: left;
}

/* 네이버 컴포넌트 여백 */
.naver-post .se-component {
  margin: 1.2em 0;
}

/* 이미지 */
.naver-post img,
.naver-post .se-img {
  max-width: min(600px, 100%) !important;
  width: auto !important;
  height: auto !important;
  border-radius: var(--radius);
  margin: 0.8em auto;
  display: block;
}
.naver-post .se-section-align-center {
  text-align: center;
}

/* 섹션 제목 */
.naver-post .se-section-sectionTitle {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.6em 0 0.4em;
  color: var(--text-primary);
}

/* 인용구 */
.naver-post blockquote,
.naver-post .se-quotation-container {
  border-left: 3px solid var(--accent);
  margin: 1.2em 0;
  padding: 10px 18px;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
}

/* 코드 블록 */
.naver-post pre {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.2em 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
}
.naver-post code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--border-light);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}
.naver-post pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* 링크 */
.naver-post a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* OG 링크 카드 숨김 (네이버 전용 컴포넌트) */
.naver-post .se-oglink {
  display: none;
}

/* 불필요한 네이버 UI 요소 숨김 */
.naver-post .se-sticker,
.naver-post .se-emoticon,
.naver-post .__se_module_data {
  display: none;
}

/* 스팬 폰트 스타일 보정 */
.naver-post span[style*="font-size"] {
  font-size: inherit !important;
}

/* ============================================================
   TOPBAR NAV (jeong-min.com style)
   ============================================================ */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.topnav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

.topnav-link:hover,
.topnav-link.active {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .topbar-nav {
    display: none;
  }
  .search-wrap input {
    width: 140px;
  }
  .search-wrap input:focus {
    width: 180px;
  }
}

/* ============================================================
   TYPING CURSOR (about page)
   ============================================================ */
.typing-cursor {
  display: inline-block;
  width: 3px;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* About page typing hero */
.about-typing-hero {
  padding-bottom: 48px;
}

.about-typing-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.about-typing-title .typing-accent {
  color: var(--accent);
}

.about-social-links {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.about-social-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================================
   POST SOURCE LINK
   ============================================================ */
.post-source-link {
  margin-top: 40px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-source-link::before {
  content: "📝";
  font-size: 1rem;
}

.post-source-link a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.post-source-link a:hover {
  color: var(--accent-hover);
}

/* ============================================================
   CATEGORY POST LIST (post nav)
   ============================================================ */
.category-post-list {
  margin-top: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.cpl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.cpl-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cpl-title strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cpl-view-all {
  font-size: 0.78rem;
  color: var(--accent);
  transition: color 0.15s;
}

.cpl-view-all:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.cpl-list {
  padding: 4px 0;
}

.cpl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}

.cpl-item:last-child {
  border-bottom: none;
}

.cpl-item:hover {
  background: var(--accent-light);
}

.cpl-item-current {
  background: var(--accent-light);
}

.cpl-item-current .cpl-post-title {
  color: var(--accent);
  font-weight: 600;
}

.cpl-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 22px;
  text-align: right;
  flex-shrink: 0;
}

.cpl-post-title {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.cpl-item:hover .cpl-post-title {
  color: var(--accent);
}

.cpl-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.cpl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
}

.cpl-page-btn {
  padding: 4px 14px;
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
}

.cpl-page-btn:hover:not(:disabled) {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.cpl-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cpl-page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cpl-back {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.cpl-back a {
  color: var(--text-muted);
  transition: color 0.15s;
}

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

/* ============================================================
   STUB PAGE (guestbook, playground)
   ============================================================ */
.stub-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}

.stub-wrap .stub-icon {
  font-size: 3rem;
}

.stub-wrap h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stub-wrap p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
