/*
 * it4ch1 decor for jekyll-theme-chirpy 6.x
 * Every numbered block is independent: delete any block you don't like.
 */

:root {
  --it-red: #d1293d;          /* blood-moon crimson, matches the avatar */
  --it-red-text: #ff6b7a;     /* lighter crimson, readable as text on dark bg */
  --it-red-glow: rgba(209, 41, 61, 0.45);
  --it-red-faint: rgba(209, 41, 61, 0.1);
  --it-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

::selection {
  background: rgba(209, 41, 61, 0.35);
  color: #fff;
}

/* 1. Blood-moon avatar: crimson double rim with a slow breathing glow ------ */
#sidebar #avatar {
  animation: it-moon 5s ease-in-out infinite;
}

@keyframes it-moon {
  0%, 100% {
    box-shadow:
      0 0 0 2px var(--it-red),
      0 0 0 6px var(--sidebar-bg),
      0 0 0 7px rgba(209, 41, 61, 0.25),
      0 0 14px 2px rgba(209, 41, 61, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 2px var(--it-red),
      0 0 0 6px var(--sidebar-bg),
      0 0 0 7px rgba(209, 41, 61, 0.55),
      0 0 30px 6px rgba(209, 41, 61, 0.42);
  }
}

/* 2. Site title: short RGB-split glitch, only when hovered ----------------- */
#sidebar .site-title a {
  display: inline-block;
}

#sidebar .site-title a:hover {
  color: var(--site-title-color);
  animation: it-glitch 0.45s steps(2, end) 1;
}

@keyframes it-glitch {
  0%   { text-shadow: 2px 0 var(--it-red), -2px 0 #3ad1e6; transform: translate(0); }
  25%  { text-shadow: -2px 0 var(--it-red), 2px 0 #3ad1e6; transform: translate(-1px, 1px); }
  50%  { text-shadow: 1px -1px var(--it-red), -1px 1px #3ad1e6; transform: translate(1px, -1px); }
  75%  { text-shadow: -1px 0 var(--it-red), 1px 0 #3ad1e6; transform: translate(0, 1px); }
  100% { text-shadow: none; transform: none; }
}

/* 3. Tagline: blinking terminal cursor after "REV4LYF" --------------------- */
#sidebar .site-subtitle::after {
  content: "_";
  margin-left: 2px;
  font-style: normal;
  color: var(--it-red-text);
  animation: it-blink 1.1s steps(1) infinite;
}

@keyframes it-blink {
  50% { opacity: 0; }
}

/* 4. Sidebar nav: crimson marker on the active tab, icon reacts on hover --- */
#sidebar ul li.nav-item.active .nav-link {
  box-shadow: inset 3px 0 0 var(--it-red);
}

#sidebar ul li.nav-item a.nav-link i {
  transition: color 0.25s ease, transform 0.25s var(--it-ease);
}

#sidebar ul li.nav-item a.nav-link:hover i,
#sidebar ul li.nav-item.active a.nav-link i {
  color: var(--it-red-text);
  opacity: 1;
}

#sidebar ul li.nav-item a.nav-link:hover i {
  transform: translateX(2px);
}

/* 5. Home post cards: one staggered entrance on load + hover response ----- */
#post-list .card-wrapper {
  animation: it-rise 0.55s var(--it-ease) both;
}
#post-list .card-wrapper:nth-child(2)  { animation-delay: 0.06s; }
#post-list .card-wrapper:nth-child(3)  { animation-delay: 0.12s; }
#post-list .card-wrapper:nth-child(4)  { animation-delay: 0.18s; }
#post-list .card-wrapper:nth-child(5)  { animation-delay: 0.24s; }
#post-list .card-wrapper:nth-child(6)  { animation-delay: 0.3s; }
#post-list .card-wrapper:nth-child(n+7) { animation-delay: 0.36s; }

@keyframes it-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

