/* Core Design Tokens & Theme Variables */
:root {
  --theme: #f5f5f7;
  --entry: rgba(255, 255, 255, 0.8);
  --primary: #1d1d1f;
  --secondary: #86868b;
  --tertiary: rgba(245, 245, 247, 0.8);
  --content: #1d1d1f;
  --code-block-bg: rgba(245, 245, 247, 0.8);
  --code-bg: rgba(245, 245, 247, 0.6);
  --border: rgba(210, 210, 215, 0.8);
  --accent: #007aff;
  --accent-hover: #0056cc;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --theme: #070913;
  --entry: rgba(28, 28, 30, 0.8);
  --primary: #ffffff;
  --secondary: #98989d;
  --tertiary: rgba(28, 28, 30, 0.8);
  --content: #ffffff;
  --code-block-bg: rgba(28, 28, 30, 0.8);
  --code-bg: rgba(44, 44, 46, 0.8);
  --border: rgba(58, 58, 60, 0.8);
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --glass-bg: rgba(28, 28, 30, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Global Layout & Typography */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  background: transparent !important;
  color: var(--primary);
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.post-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 20px 40px 20px;
  width: 100%;
}

/* Header and Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-left .logo {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-weight: 800;
  font-size: 1.5em;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -1px;
  padding: 8px 16px;
  border-radius: 10px;
  position: relative;
  background: var(--glass-bg);
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.05), inset -2px -2px 4px rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.nav-left .logo:hover {
  color: var(--accent);
  transform: translateY(-2px) rotateX(5deg);
  box-shadow: 0 6px 12px rgba(0, 122, 255, 0.2);
}

.nav-left .logo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-left .logo:hover::after {
  width: 80%;
}

.nav-center {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding: 0 10px;
}

.pill-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  padding: 8px 24px;
  border-radius: 25px;
  display: flex;
  gap: 28px;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  justify-content: flex-start;
  margin: 0 auto;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: max-content;
  flex-shrink: 0;
  max-width: 480px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 1;
}

.pill-nav::-webkit-scrollbar {
  display: none;
}

.pill-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  border-radius: 25px;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.pill-nav:hover {
  box-shadow: var(--shadow-medium);
  transform: none;
}

.pill-nav:hover::before {
  opacity: 0.05;
}

.pill-nav a {
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 10px 20px;
  border-radius: 20px;
  white-space: nowrap;
}

.pill-nav a.active {
  font-weight: 700;
  font-size: 1.05em;
  color: white;
  background: var(--accent);
}

.pill-nav a.active:hover {
  background: var(--accent-hover);
}

.pill-nav a:hover:not(.active) {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
}

.nav-right {
  display: flex;
  align-items: center;
}

#theme-toggle {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  z-index: 1;
}

#theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

#theme-toggle:hover {
  transform: none;
  box-shadow: var(--shadow-light);
}

#theme-toggle:hover::before {
  opacity: 0.1;
}

#theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#moon {
  display: none;
}

[data-theme="dark"] #sun {
  display: none;
}

[data-theme="dark"] #moon {
  display: block;
}

/* Breadcrumb Navigation */
.breadcrumb {
  font-size: 0.85em;
  color: var(--secondary);
  margin: 0 0 24px 0;
  padding-left: 0;
  font-weight: 400;
  opacity: 0.8;
  text-align: left;
}

.breadcrumb a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 4px 8px;
  border-radius: 6px;
  margin: 0 2px;
}

.breadcrumb a:hover {
  color: var(--accent);
  background: rgba(0, 122, 255, 0.08);
}

.breadcrumb a:last-child {
  font-weight: 500;
  color: var(--primary);
  background: rgba(0, 122, 255, 0.1);
}

/* Header Bar and Search */
.header-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 32px 0;
  padding-left: 0;
}

.header-bar h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  padding-left: 0;
  text-align: left;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--secondary);
  letter-spacing: 8px;
  margin-bottom: 24px;
  text-align: left;
}

/* ---------- Filter & Search Control Hub ---------- */
.posts-control-hub {
  margin-bottom: 24px;
}

.posts-search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.posts-search-input-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.posts-search-input-wrap i {
  position: absolute;
  left: 14px;
  color: var(--secondary);
  font-size: 0.9rem;
  pointer-events: none;
}

.posts-search-input-wrap input {
  width: 100%;
  padding: 11px 16px 11px 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--primary);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}

.posts-search-input-wrap input:focus {
  border-color: var(--accent);
  background: rgba(10, 132, 255, 0.06);
  box-shadow: 0 0 16px rgba(10, 132, 255, 0.25);
}

.posts-mobile-actions {
  display: contents;
}

