/* Colour Tokens & Theme Switch */
:root {
  --theme: #f8fafc;
  --entry: rgba(255, 255, 255, 0.8);
  --primary: #1d1d1f;
  --secondary: #86868b;
  --tertiary: rgba(248, 250, 252, 0.8);
  --content: #1d1d1f;
  --code-block-bg: rgba(248, 250, 252, 0.8);
  --code-bg: rgba(248, 250, 252, 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);
}

/* Page-wide initial fade-in */
.page-fade-in { opacity: 0; animation: pageFadeIn 0.5s ease-out forwards; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }

[data-theme="dark"] {
  --theme: #06070d;
  --entry: rgba(18, 22, 38, 0.7);
  --primary: #ffffff;
  --secondary: #98989d;
  --tertiary: rgba(18, 22, 38, 0.7);
  --content: #ffffff;
  --code-block-bg: rgba(18, 22, 38, 0.8);
  --code-bg: rgba(30, 36, 60, 0.8);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --glass-bg: rgba(10, 14, 26, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Global Layout */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  text-align: center;
  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;
}

/* 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(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.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);
}

[data-theme="light"] #moon {
  display: none;
}

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

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

/* Post Container */
.post-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 20px 40px 20px;
}

/* 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);
}

/* Tech Command Bento Layout for Individual Tag Page */
.top-nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  text-align: left;
}

.tag-hero-banner {
  padding: 28px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, rgba(20, 22, 35, 0.8) 0%, rgba(10, 132, 255, 0.08) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  text-align: left;
}

[data-theme="light"] .tag-hero-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(10, 132, 255, 0.06) 100%);
}

.hero-tag-info {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.tag-big-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(10, 132, 255, 0.2);
  flex-shrink: 0;
}

.tag-title-group {
  text-align: left;
}

.tag-title-group h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: left;
}

.tag-stats-pills {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  text-align: left;
}

.stat-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--secondary);
  border: 1px solid var(--glass-border);
}

[data-theme="light"] .stat-pill {
  background: rgba(0, 0, 0, 0.05);
}

.stat-pill strong {
  color: var(--accent);
}

.search-input-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.search-input-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
}

.search-input-wrap input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15);
}

/* Controls Row */
.tag-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.items-count-label {
  font-size: 0.9rem;
  color: var(--secondary);
  text-align: left;
}

.sort-select-wrap select {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

/* Bento Grid */
.tag-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  width: 100%;
}

@media (max-width: 768px) {
  .tag-bento-grid {
    grid-template-columns: 1fr;
  }

  .tag-hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }

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

.card-a {
  padding: 22px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-light);
  text-align: left;
}

.card-a:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.card-a-thumb {
  width: 130px;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.card-a-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  text-align: left;
}

.card-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 8px;
  width: fit-content;
  margin-bottom: 8px;
}

.type-post {
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(10, 132, 255, 0.3);
}

.type-project {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.card-a-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 6px 0;
  line-height: 1.35;
  transition: color 0.3s ease;
  text-align: left;
}

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

.card-a-summary {
  font-size: 0.88rem;
  color: var(--secondary);
  line-height: 1.45;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.card-a-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--secondary);
  font-family: 'JetBrains Mono', monospace;
  text-align: left;
}

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

.post-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent);
}

.post-content h2 a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.post-content {
  flex: 1;
}

/* Update existing .post-content h2 rule */
/* Update the .post-content h2 rule to remove block display for the badge */
.post-content h2 {
  margin: 0;
  font-size: 1.4em;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* Badge positioning on separate line above title */
.post-content h2 span.project-badge,
.post-content h2 span.post-badge {
  display: inline-block;
  order: -1;
  margin-bottom: 0;
}

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

.post-meta {
  font-size: 0.85em;
  color: var(--secondary);
  margin-top: 8px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-meta i {
  font-size: 0.9em;
  color: var(--accent);
}

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

.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, 122, 255, 0.3);
  border-color: var(--accent);
}