#post-list .post-preview {
  position: relative;
  transition: transform 0.3s var(--it-ease), box-shadow 0.3s ease;
}

/* crimson edge that grows in from the middle on hover */
#post-list .post-preview::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 3px;
  background: var(--it-red);
  transform: scaleY(0);
  transition: transform 0.3s var(--it-ease);
}

#post-list .post-preview:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow), 0 10px 28px -14px var(--it-red-glow);
}

#post-list .post-preview:hover::after,
#post-list .post-preview:focus-visible::after {
  transform: scaleY(1);
}

#post-list .card-body .card-title {
  transition: color 0.25s ease;
}

#post-list .post-preview:hover .card-title {
  color: var(--it-red-text) !important;
}

#post-list .post-preview:focus-visible {
  outline: 2px solid var(--it-red);
  outline-offset: 3px;
}

/* 6. Tags: crimson outline on hover (trending, post footer, tags page) ----- */
#access-tags .post-tag,
.post-tags .post-tag,
#tags .tag {
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

#access-tags .post-tag:hover,
.post-tags .post-tag:hover,
#tags .tag:hover {
  color: var(--it-red-text) !important;
  border-color: var(--it-red) !important;
  background: var(--it-red-faint) !important;
}

/* 7. Ambient blood-moon glow in the top-right + frosted topbar ------------- */
body {
  background-image: radial-gradient(
    640px circle at 92% -160px,
    rgba(209, 41, 61, 0.11),
    transparent 70%
  );
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#topbar-wrapper {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* 8. Reading progress bar on posts (element is added by it4ch1-decor.js) -- */
#it-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #7a0f1c, var(--it-red), var(--it-red-text));
  box-shadow: 0 0 8px var(--it-red-glow);
  pointer-events: none;
}

/* 9. Post & About content: h2 underline, softer images ---------------------- */
.content > h2::after,
.content .it-block > h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: 0.45rem;
  border-radius: 2px;
  background: var(--it-red);
}

.content a.popup img,
.content > p > img {
  border-radius: 0.6rem;
}

.content a.popup:hover img {
  box-shadow: 0 12px 32px -14px var(--it-red-glow);
}

/* Respect people who turn off motion ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #sidebar #avatar,
  #sidebar .site-title a:hover,
  #sidebar .site-subtitle::after,
  #post-list .card-wrapper {
    animation: none !important;
  }

  #sidebar #avatar {
    box-shadow: 0 0 0 2px var(--it-red), 0 0 0 6px var(--sidebar-bg),
      0 0 0 7px rgba(209, 41, 61, 0.35), 0 0 20px 3px rgba(209, 41, 61, 0.3);
  }

  #post-list .post-preview:hover,
  #sidebar ul li.nav-item a.nav-link:hover i {
    transform: none;
  }
}

/* 10. About page (classes used in _tabs/about.md) =========================== */
.it-hero {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
  margin: 1.5rem 0 1.5rem;
}

/* portrait with a slow blood-moon glow behind it */
.it-portrait {
  position: relative;
  isolation: isolate;
}

.it-portrait::before {
  content: "";
  position: absolute;
  inset: -4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 41, 61, 0.6), transparent 70%);
  filter: blur(26px);
  animation: it-breathe 6s ease-in-out infinite;
}

@keyframes it-breathe {
  0%, 100% { opacity: 0.5; transform: scale(0.94); }
  50%      { opacity: 0.95; transform: scale(1.08); }
}

.content .it-portrait a.popup,
.content .it-team-row a.popup {
  display: block;
  margin: 0;
}

.content .it-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 0 0 1px rgba(209, 41, 61, 0.45), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s var(--it-ease), box-shadow 0.3s ease;
}

.content .it-portrait a.popup:hover img {
  transform: scale(1.02);
  box-shadow: 0 0 0 1px var(--it-red), 0 16px 40px -14px var(--it-red-glow);
}

