/* ============================================
   Tistory Skin — Dev Blog (Clean & Minimal)
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ── CSS Custom Properties ── */
:root {
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 56px;
  --content-max-width: 1300px;
  --progress-height: 3px;

  /* Accent */
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Font */
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

/* ── Dark Theme (Default) ── */
html,
html.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-card-hover: #253449;
  --bg-sidebar: #0b1120;
  --bg-header: rgba(15, 23, 42, 0.85);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;

  --border-color: #1e293b;
  --border-light: rgba(148, 163, 184, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.5);

  --scrollbar-bg: #1e293b;
  --scrollbar-thumb: #334155;

  --code-bg: #1a1a2e;
}

/* ── Light Theme ── */
html.light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-header: rgba(248, 250, 252, 0.85);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #f1f5f9;

  --border-color: #e2e8f0;
  --border-light: rgba(0, 0, 0, 0.06);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 25px rgba(0, 0, 0, 0.1);

  --scrollbar-bg: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;

  --code-bg: #f5f5f7;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  display: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
  font-weight: 600;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Accessibility Skip Nav ── */
#acc-nav {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
}
#acc-nav a {
  display: block;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--text-inverse);
  font-weight: 600;
}
#acc-nav a:focus {
  top: 0;
  position: fixed;
}

/* ── Scroll Progress Bar ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: var(--progress-height);
  background: linear-gradient(90deg, var(--accent), #818cf8, #c084fc);
  z-index: 10001;
  transition: none;
  border-radius: 0 2px 2px 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-base);
}

/* Profile Area */
.sidebar-profile {
  position: relative;
  padding: 32px 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* Sidebar Close Button (Mobile Only) */
.sidebar-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
}

.sidebar-close:hover {
  background: var(--accent);
  color: var(--text-inverse);
}

.sidebar-profile .profile-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 2px solid var(--border-color);
  transition: border-color var(--transition-fast);
}

.sidebar-profile .profile-img:hover {
  border-color: var(--accent);
}

.sidebar-profile .blog-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.sidebar-profile .blog-title a:hover {
  color: var(--accent);
}

.sidebar-profile .blog-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* Sidebar Tab Navigation */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-tabs button {
  flex: 1;
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sidebar-tabs button:hover,
.sidebar-tabs button.active {
  color: var(--accent);
}

.sidebar-tabs button.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.sidebar-tabs button svg {
  width: 16px;
  height: 16px;
}

/* Sidebar Panels */
.sidebar-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.sidebar-panel.active {
  display: block;
}

/* Category List */
.sidebar-categories {
  padding: 12px 0;
}

.sidebar-categories .category-group-label {
  padding: 8px 24px 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

/* Tistory 카테고리 리스트 스타일 오버라이드 */
.sidebar-categories .tt_category,
.sidebar-categories .category_list,
.sidebar-categories .sub_category_list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar-categories .tt_category li {
  position: relative;
  list-style: none !important;
}

.sidebar-categories .tt_category a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 8px 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
  text-decoration: none;
}
.sidebar-categories .tt_category img {
  order: 1;
}

.sidebar-categories .tt_category a:hover,
.sidebar-categories .tt_category li.active > a {
  color: var(--text-primary);
  background: var(--accent-glow);
  border-left-color: var(--accent);
}

.sidebar-categories .tt_category .c_cnt {
  order: 2;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
  margin-left: auto;
}

/* Sub-categories indentation */
.sidebar-categories .sub_category_list a {
  padding-left: 44px;
  font-size: 0.8rem;
}
/* Dummy thumb placeholder */
.thumb-placeholder {
  width: 100%;
  aspect-ratio: 2/1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(
    135deg,
    var(--bg-tertiary) 0%,
    var(--accent-glow) 100%
  );
}

/* Search Panel */
.sidebar-search {
  padding: 20px 24px;
}

.sidebar-search .search-input-wrap {
  position: relative;
}

.sidebar-search input[type="text"] {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.sidebar-search input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.sidebar-search input[type="text"]::placeholder {
  color: var(--text-tertiary);
}

.sidebar-search button[type="submit"] {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.sidebar-search button[type="submit"]:hover {
  color: var(--accent);
}

/* Social Links in Sidebar */
.sidebar-social {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-social .social-link {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.sidebar-social .social-link a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0;
  transition: all var(--transition-fast);
}

.sidebar-social .social-link a::before {
  font-size: 14px;
}

.sidebar-social .social-link a.pinterest::before {
  content: "P";
}
.sidebar-social .social-link a.facebook::before {
  content: "f";
}
.sidebar-social .social-link a.twitter::before {
  content: "𝕏";
}
.sidebar-social .social-link a.instagram::before {
  content: "IG";
}

.sidebar-social .social-link a:hover {
  background: var(--accent);
  color: var(--text-inverse);
  transform: translateY(-2px);
}

.sidebar-social p {
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 10px;
  letter-spacing: 0.05em;
}

/* ============================================
   TOP HEADER
   ============================================ */
#header {
  position: fixed;
  top: var(--progress-height);
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  transition:
    transform var(--transition-base),
    left var(--transition-base);
}

#header.hidden {
  transform: translateY(-100%);
}

#header .header-title {
  display: none; /* Title is in sidebar */
}

/* Header Nav */
#header #gnb {
  display: flex;
  align-items: center;
  gap: 4px;
}