.post-summary {
  margin-top: 10px;
  color: var(--secondary);
  line-height: 1.6;
  font-size: 0.95em;
  text-align: left;
}

/* Project card distinction (unchanged) */
.project-card {
  background: rgba(120, 120, 255, 0.07);
  position: relative;
  overflow: hidden;
  border: 1.5px solid #b3baff33;
  text-align: left;
}

.project-card:hover {
  box-shadow: 0 10px 24px rgba(120, 120, 255, 0.13);
}

.project-badge {
  display: inline-block;
  background: #6c63ff;
  color: #fff;
  font-size: 0.7em;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 4px rgba(108, 99, 255, 0.08);
  opacity: 0.85;
}

.post-badge {
  display: inline-block;
  background: #ff7a59;
  color: #fff;
  font-size: 0.7em;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 4px rgba(255, 122, 89, 0.08);
  opacity: 0.85;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 800px;
  padding: 0 16px;
}

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

.pagination button:hover,
.pagination .pagination-btn:hover {
  background: rgba(0, 122, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

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

.pagination button.active:hover,
.pagination .pagination-btn.active:hover {
  transform: scale(1.05);
}

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

.pagination-ellipsis {
  color: var(--secondary);
  padding: 0 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

/* 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;
}

/* 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;
}

/* Scroll to Top Button */
#scrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  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:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: var(--shadow-heavy);
}

/* View All Tags Button */
.view-all-tags {
  background: var(--glass-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 16px;
  font-size: 0.9em;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-left: auto; /* Push to the right */
}

.view-all-tags:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

.skeleton-img {
  width: 140px;
  height: 140px;
  background: var(--tertiary);
  border-radius: 12px;
  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: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.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);
  }
}

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

  /* Disable hover effects on mobile */
  .post-card:hover {
    transform: none;
    box-shadow: var(--shadow-light);
  }

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

  .nav-left {
    flex: 0 0 auto;
  }

  .nav-right {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .nav-center,
  .pill-nav {
    display: none;
  }

  .header-bar 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;
  }

  .post-container {
    padding: 90px 16px 100px 16px;
    max-width: 100%;
  }

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

  .breadcrumb a {
    padding: 2px 4px;
  }

  .header-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 28px;
    padding: 0;
    gap: 12px;
  }

  .header-bar h1 {
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.1;
    width: 100%;
    text-align: left;
    padding: 0;
  }

  .view-all-tags {
    font-size: 0.85em;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-left: 0;
  }

  .view-all-tags::after {
    content: '→';
    font-size: 1.1em;
  }

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

  .post-image {
    width: 100%;
    height: 200px;
  }

  .post-card img {
    width: 100%;
    height: 200px;
    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;
    flex-wrap: wrap;
  }

  .post-meta span {
    white-space: nowrap;
  }

  /* 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 Mobile Styling */
  .pagination {
    gap: 6px;
    padding: 0 12px;
    margin: 30px auto;
  }

  .pagination button {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 0.9em;
  }

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

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

  /* Pagination Mobile Styling */
  .pagination {
    gap: 6px;
    padding: 0 12px;
    margin: 30px auto;
  }

  .pagination button {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 0.9em;
  }

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

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

@media (max-width: 480px) {
  .header-bar h1 {
    font-size: 2rem;
    padding: 0;
  }

  .view-all-tags {
    font-size: 0.8em;
    padding: 7px 14px;
  }

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

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

/* 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;
}

/* ---------- Mobile Pagination Responsive Fixes ---------- */
@media (max-width: 768px) {
  .pagination {
    margin: 24px auto 16px auto !important;
    padding: 8px 10px !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: space-between !important;
    align-items: center !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .pagination button,
  .pagination .pagination-btn,
  .pagination .bento-page-btn {
    min-width: 32px !important;
    height: 34px !important;
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    flex-shrink: 0 !important;
  }
  .pagination .page-buttons {
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    max-width: 100% !important;
  }
}