/* terminal card */
.it-term {
  border: 1px solid var(--btn-border-color);
  border-radius: 0.75rem;
  background: #141416;
  overflow: hidden;
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9);
}

.it-term-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--btn-border-color);
  background: rgba(255, 255, 255, 0.02);
}

.it-term-bar i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #3a3a3f;
}

.it-term-bar i:first-child {
  background: var(--it-red);
}

.it-term-bar span {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted-color);
}

.it-term-body {
  padding: 0.9rem 1.1rem 1rem;
  color: var(--text-color);
}

.it-term .ln {
  white-space: nowrap;
  overflow: hidden;
  animation: it-appear 0.01s var(--d, 0s) both;
}

.it-term .p {
  color: var(--it-red-text);
  user-select: none;
}

.it-term .out {
  color: var(--text-muted-color);
}

.it-term .cmd {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  width: calc(var(--n) * 1ch);
  animation: it-type calc(var(--n) * 55ms) steps(var(--n), end) var(--d, 0s) both;
}

.it-term .cur {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  vertical-align: -0.2em;
  background: var(--it-red-text);
  animation: it-blink 1.1s steps(1) infinite;
}

@keyframes it-appear {
  from { opacity: 0; }
}

@keyframes it-type {
  from { width: 0; }
}

/* buttons under the hero */
.it-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.content .it-links a.it-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--btn-border-color);
  border-radius: 2rem;
  color: var(--text-color);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.content .it-links a.it-btn:hover {
  color: var(--it-red-text);
  border-color: var(--it-red);
  background: var(--it-red-faint);
}

.content .it-links a.it-btn-primary,
.content .it-links a.it-btn-primary:hover {
  color: #fff;
  border-color: var(--it-red);
  background: var(--it-red);
}

.content .it-links a.it-btn-primary:hover {
  background: #b51f32;
  border-color: #b51f32;
}

.content .it-links a.it-btn:focus-visible {
  outline: 2px solid var(--it-red-text);
  outline-offset: 2px;
}

/* sections */
.it-block {
  margin-top: 2.25rem;
}

.it-team-row {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.content .it-team-row img {
  display: block;
  width: 6rem;
  height: auto;
  border-radius: 0.75rem;
}

.it-team-row p {
  margin: 0;
}

.it-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.it-chips span {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--btn-border-color);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted-color);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

/* closing quote + sign-off */
.content blockquote.it-quote {
  margin: 3rem 0 1.25rem;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 3px solid var(--it-red);
  color: var(--heading-color);
}

.content blockquote.it-quote p {
  margin: 0;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.6;
}

.it-sign span {
  display: inline-block;
  color: var(--it-red-text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
}

.it-sign span:hover {
  animation: it-glitch 0.45s steps(2, end) 1;
}

/* sections fade in as you scroll (only in browsers that support it natively) */
@supports (animation-timeline: view()) {
  .it-block,
  .content blockquote.it-quote {
    animation: it-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }

  @keyframes it-reveal {
    from { opacity: 0; transform: translateY(14px); }
  }
}

@media (max-width: 575.98px) {
  .it-hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .it-portrait {
    width: 11rem;
  }

  .it-term {
    width: 100%;
    font-size: 0.85rem;
  }

  .it-team-row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .content .it-team-row img {
    width: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .it-portrait::before,
  .it-term .ln,
  .it-term .cmd,
  .it-term .cur,
  .it-block,
  .content blockquote.it-quote,
  .it-sign span:hover {
    animation: none !important;
  }
}

/* 11. Shared: typed shell prompt above Home, Categories and Tags ============ */
.it-prompt {
  margin: 1.75rem 0 0;
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  color: var(--text-muted-color);
  white-space: nowrap;
}

h1.dynamic-title + .it-prompt {
  margin: -0.75rem 0 1.75rem;
}

.it-prompt .p {
  color: var(--it-red-text);
}

.it-prompt .cmd {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  width: calc(var(--n) * 1ch);
  animation: it-type calc(var(--n) * 50ms) steps(var(--n), end) 0.25s both;
}

.it-prompt .cur {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 0.3em;
  vertical-align: -0.2em;
  background: var(--it-red-text);
  opacity: 0.85;
  animation: it-blink 1.1s steps(1) infinite;
}

#post-list {
  margin-top: 1.25rem;
}

@media (min-width: 1200px) {
  .it-prompt-home {
    padding-left: 0.25rem;
  }
}

/* Chirpy hides the page title on small screens */
@media (max-width: 849px) {
  h1.dynamic-title + .it-prompt {
    margin: 2.5rem 0 0;
  }

  h1.dynamic-title + .it-prompt ~ .content {
    margin-top: 1.25rem;
  }
}

/* 12. Home: pointer spotlight on cards + red active page number ============== */
#post-list .post-preview::before {
  background-color: rgba(255, 255, 255, 0.02);
  background-image: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(209, 41, 61, 0.13),
    transparent 65%
  );
}