.explore-tags-btn {
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: var(--purple, #c084fc);
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.explore-tags-btn:hover, .explore-tags-btn.active {
  background: rgba(192, 132, 252, 0.25);
  border-color: var(--purple, #c084fc);
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.3);
}

.explore-tags-btn .caret-icon {
  transition: transform 0.25s ease;
}

.explore-tags-btn.active .caret-icon {
  transform: rotate(180deg);
}

.posts-sort-wrap {
  position: relative;
  min-width: 145px;
}

.posts-sort-wrap select {
  width: 100%;
  padding: 10px 34px 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.25s ease;
}

.posts-sort-wrap select option {
  background: #0d1117;
  color: #fff;
}

.posts-sort-wrap select:focus,
.posts-sort-wrap select:hover {
  border-color: var(--accent);
  background: rgba(10, 132, 255, 0.08);
}

.posts-sort-wrap .sort-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
  font-size: 0.75rem;
  pointer-events: none;
}

.tags-filter {
  display: flex;
  gap: 8px 10px;
  overflow-x: auto;
  padding: 4px 16px 8px 2px;
  margin-bottom: 8px;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

@media (min-width: 851px) {
  .tags-filter {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-right: 0;
  }
}

.tags-filter::-webkit-scrollbar { display: none; }

.tags-drawer-sheet {
  background: rgba(15, 18, 30, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 18px;
  margin-top: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  display: none;
}

.tags-drawer-sheet.show {
  display: block !important;
  animation: drawerFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tags-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple, #c084fc);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.all-tags-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.all-tags-link:hover {
  text-decoration: none !important;
  color: var(--accent-hover, #409cff);
  opacity: 0.85;
}

.tags-drawer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-tag-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 6px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.drawer-tag-chip:hover, .drawer-tag-chip.active {
  background: rgba(10, 132, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}


.tag-btn {
  padding: 8px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--secondary);
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.tag-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.4);
  font-weight: 600;
}

.tag-btn:hover:not(.active) {
  color: var(--primary);
  background: rgba(10, 132, 255, 0.12);
  border-color: rgba(10, 132, 255, 0.3);
}

.view-more-tags {
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  background: var(--glass-bg);
  color: var(--secondary);
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.view-more-tags:hover {
  color: var(--primary);
  background: rgba(0, 122, 255, 0.08);
  transform: translateY(-1px);
}

/* ---------- 7b. Glass Capsule Dock Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto 20px auto;
  padding: 0 16px;
  width: 100%;
}

.opt1-desk-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--entry, rgba(18, 22, 34, 0.85));
  border: 1px solid var(--glass-border);
  padding: 8px 14px;
  border-radius: 32px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.opt1-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.opt1-btn:hover:not([disabled]) {
  background: rgba(10, 132, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.opt1-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--secondary);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.opt1-num:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.opt1-num.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--shadow-color, rgba(10, 132, 255, 0.4));
}

.opt1-dots {
  color: var(--secondary);
  padding: 0 4px;
  font-size: 0.85rem;
}

.opt1-mob-wrapper {
  display: none;
  width: 100%;
}

.opt1-mob-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--entry, rgba(18, 22, 34, 0.85));
  border: 1px solid var(--glass-border);
  padding: 6px 10px;
  border-radius: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.opt1-mob-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.opt1-mob-indicator {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--secondary);
}

.opt1-mob-indicator span {
  color: var(--accent);
  font-weight: 700;
}

/* Post Cards */
#post-container {
  flex: 1;
  min-height: 400px;
  width: 100%;
}

#post-container .post-card {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  flex-direction: row !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 24px !important;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-light);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#post-container .post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

#post-container .post-card .post-image {
  flex-shrink: 0 !important;
  width: 140px !important;
  height: 140px !important;
  min-width: 140px !important;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 0 !important;
}

#post-container .post-card .post-image a {
  display: block;
  width: 100%;
  height: 100%;
}

#post-container .post-card img {
  width: 140px !important;
  height: 140px !important;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

#post-container .post-card:hover img {
  transform: scale(1.05);
}

#post-container .post-card.no-thumbnail {
  padding: 20px 24px;
}

#post-container .post-card.no-thumbnail .post-content {
  width: 100%;
}

#post-container .post-card .post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
}

#post-container .post-card .post-title,
#post-container .post-card .post-content h2 {
  margin: 0 0 4px 0 !important;
  font-size: 1.35em !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: left !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
}

.post-content h2 a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-content h2 a:hover {
  color: var(--accent);
}

.post-summary {
  color: var(--secondary);
  line-height: 1.55;
  font-size: 0.93em;
  margin: 0 0 6px 0;
  text-align: left;
}