#header #gnb ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Support both manual <a> tags and Tistory category list */
#header #gnb > a,
#header #gnb .category_list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

#header #gnb > a:hover,
#header #gnb .category_list > li > a:hover,
#header #gnb .category_list > li.active > a {
  color: var(--text-primary);
  background: var(--accent-glow);
}

/* Hide the "분류 전체보기" link itself in Tistory category list */
#header #gnb .tt_category > li > a.link_tit {
  display: none !important;
}

/* Show the actual categories horizontally */
#header #gnb .category_list {
  display: flex !important;
  gap: 4px;
}

/* Hide counts in header */
#header #gnb .c_cnt {
  display: none !important;
}

/* Hide sub-categories in header */
#header #gnb .sub_category_list {
  display: none !important;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Header Search */
#header .search {
  position: relative;
  display: flex;
  align-items: center;
}

#header .search input[type="text"] {
  width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-base);
  opacity: 0;
}

#header .search.open input[type="text"] {
  width: 200px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  opacity: 1;
}

#header .search input[type="text"]::placeholder {
  color: var(--text-tertiary);
}

#header .search button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

#header .search button:hover {
  color: var(--text-primary);
  background: var(--accent-glow);
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--accent-glow);
}

/* Mobile Menu Button */
.mobile-menu {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  position: relative;
}

.mobile-menu span {
  font-size: 0;
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: all var(--transition-fast);
}

.mobile-menu span::before,
.mobile-menu span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

.mobile-menu span::before {
  top: -6px;
}
.mobile-menu span::after {
  top: 6px;
}

.mobile-menu.active span {
  background: transparent;
}
.mobile-menu.active span::before {
  top: 0;
  transform: rotate(45deg);
}
.mobile-menu.active span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
#wrap {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.container {
  padding-top: calc(var(--header-height) + var(--progress-height));
}

#content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 40px 32px 60px;
}

/* ============================================
   COVER GROUP (Homepage covers)
   ============================================ */

/* Cover Thumbnail List */
.cover-thumbnail-list {
  margin-bottom: 48px;
}

.cover-thumbnail-list .post_inner h2,
.cover-masonry .post_inner h2,
.cover-list .post_inner h2,
.cover-gallery .post_inner h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: -0.02em;
}

.cover-thumbnail-list ul,
.cover-masonry ul,
.cover-list ul,
.cover-gallery ul {
  display: grid;
  gap: 20px;
}

.cover-thumbnail-list ul {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.cover-thumbnail-list li a,
.cover-masonry li a,
.cover-list li a,
.cover-gallery li a {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.cover-thumbnail-list li a:hover,
.cover-masonry li a:hover,
.cover-list li a:hover,
.cover-gallery li a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent);
}

.cover-thumbnail-list .thum,
.cover-masonry .thum {
  display: block;
  overflow: hidden;
  aspect-ratio: 2/1;
  background: var(--bg-tertiary);
}

.cover-thumbnail-list .thum img,
.cover-masonry .thum img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.cover-thumbnail-list li a:hover .thum img,
.cover-masonry li a:hover .thum img {
  transform: scale(1.05);
}

.cover-thumbnail-list .category,
.cover-masonry .category,
.cover-list .category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px 0;
}

.cover-thumbnail-list .title,
.cover-masonry .title,
.cover-list .title,
.cover-gallery .title {
  display: block;
  padding: 6px 16px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.cover-masonry .excerpt,
.cover-list .excerpt {
  display: block;
  padding: 0 16px 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cover Slider */
.cover-slider {
  margin-bottom: 48px;
}

.cover-slider ul {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding-bottom: 8px;
}

.cover-slider li {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: 320px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  background-color: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.cover-slider li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.7));
}

.cover-slider .text-box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cover-slider .category {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
}