#post-list .post-preview:hover::before {
  opacity: 1;
}

#post-list .post-meta .categories {
  color: var(--it-red-text);
  opacity: 0.85;
}

.pagination .page-item.active .page-link {
  background-color: var(--it-red-faint);
  box-shadow: inset 0 0 0 1px var(--it-red);
  color: var(--it-red-text);
}

.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
  box-shadow: inset 0 0 0 1px var(--it-red);
  color: var(--it-red-text);
}

/* 13. Categories: whole card toggles its post list, size bar per category ==== */
.it-cats .categories {
  margin-bottom: 1rem;
  overflow: hidden;
  animation: it-rise 0.5s var(--it-ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.it-cats .categories:hover,
.it-cats .categories:has(.it-cat-toggle[aria-expanded="true"]) {
  border-color: rgba(209, 41, 61, 0.45);
  box-shadow: 0 10px 28px -16px var(--it-red-glow);
}

.it-cats .card-header {
  position: relative;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  transition: background-color 0.25s ease;
}

.it-cats .card-header:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

/* invisible button stretched over the whole header */
.it-cat-toggle {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.it-cat-toggle:focus-visible {
  outline: 2px solid var(--it-red);
  outline-offset: -2px;
  border-radius: inherit;
}

/* crimson edge, same language as the home cards */
.it-cats .card-header::after {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 3px;
  background: var(--it-red);
  transform: scaleY(0);
  transition: transform 0.3s var(--it-ease);
  pointer-events: none;
}

.it-cats .card-header:hover::after,
.it-cats .card-header:has(.it-cat-toggle[aria-expanded="true"])::after {
  transform: scaleY(1);
}

.it-cats .card-header > i.far {
  position: relative;
  pointer-events: none;
  transition: color 0.25s ease;
}

.it-cats .card-header:hover > i.far,
.it-cats .card-header > i.fa-folder-open {
  color: var(--it-red-text);
}

.content .it-cats a.it-cat-name {
  position: relative;
  z-index: 1;
  color: var(--heading-color);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.content .it-cats a.it-cat-name:hover {
  color: var(--it-red-text);
  border-bottom-color: var(--it-red);
}

.it-cat-count {
  position: relative;
  pointer-events: none;
  font-size: 0.8rem;
  color: var(--text-muted-color);
}

.it-cat-bar {
  position: relative;
  pointer-events: none;
  width: 5rem;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.it-cat-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7a0f1c, var(--it-red));
  transform-origin: 0 50%;
  animation: it-grow 0.8s var(--it-ease) both;
  animation-delay: calc(0.25s + var(--i, 0) * 60ms);
}

@keyframes it-grow {
  from { transform: scaleX(0); }
}

.it-cats .category-trigger {
  position: relative;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.it-cats .card-header:hover .category-trigger i {
  color: var(--it-red-text);
}

/* expanded list of posts */
.it-cats .list-group-item {
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  background: transparent;
  border-color: var(--categories-border);
}

.it-cat-post {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.content .it-cats .it-cat-post a {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-color);
  border-bottom: 0;
  transition: color 0.2s ease, transform 0.2s var(--it-ease);
}

.content .it-cats .it-cat-post a:hover {
  color: var(--it-red-text);
}

.it-cat-post time {
  flex: none;
  font-size: 0.78rem;
  color: var(--text-muted-color);
  font-variant-numeric: tabular-nums;
}

.it-cats .collapse.show .it-cat-post,
.it-cats .collapsing .it-cat-post {
  animation: it-rise 0.35s var(--it-ease) both;
}

.it-cats .it-cat-post:nth-child(2) { animation-delay: 0.04s; }
.it-cats .it-cat-post:nth-child(3) { animation-delay: 0.08s; }
.it-cats .it-cat-post:nth-child(4) { animation-delay: 0.12s; }
.it-cats .it-cat-post:nth-child(n+5) { animation-delay: 0.16s; }

.it-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

@media (max-width: 575.98px) {
  .it-cat-bar {
    display: none;
  }

  .it-cats .category-trigger {
    margin-left: auto;
  }

  .it-cat-post {
    flex-direction: column;
    gap: 0;
  }
}

/* 14. Tags: weighted cloud, filter + sort toolbar ============================ */
.it-tag-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.it-tag-search {
  position: relative;
  flex: 1 1 14rem;
  max-width: 20rem;
  margin: 0;
}

.it-tag-search i {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-muted-color);
  pointer-events: none;
}

.it-tag-search input {
  width: 100%;
  padding: 0.4rem 0.9rem 0.4rem 2.1rem;
  border: 1px solid var(--btn-border-color);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-color);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.it-tag-search input:focus {
  outline: none;
  border-color: var(--it-red);
  box-shadow: 0 0 0 3px var(--it-red-faint);
}

.it-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--btn-border-color);
  border-radius: 2rem;
}

.it-seg button {
  padding: 0.25rem 0.8rem;
  border: 0;
  border-radius: 2rem;
  background: transparent;
  color: var(--text-muted-color);
  font-size: 0.85rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.it-seg button:hover {
  color: var(--text-color);
}

.it-seg button[aria-pressed="true"] {
  background: var(--it-red-faint);
  color: var(--it-red-text);
}

.it-seg button:focus-visible {
  outline: 2px solid var(--it-red);
  outline-offset: 1px;
}

#tags {
  align-items: center;
}

.content #tags.mx-xl-2 {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 849px) {
  .it-tag-tools {
    justify-content: center;
  }
}