.post-summary a {
  color: var(--secondary);
  text-decoration: none;
}

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

.post-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.85em;
  color: var(--secondary);
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 4px;
}

.post-date,
.post-read-time,
.post-views,
.post-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.post-read-time i,
.post-views i,
.post-date i,
.post-author i {
  font-size: 0.9em;
  opacity: 0.85;
  color: var(--accent);
}

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

.post-tags .tag {
  display: inline-block;
  background: var(--glass-bg);
  color: var(--secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 500;
  border: 1px solid var(--accent);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.post-tags .tag:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  border-color: var(--accent);
}
/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto;
  padding: 0 20px;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 900px;
}

.pagination .page-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination button {
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--primary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95em;
  font-weight: 500;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

.pagination button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.pagination button:hover::before {
  opacity: 0.1;
}

.pagination button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  transform: scale(1.05);
}

.pagination button.active::before {
  opacity: 1;
}

.pagination button:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent);
}

.pagination button:active {
  transform: scale(0.95);
}

.pagination span {
  color: var(--secondary);
  padding: 0 8px;
  font-size: 1.2em;
  font-weight: 500;
}
/* No Results Message */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--secondary);
}

.no-results i {
  font-size: 3em;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5em;
  margin: 0 0 10px 0;
  color: var(--primary);
}

.no-results p {
  font-size: 1.1em;
  margin: 0;
}

/* Scroll to Top Button */
#scrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1em;
}

#scrollTop.visible {
  display: flex;
}

#scrollTop:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: var(--shadow-heavy);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 80px;
  position: relative;
  color: var(--secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer:hover::before {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.social-icons a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.social-icons a:hover::before {
  opacity: 0.1;
}

.social-icons a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.social-icons a i {
  font-size: 1.2em;
}

.footer p {
  font-size: 0.9em;
  margin: 0;
  opacity: 0.8;
}

/* Skeleton UI */
.skeleton-post-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  opacity: 0.8;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-light);
}

.skeleton-img {
  width: 100px;
  height: 100px;
  background: var(--tertiary);
  border-radius: 8px;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-content {
  flex: 1;
}

.skeleton-title {
  width: 60%;
  height: 20px;
  background: var(--tertiary);
  border-radius: 4px;
  margin-bottom: 10px;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-meta {
  width: 40%;
  height: 15px;
  background: var(--tertiary);
  border-radius: 4px;
  margin-bottom: 10px;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-summary {
  width: 80%;
  height: 15px;
  background: var(--tertiary);
  border-radius: 4px;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.3;
  }

  100% {
    opacity: 0.6;
  }
}

/* Loader Styles */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  opacity: 0;
  visibility: hidden;
}

.loader.active {
  opacity: 1;
  visibility: visible;
}

.loader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
  z-index: -999999 !important;
}

.terry-animation {
  display: flex;
  gap: 4px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 2em;
  color: var(--primary);
}

.letter {
  animation: spinLetter 1s ease-in-out infinite;
  transform-origin: center;
  display: inline-block;
}

.letter:nth-child(1) {
  animation-delay: 0s;
}

.letter:nth-child(2) {
  animation-delay: 0.1s;
}

.letter:nth-child(3) {
  animation-delay: 0.2s;
}

.letter:nth-child(4) {
  animation-delay: 0.3s;
}