.cover-slider .title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.cover-slider .btn.view {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

/* Cover Masonry */
.cover-masonry ul {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Cover List */
.cover-list ul {
  grid-template-columns: 1fr;
}

.cover-list li a {
  flex-direction: row;
}

.cover-list li figure {
  width: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.cover-list li figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.cover-list li a:hover figure img {
  transform: scale(1.05);
}

/* Cover Gallery */
.cover-gallery ul {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.cover-gallery li figure {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.cover-gallery li figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.cover-gallery li a:hover figure img {
  transform: scale(1.05);
}

/* Cover Footer */
.cover-footer {
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.cover-footer .image {
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.cover-footer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.cover-footer .social-link {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.cover-footer .social-link a {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.cover-footer .social-link a:hover {
  background: var(--accent);
  color: var(--text-inverse);
}

.cover-footer .menu a {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding: 4px 8px;
}

.cover-footer .menu a:hover {
  color: var(--accent);
}

/* ============================================
   POST LIST (Index)
   ============================================ */
.post-header {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.post-header span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.post-header span[style] {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.list-type {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.list-type button {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.list-type button:hover,
.list-type button.active {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Post Items */
.post_inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.post-detail {
  grid-column: 1 / -1;
  width: 100%;
}

.post-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all var(--transition-base);
}

.post-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent);
}

.post-item a {
  display: flex;
  flex-direction: column;
}

.post-item .thum {
  display: block;
  aspect-ratio: 2/1;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.post-item .thum img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.post-item:hover .thum img {
  transform: scale(1.05);
}

.post-item .title {
  display: block;
  padding: 14px 16px 4px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.post-item .excerpt {
  display: block;
  padding: 0 16px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  overflow: hidden;
}

.post-item .excerpt.protected {
  color: var(--text-tertiary);
  font-style: italic;
}

/* ============================================
   POST LIST VIEW MODE
   ============================================ */
.post_inner.list-view {
  grid-template-columns: 1fr;
}

.post_inner.list-view .post-item a {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 0;
}

.post_inner.list-view .post-item .thum {
  grid-column: 1;
  grid-row: 1 / 3;
}

.post_inner.list-view .post-item .title {
  grid-column: 2;
  grid-row: 1;
  padding-bottom: 8px;
  font-size: 1.05rem;
}

.post_inner.list-view .post-item .excerpt {
  grid-column: 2;
  grid-row: 2;
  -webkit-line-clamp: 3;
  height: auto;
}

/* ============================================
   POST DETAIL (Permalink)
   ============================================ */
.hgroup {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.hgroup .category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  padding: 3px 10px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
}

.hgroup h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0.4em 0;
}

.post-meta .author {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.post-meta .date {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.post-meta span a {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.post-meta span a:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Entry Content */
.entry-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-primary);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: -0.02em;
}

.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 36px 0 12px;
}

.entry-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 10px;
}

.entry-content p {
  margin-bottom: 16px;
}

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: var(--accent-hover);
}

.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--accent-glow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 2px 7px;
  background: var(--code-bg);
  border-radius: 4px;
  color: var(--accent);
}

.entry-content pre {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--code-bg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--border-color);
}

.entry-content pre code {
  padding: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.6;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 20px 0;
}

.entry-content ul,
.entry-content ol {
  margin: 12px 0 20px;
  padding-left: 24px;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 6px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.entry-content th {
  background: var(--bg-tertiary);
  font-weight: 600;
}

/* Protected Form */
.protected_form {
  text-align: center;
  padding: 60px 20px;
}

.protected_form p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.protected_form fieldset {
  border: none;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.protected_form input[type="password"] {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.protected_form input[type="password"]:focus {
  border-color: var(--accent);
}

/* ============================================
   TAGS
   ============================================ */
.tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.tags h2 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tags .items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags .items a {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.tags .items a:hover {
  background: var(--accent);
  color: var(--text-inverse);
}

/* ============================================
   RELATED ARTICLES
   ============================================ */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-articles h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.related-articles h2 strong {
  color: var(--accent);
}

.related-articles ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.related-articles li a {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all var(--transition-base);
}

.related-articles li a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent);
}

.related-articles .thum {
  aspect-ratio: 2/1;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.related-articles .thum img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.related-articles li a:hover .thum img {
  transform: scale(1.05);
}

.related-articles .title {
  display: block;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.comment-list ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-list > ul > li {
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.comment-list .author-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-list .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-list .nickname {
  font-size: 0.9rem;
  font-weight: 600;
}

.comment-list .date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.comment-list p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.comment-list .control {
  display: flex;
  gap: 8px;
}

.comment-list .control a {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.comment-list .control a:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Nested replies */
.comment-list ul ul {
  margin-top: 12px;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
}

.comment-list ul ul li {
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

/* Comment Form */
.comment-form {
  margin-top: 24px;
}

.comment-form .field {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.comment-form input[type="text"],
.comment-form input[type="password"] {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
  flex: 1;
  min-width: 120px;
}

.comment-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form input::placeholder {
  color: var(--text-tertiary);
}

.comment-form .secret {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.comment-form .secret input[type="checkbox"] {
  accent-color: var(--accent);
}

.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
  min-height: 100px;
}

.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form textarea::placeholder {
  color: var(--text-tertiary);
}

.comment-form .submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  color: var(--text-inverse);
}

/* ============================================
   GUEST BOOK
   ============================================ */
.guest_inner {
  padding: 0;
}

.guest_inner .hgroup {
  margin-bottom: 24px;
}

.guest_inner .hgroup h1 {
  font-size: 1.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

.pagination a.selected {
  background: var(--accent);
  color: var(--text-inverse);
  font-weight: 600;
}

.pagination .prev,
.pagination .next {
  font-weight: 600;
  color: var(--text-tertiary);
}

.pagination .prev.no-more-prev,
.pagination .next.no-more-next,
.pagination a[style*="display:none"],
.pagination a.no-more-prev,
.pagination a.no-more-next {
  opacity: 0.3;
  pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
  margin-left: 0;
  padding: 24px 32px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.copyright {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.copyright a {
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.copyright a:hover {
  color: var(--accent);
}

.copyright .admin {
  margin-left: 8px;
}

/* ============================================
   SIDEBAR OVERLAY (Mobile)
   ============================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 0 0 32px 0;
}

.toc-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.toc-container ol {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  counter-reset: toc-h2;
}

.toc-container li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.toc-container li:last-child {
  margin-bottom: 0;
}

.toc-container a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.toc-container a:hover,
.toc-container a.active {
  color: var(--accent);
  font-weight: 700;
}

.toc-h2 {
  padding-left: 0;
  font-weight: 600;
  counter-increment: toc-h2;
  counter-reset: toc-h3;
}
.toc-h2::before {
  content: counter(toc-h2) ". ";
  color: var(--text-primary);
  font-weight: 700;
  margin-right: 4px;
}

.toc-h3 {
  padding-left: 16px;
  font-size: 0.85rem !important;
  counter-increment: toc-h3;
  counter-reset: toc-h4;
}
.toc-h3::before {
  content: counter(toc-h3) ". ";
  color: var(--text-secondary);
  margin-right: 4px;
}

.toc-h4 {
  padding-left: 32px;
  font-size: 0.8rem !important;
  color: var(--text-tertiary);
  counter-increment: toc-h4;
}
.toc-h4::before {
  content: counter(toc-h4) ". ";
  margin-right: 4px;
}

@media (min-width: 1025px) {
  .post-detail {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(300px, 1fr);
    gap: 0 80px;
    align-items: start;
  }
  .post-detail > * {
    grid-column: 1;
  }
  .post-detail > .toc-container {
    grid-column: 2;
    grid-row: 1 / 10;
    margin: 0;
    position: sticky;
    top: calc(var(--header-height) + 24px);
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }

  #content {
    padding: 32px 24px 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
  }

  #sidebar {
    transform: translateX(-100%);
    z-index: 1001;
    box-shadow: var(--shadow-lg);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar-close {
    display: flex;
  }

  #header {
    left: 0;
    padding: 0 8px;
  }

  .mobile-menu {
    display: flex;
  }

  #wrap {
    margin-left: 0;
  }

  #content {
    padding: 24px 16px 40px;
  }

  .hgroup h1 {
    font-size: 1.5rem;
  }

  .cover-thumbnail-list ul,
  .cover-masonry ul {
    grid-template-columns: 1fr;
  }

  .cover-list li a {
    flex-direction: column;
  }

  .post_inner.list-view .post-item a {
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto;
    gap: 0 12px;
  }
  .post_inner.list-view .post-item .thum {
    grid-column: 1;
    grid-row: 1 / 3;
    aspect-ratio: 1 / 1;
  }
  .post_inner.list-view .post-item .title {
    grid-column: 2;
    grid-row: 1;
    padding-bottom: 2px;
    font-size: 0.95rem;
    margin-top: 4px;
    padding: 10px 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .post_inner.list-view .post-item .excerpt {
    grid-column: 2;
    grid-row: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  .cover-list li figure {
    width: 100%;
    aspect-ratio: 2/1;
  }

  .related-articles ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  #header #gnb {
    display: none;
  }

  #header .search.open input[type="text"] {
    width: 140px;
  }
}

@media (max-width: 480px) {
  .related-articles ul {
    grid-template-columns: 1fr;
  }

  .comment-form .field {
    flex-direction: column;
  }

  .comment-form input[type="text"],
  .comment-form input[type="password"] {
    width: 100%;
  }

  .cover-slider li {
    min-height: 240px;
  }

  .cover-slider .title {
    font-size: 1.1rem;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-item,
.cover-thumbnail-list li,
.cover-masonry li,
.cover-list li,
.cover-gallery li {
  animation: fadeInUp 0.5s ease both;
}

.post-item:nth-child(1) {
  animation-delay: 0.05s;
}
.post-item:nth-child(2) {
  animation-delay: 0.1s;
}
.post-item:nth-child(3) {
  animation-delay: 0.15s;
}
.post-item:nth-child(4) {
  animation-delay: 0.2s;
}
.post-item:nth-child(5) {
  animation-delay: 0.25s;
}
.post-item:nth-child(6) {
  animation-delay: 0.3s;
}

/* ============================================
   TISTORY ADMIN OVERRIDES
   ============================================ */
#tt-body-page .hgroup {
  border-bottom: none;
}

/* Fix Tistory category list default styles */
.tt_category,
.tt_category * {
  list-style: none !important;
}

/* Entry content Tistory figure/image styles */
.entry-content figure.imageblock,
.entry-content figure.imagegridblock {
  width: 100%;
  margin: 20px 0;
}

.entry-content figure.imageblock img {
  border-radius: var(--radius-md);
}

.entry-content figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* Tistory code block override */
.entry-content .colorscripter-code {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color) !important;
  margin: 20px 0 !important;
}

/* ============================================
   Tistory Category Other Articles Plugin
   ============================================ */
.another_category {
  margin-top: 60px !important;
  margin-bottom: 40px !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 24px !important;
  background: var(--bg-card) !important;
  box-shadow: var(--shadow-sm) !important;
  box-sizing: border-box !important;
}

.another_category h4 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin: 0 0 16px 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid var(--border-color) !important;
}

.another_category h4 a {
  color: var(--text-primary) !important;
  text-decoration: none !important;
  transition: color var(--transition-fast) !important;
}

.another_category h4 a:hover {
  color: var(--accent) !important;
}

.another_category table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: none !important;
  margin: 0 !important;
}

.another_category table tr:hover {
  background: var(--accent-glow);
}
.another_category table th {
  padding: 12px 8px !important;
  border: none !important;
  border-bottom: 1px solid var(--border-light) !important;
  background: transparent;
  text-align: left !important;
  font-weight: 400 !important;
}

.another_category table th a {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  transition: color var(--transition-fast) !important;
}

.another_category table th a:hover {
  color: var(--text-primary) !important;
}

/* Current article active state usually has a specific class, but Tistory might use inline styles or th span */
.another_category table th a.current {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

.another_category table th span {
  color: var(--accent) !important;
  font-size: 0.85rem !important;
  margin-left: 4px !important;
  opacity: 0.8 !important;
}

.another_category table td {
  padding: 12px 8px !important;
  border: none !important;
  border-bottom: 1px solid var(--border-light) !important;
  text-align: right !important;
  font-size: 0.85rem !important;
  color: var(--text-tertiary) !important;
  width: 100px !important;
}

.another_category table tr:last-child th,
.another_category table tr:last-child td {
  border-bottom: none !important;
}

@media screen and (max-width: 768px) {
  .another_category {
    padding: 16px !important;
  }

  .another_category table td {
    display: none !important; /* Hide date on mobile for cleaner look */
  }
}
.article-navigation {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
  gap: 20px;
}
.article-navigation a {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: calc(50% - 10px);
  box-sizing: border-box;
}
.article-navigation a:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.article-navigation .nav-prev {
  align-items: flex-start;
}
.article-navigation .nav-next {
  align-items: flex-end;
  text-align: right;
}
.article-navigation .nav-dir {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}
.article-navigation .nav-title {
  font-weight: 600;
  font-size: 1.05em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  color: #222;
}
@media (max-width: 600px) {
  .article-navigation {
    flex-direction: column;
  }
  .article-navigation a {
    width: 100%;
    align-items: center;
    text-align: center;
  }
}
html,
body {
  overflow-x: clip;
}
* {
  word-break: keep-all;
  overflow-wrap: break-word;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 50px 0;
}
.pagination a,
.pagination .selected {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}
.pagination a:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.pagination .selected {
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 10px var(--accent-glow);
}
.pagination .prev,
.pagination .next {
  color: var(--text-tertiary);
  min-width: auto;
}
.pagination .prev:hover,
.pagination .next:hover {
  color: var(--accent);
  background: transparent;
}