.content #tags a.tag {
  display: inline-block;
  margin: 0.35rem 0.7rem 0.35rem 0;
  padding: 0.3rem 0.65rem;
  line-height: 1.4;
  color: var(--heading-color);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--btn-border-color) !important;
  box-shadow: none;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease,
    transform 0.25s var(--it-ease);
}

.content #tags a.tag.it-hot {
  border-color: rgba(209, 41, 61, 0.45) !important;
}

.content #tags a.tag:hover {
  transform: translateY(-2px);
}

#tags a.tag span {
  display: inline-block;
  min-width: 1.35em;
  padding: 0 0.35em;
  border-radius: 1em;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  line-height: 1.5;
  color: var(--text-muted-color) !important;
}

#tags.it-anim > div {
  animation: it-pop 0.4s var(--it-ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}

@keyframes it-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
}

.it-tag-empty {
  color: var(--text-muted-color);
  font-size: 0.95rem;
}

/* motion off: keep everything static */
@media (prefers-reduced-motion: reduce) {
  .it-prompt .cmd,
  .it-prompt .cur,
  .it-cats .categories,
  .it-cat-bar > span,
  .it-cats .it-cat-post,
  #tags.it-anim > div {
    animation: none !important;
  }

  .content #tags a.tag:hover {
    transform: none;
  }
}