.letter:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes spinLetter {
  0%, 100% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
}

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
  .post-container {
    padding: 24px 16px;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container {
    max-width: 100%;
    overflow-x: hidden;
  }

  .nav {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
  }

  .nav-left {
    flex: 1;
    text-align: left;
  }

  .nav-center {
    display: none; /* Hide pill navigation in mobile */
  }

  .pill-nav {
    display: none; /* Hide pill navigation in mobile */
  }

  .pill-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-right {
    order: 2;
    margin-left: auto;
  }

  .header-bar {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  h1 {
    font-size: 2.5rem;
    text-align: left;
    margin: 0 0 24px 0;
  }

  .subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 8px;
    margin-bottom: 10px;
    text-align: left;
  }

  .breadcrumb {
    font-size: 0.92em;
    margin: 4px 0 24px 0;
    text-align: left;
  }

  .post-container {
    padding: 85px 16px 110px 16px !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  .posts-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .posts-search-input-wrap {
    width: 100%;
    min-width: 100%;
  }

  .posts-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .explore-tags-btn {
    width: 100%;
    min-width: 100%;
    justify-content: center;
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .posts-sort-wrap {
    width: 100%;
    min-width: 100%;
    position: relative;
  }

  .posts-sort-wrap select {
    width: 100%;
    padding: 9px 28px 9px 12px;
    font-size: 0.82rem;
    text-align: left;
    box-sizing: border-box;
  }

  .pagination {
    margin-bottom: 95px !important;
  }

  /* Modern Horizontal Scrollable Tags for Mobile */
  .tags-filter {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 16px 0;
    padding: 12px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
  }

  .tags-filter::-webkit-scrollbar {
    display: none;
  }

  /* Add subtle gradient indicators for scrollable content */
  .tags-filter::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, var(--glass-bg), transparent);
    pointer-events: none;
    z-index: 1;
    border-radius: 16px 0 0 16px;
  }

  .tags-filter::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, var(--glass-bg), transparent);
    pointer-events: none;
    z-index: 1;
    border-radius: 0 16px 16px 0;
  }

  .tag-btn {
    font-size: 0.85em;
    padding: 8px 14px;
    border-radius: 18px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .view-more-tags {
    font-size: 0.85em;
    padding: 8px 14px;
    border-radius: 18px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  #post-container .post-card {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #post-container .post-card .post-image {
    width: 100% !important;
    min-width: 100% !important;
    height: 200px !important;
  }

  #post-container .post-card img {
    width: 100% !important;
    height: 200px !important;
    border-radius: 8px;
  }

  .post-content h2 {
    font-size: 1.1em;
  }

  .post-summary {
    font-size: 0.9em;
  }

  .post-meta {
    gap: 8px;
    font-size: 0.75em;
    margin-top: 8px;
  }

  /* Mobile-friendly clickable tags */
  .post-tags .tag {
    padding: 8px 14px;
    font-size: 0.85em;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  .post-tags .tag:active {
    transform: scale(0.95);
    background: var(--accent);
    color: white;
  }

  /* Pagination Glass Capsule Dock */
  .opt1-desk-bar {
    display: none;
  }
  .opt1-mob-wrapper {
    display: block;
  }
  .pagination {
    margin-bottom: 95px !important;
  }

  #scrollTop {
    bottom: 100px;
    right: 16px;
    width: 45px;
    height: 45px;
    font-size: 1.2em;
  }

  .terry-animation {
    font-size: 2.2rem;
  }
}

/* ---------- Bottom Navigation (Desktop - Hidden) ---------- */
.bottom-nav {
  display: none;
}

/* ---------- Bottom Navigation (Mobile Only) ---------- */
@media (max-width: 768px) {
  body {
    padding-bottom: 100px;
  }

  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 8px 0;
    z-index: 999;
    box-shadow: var(--shadow-light);
  }

  .bottom-nav a {
    color: var(--primary);
    text-decoration: none;
    text-align: center;
    font-size: 12px;
    padding: 6px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
  }

  .bottom-nav a.active {
    color: var(--accent);
    font-weight: bold;
  }

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

  .bottom-nav i {
    font-size: 26px;
    display: block;
    margin-bottom: 4px;
  }

  .bottom-nav span {
    font-size: 10px;
  }

  .post-container {
    padding-bottom: 100px;
  }
}

@media (max-width: 480px) {
  .bottom-nav span {
    display: none;
  }

  .bottom-nav i {
    font-size: 28px;
  }

  .bottom-nav a {
    font-size: 0;
    padding: 10px 0;
  }

  .header-bar h1 {
    font-size: 2rem;
  }

  /* Pagination for Small Mobile */
  .pagination {
    gap: 4px;
    padding: 0 8px;
    margin: 20px auto;
  }

  .pagination .page-buttons {
    gap: 4px;
  }

  .pagination button {
    min-width: 36px;
    height: 36px;
    padding: 6px 10px;
    font-size: 0.85em;
    border-radius: 10px;
  }

  .pagination span {
    font-size: 1em;
    padding: 0 4px;
  }
}

/* Standardized Footer Styles (Matched to Each Projects Page) */
.footer {
  text-align: center;
  padding: 40px 20px 80px 20px;
  margin-top: 80px;
  position: relative;
  color: var(--secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer:hover::before {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}

.footer p {
  margin: 12px 0 0 0;
  font-size: 0.9em;
  color: var(--secondary);
}

.social-icons {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.social-icons a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 12px !important;
  color: var(--primary) !important;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: var(--shadow-light) !important;
  font-size: 1.15em !important;
  margin: 0 !important;
}

.social-icons a i {
  color: var(--primary) !important;
  transition: color 0.2s ease !important;
}

.social-icons a:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  transform: translateY(-3px) scale(1.08) !important;
  box-shadow: var(--shadow-medium) !important;
}

.social-icons a:hover i {
  color: #ffffff !important;
}

