:root {
  --site-hero-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

body {
  font-family: 'Noto Sans SC', system-ui, sans-serif;
}

.site-brand-handwritten {
  font-family: 'Ma Shan Zheng', 'Segoe Script', 'Brush Script MT', cursive;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.hero-bg {
  background: var(--site-hero-gradient);
}

.home-hero {
  position: relative;
  min-height: 620px;
  padding: 7rem 0 8rem;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(125, 211, 252, 0.38) 0 18rem, transparent 30rem),
    radial-gradient(circle at 82% 12%, rgba(196, 181, 253, 0.28) 0 16rem, transparent 28rem),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #06b6d4 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 78%, transparent 100%);
}

.home-hero__glow {
  position: absolute;
  z-index: -2;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.72;
  pointer-events: none;
}

.home-hero__glow--left {
  left: -8rem;
  bottom: 4rem;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.36), transparent 66%);
}

.home-hero__glow--right {
  right: -7rem;
  top: 6rem;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.28), transparent 64%);
}

.home-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 4rem;
  align-items: center;
}

.home-hero__copy {
  max-width: 720px;
}

.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

.home-hero__title {
  margin-top: 1.5rem;
  font-size: clamp(2.4rem, 5.333vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-shadow: 0 16px 38px rgba(15, 23, 42, 0.28);
}

.home-hero__lead {
  display: grid;
  gap: 0.6rem;
  max-width: 43rem;
  margin-top: 1.45rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.8;
}

.home-hero__lead .site-brand-handwritten {
  color: white;
  font-size: 1.25em;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.home-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.15rem;
  padding: 0.85rem 1.25rem;
  border-radius: 1.25rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.home-hero__button:hover {
  transform: translateY(-3px);
}

.home-hero__button--primary {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.home-hero__button--primary:hover {
  background: white;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.28);
}

.home-hero__button--secondary {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.home-hero__button--secondary:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.18);
}

.home-hero__panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2.25rem;
  padding: 2rem;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.32), transparent 48%);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(22px);
}

.home-hero__panel::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 11rem;
  height: 11rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.home-hero__panel-orbit {
  position: absolute;
  inset: 1.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 1.75rem;
  pointer-events: none;
}

.home-hero__avatar {
  position: relative;
  display: inline-flex;
  width: 5rem;
  height: 5rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.65rem;
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #bae6fd);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.24);
  font-size: 2rem;
}

.home-hero__panel-title {
  position: relative;
  margin-top: 1.35rem;
  font-size: 1.65rem;
  font-weight: 900;
}

.home-hero__panel-text {
  position: relative;
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.home-hero__metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.home-hero__metrics div {
  border-radius: 1.25rem;
  padding: 0.9rem 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}

.home-hero__metrics strong,
.home-hero__metrics span {
  display: block;
}

.home-hero__metrics strong {
  font-size: 1.35rem;
  line-height: 1;
}

.home-hero__metrics span {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.home-quick-entry {
  position: relative;
  z-index: 3;
  margin-top: -5.5rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 2rem;
  padding: 1.3rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.12), transparent 36%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.home-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.35rem 0.35rem 1.15rem;
}

.home-section-kicker {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: rgb(37 99 235);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-section-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.home-section-heading p {
  max-width: 24rem;
  color: rgb(100 116 139);
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: right;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.home-quick-card {
  position: relative;
  display: grid;
  min-height: 12rem;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.55rem;
  padding: 1.15rem;
  overflow: hidden;
  background: white;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.home-quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: linear-gradient(135deg, var(--quick-accent), transparent 62%);
  transition: opacity 0.22s ease;
}

.home-quick-card:hover {
  transform: translateY(-7px);
  border-color: color-mix(in srgb, var(--quick-accent) 42%, white);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.13);
}

.home-quick-card:hover::before {
  opacity: 0.2;
}

.home-quick-card--blue {
  --quick-accent: #2563eb;
}

.home-quick-card--violet {
  --quick-accent: #7c3aed;
}

.home-quick-card--emerald {
  --quick-accent: #059669;
}

.home-quick-card--amber {
  --quick-accent: #d97706;
}

.home-quick-card__icon {
  position: relative;
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.15rem;
  color: white;
  background: var(--quick-accent);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--quick-accent) 30%, transparent);
  font-size: 1.25rem;
}

.home-quick-card__content {
  position: relative;
  display: block;
  align-self: end;
}

.home-quick-card__content strong {
  display: block;
  color: rgb(15 23 42);
  font-size: 1.08rem;
  font-weight: 900;
}

.home-quick-card__content small {
  display: block;
  margin-top: 0.45rem;
  color: rgb(100 116 139);
  font-size: 0.86rem;
  line-height: 1.65;
}

.home-quick-card__arrow {
  position: relative;
  justify-self: end;
  color: var(--quick-accent);
  transition: transform 0.22s ease;
}

.home-quick-card:hover .home-quick-card__arrow {
  transform: translateX(4px);
}

html.dark .home-hero {
  background:
    radial-gradient(circle at 12% 18%, rgba(34, 197, 94, 0.18) 0 18rem, transparent 30rem),
    radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.22) 0 16rem, transparent 28rem),
    linear-gradient(135deg, #020617 0%, #111827 48%, #164e63 100%);
}

html.dark .home-quick-entry {
  border-color: rgba(51, 65, 85, 0.9);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92)),
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.1), transparent 36%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

html.dark .home-section-kicker {
  color: rgb(96 165 250);
}

html.dark .home-section-heading p {
  color: rgb(148 163 184);
}

html.dark .home-quick-card {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgb(15 23 42);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
}

html.dark .home-quick-card::before {
  opacity: 0.18;
}

html.dark .home-quick-card:hover {
  border-color: color-mix(in srgb, var(--quick-accent) 50%, rgb(51 65 85));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

html.dark .home-quick-card__content strong {
  color: rgb(248 250 252);
}

html.dark .home-quick-card__content small {
  color: rgb(148 163 184);
}

.blog-card,
.card,
.site-lift-card {
  transition: all .3s ease;
}

.blog-card:hover,
.card:hover,
.site-lift-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Shared article/content typography */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: .75rem;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

.prose p {
  line-height: 1.9;
  color: rgb(55 65 81);
  margin: .85rem 0;
}

.prose ul {
  margin: .8rem 0;
  padding-left: 1.2rem;
}

.prose li {
  margin: .35rem 0;
  line-height: 1.85;
  color: rgb(55 65 81);
}

.prose a {
  color: rgb(37 99 235);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  background: rgb(243 244 246);
  padding: .15rem .35rem;
  border-radius: .5rem;
  font-size: .9em;
}

.prose pre {
  background: rgb(17 24 39);
  color: rgb(243 244 246);
  padding: 1rem;
  border-radius: 1rem;
  overflow: auto;
  margin: 1rem 0;
}

.prose pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 1rem;
}

th,
td {
  border: 1px solid rgb(229 231 235);
  padding: .75rem .8rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: rgb(249 250 251);
  font-weight: 700;
}

.callout {
  border: 1px solid rgb(229 231 235);
  background: rgb(249 250 251);
  border-radius: 1.25rem;
  padding: 1rem 1.1rem;
}

.callout b {
  color: rgb(17 24 39);
}

details.comment-details > summary {
  list-style: none;
}

details.comment-details > summary::-webkit-details-marker {
  display: none;
}

.moment-actions {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

details.moment-actions-menu {
  position: relative;
}

details.moment-actions-menu > summary {
  list-style: none;
}

details.moment-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.moment-actions-trigger {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(229 231 235);
  border-radius: 999px;
  background: white;
  color: rgb(100 116 139);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  user-select: none;
}

.moment-actions-trigger:hover,
details.moment-actions-menu[open] .moment-actions-trigger {
  border-color: rgb(147 197 253);
  background: rgb(239 246 255);
  color: rgb(37 99 235);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.moment-actions-panel {
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 8rem;
  gap: .15rem;
  padding: .35rem;
  border: 1px solid rgb(229 231 235);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
}

.moment-action-item {
  display: inline-flex;
  width: 100%;
  align-items: center;
  gap: .55rem;
  border-radius: .75rem;
  padding: .55rem .7rem;
  color: rgb(55 65 81);
  font-size: .82rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.moment-action-item--edit:hover {
  background: rgb(239 246 255);
  color: rgb(37 99 235);
}

.moment-action-item--delete:hover,
.moment-action-item--comment-delete:hover {
  background: rgb(254 242 242);
  color: rgb(220 38 38);
}

.moment-comment-delete {
  display: none;
  align-items: center;
  gap: .3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .18rem .5rem;
  color: rgb(148 163 184);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.moment-card--comment-delete-mode .moment-comment-delete {
  display: inline-flex;
}

.moment-comment-delete:hover {
  border-color: rgb(254 202 202);
  background: rgb(254 242 242);
  color: rgb(220 38 38);
}

html.dark .moment-actions-trigger {
  border-color: rgb(75 85 99);
  background: rgb(31 41 55);
  color: rgb(156 163 175);
}

html.dark .moment-actions-trigger:hover,
html.dark details.moment-actions-menu[open] .moment-actions-trigger {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.14);
}

html.dark .moment-actions-panel {
  border-color: rgb(55 65 81);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

html.dark .moment-action-item {
  color: rgb(229 231 235);
}

html.dark .moment-action-item--edit:hover {
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
}

html.dark .moment-action-item--delete:hover,
html.dark .moment-action-item--comment-delete:hover {
  background: rgba(239, 68, 68, 0.12);
  color: rgb(252 165 165);
}

html.dark .moment-comment-delete {
  color: rgb(148 163 184);
}

html.dark .moment-comment-delete:hover {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(239, 68, 68, 0.12);
  color: rgb(252 165 165);
}

.moment-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.22), transparent 28rem),
    radial-gradient(circle at 82% 78%, rgba(14, 165, 233, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(16px);
  animation: moment-dialog-backdrop-in 0.18s ease-out;
}

.moment-dialog-backdrop--closing {
  animation: moment-dialog-backdrop-out 0.14s ease-in forwards;
}

.moment-dialog {
  position: relative;
  width: min(100%, 42rem);
  max-height: min(90vh, 46rem);
  overflow: hidden auto;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 1.8rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.12), transparent 34%);
  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.32),
    0 12px 30px rgba(37, 99, 235, 0.12);
  animation: moment-dialog-in 0.22s cubic-bezier(.2, .8, .2, 1);
}

.moment-dialog--danger {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 247, 0.94)),
    radial-gradient(circle at 12% 0%, rgba(239, 68, 68, 0.13), transparent 34%);
  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.34),
    0 12px 30px rgba(239, 68, 68, 0.13);
}

.moment-dialog__shine {
  position: absolute;
  inset: 0 0 auto;
  height: 0.35rem;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

.moment-dialog--danger .moment-dialog__shine {
  background: linear-gradient(90deg, #ef4444, #f97316, #facc15);
}

.moment-dialog__header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.55rem 1.55rem 1.1rem;
}

.moment-dialog__icon {
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.15rem;
  color: rgb(37 99 235);
  background: linear-gradient(135deg, rgb(219 234 254), rgb(239 246 255));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
  font-size: 1.25rem;
}

.moment-dialog--danger .moment-dialog__icon {
  color: rgb(220 38 38);
  background: linear-gradient(135deg, rgb(254 226 226), rgb(255 247 237));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.16);
}

.moment-dialog__eyebrow {
  display: inline-flex;
  margin-bottom: 0.3rem;
  color: rgb(37 99 235);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.moment-dialog--danger .moment-dialog__eyebrow {
  color: rgb(220 38 38);
}

.moment-dialog__title {
  color: rgb(15 23 42);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.25;
}

.moment-dialog__desc {
  margin-top: 0.45rem;
  color: rgb(100 116 139);
  font-size: 0.92rem;
  line-height: 1.7;
}

.moment-dialog__close {
  display: inline-flex;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(226 232 240);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: rgb(100 116 139);
  transition: background-color .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}

.moment-dialog__close:hover {
  transform: rotate(6deg) scale(1.04);
  border-color: rgb(191 219 254);
  background: rgb(239 246 255);
  color: rgb(37 99 235);
}

.moment-dialog__form {
  display: grid;
  gap: 1rem;
  padding: 0 1.55rem 1.55rem;
}

.moment-dialog__field {
  display: grid;
  gap: 0.45rem;
}

.moment-dialog__label {
  color: rgb(51 65 85);
  font-size: 0.86rem;
  font-weight: 800;
}

.moment-dialog__control {
  width: 100%;
  border: 1px solid rgb(226 232 240);
  border-radius: 1rem;
  padding: 0.78rem 0.95rem;
  background: rgba(255, 255, 255, 0.86);
  color: rgb(15 23 42);
  font-size: 0.95rem;
  line-height: 1.65;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

textarea.moment-dialog__control {
  resize: vertical;
  min-height: 7rem;
}

.moment-dialog__control:focus {
  outline: none;
  border-color: rgb(96 165 250);
  background: white;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.moment-dialog__help {
  color: rgb(100 116 139);
  font-size: 0.78rem;
  line-height: 1.6;
}

.moment-dialog__preview {
  border: 1px solid rgb(254 202 202);
  border-radius: 1.1rem;
  padding: 0.9rem 1rem;
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 247, 237, 0.9));
  color: rgb(127 29 29);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.moment-dialog__error {
  min-height: 1.25rem;
  color: rgb(220 38 38);
  font-size: 0.84rem;
  font-weight: 700;
}

.moment-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.2rem;
}

.moment-dialog__btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1rem;
  padding: 0.72rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.moment-dialog__btn:hover {
  transform: translateY(-2px);
}

.moment-dialog__btn--ghost {
  border: 1px solid rgb(226 232 240);
  background: white;
  color: rgb(71 85 105);
}

.moment-dialog__btn--ghost:hover {
  border-color: rgb(203 213 225);
  background: rgb(248 250 252);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.moment-dialog__btn--primary {
  border: 1px solid rgb(37 99 235);
  background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
  color: white;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.moment-dialog__btn--primary:hover {
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

.moment-dialog--danger .moment-dialog__btn--primary {
  border-color: rgb(220 38 38);
  background: linear-gradient(135deg, rgb(220 38 38), rgb(249 115 22));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.24);
}

.moment-dialog--danger .moment-dialog__btn--primary:hover {
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.3);
}

html.dark .moment-dialog-backdrop {
  background:
    radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.16), transparent 28rem),
    radial-gradient(circle at 82% 78%, rgba(34, 197, 94, 0.1), transparent 26rem),
    rgba(2, 6, 23, 0.68);
}

html.dark .moment-dialog {
  border-color: rgba(51, 65, 85, 0.95);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94)),
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.16), transparent 34%);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.58),
    0 12px 30px rgba(59, 130, 246, 0.1);
}

html.dark .moment-dialog--danger {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(31, 20, 24, 0.96)),
    radial-gradient(circle at 12% 0%, rgba(239, 68, 68, 0.15), transparent 34%);
}

html.dark .moment-dialog__icon {
  color: rgb(147 197 253);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(14, 165, 233, 0.12));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

html.dark .moment-dialog--danger .moment-dialog__icon {
  color: rgb(252 165 165);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(249, 115, 22, 0.1));
}

html.dark .moment-dialog__eyebrow {
  color: rgb(147 197 253);
}

html.dark .moment-dialog--danger .moment-dialog__eyebrow {
  color: rgb(252 165 165);
}

html.dark .moment-dialog__title {
  color: rgb(248 250 252);
}

html.dark .moment-dialog__desc,
html.dark .moment-dialog__help {
  color: rgb(148 163 184);
}

html.dark .moment-dialog__close {
  border-color: rgb(51 65 85);
  background: rgba(15, 23, 42, 0.76);
  color: rgb(148 163 184);
}

html.dark .moment-dialog__close:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
}

html.dark .moment-dialog__label {
  color: rgb(226 232 240);
}

html.dark .moment-dialog__control {
  border-color: rgb(51 65 85);
  background: rgba(15, 23, 42, 0.86);
  color: rgb(248 250 252);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .moment-dialog__control:focus {
  border-color: rgb(96 165 250);
  background: rgb(15 23 42);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

html.dark .moment-dialog__preview {
  border-color: rgba(248, 113, 113, 0.34);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.2), rgba(124, 45, 18, 0.14));
  color: rgb(254 202 202);
}

html.dark .moment-dialog__btn--ghost {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
  color: rgb(226 232 240);
}

html.dark .moment-dialog__btn--ghost:hover {
  border-color: rgb(71 85 105);
  background: rgb(30 41 59);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

@keyframes moment-dialog-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes moment-dialog-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes moment-dialog-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .95rem;
  border-radius: 1rem;
  font-size: .875rem;
  font-weight: 600;
  border: 1px solid rgb(229 231 235);
  background: white;
  color: rgb(55 65 81);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  user-select: none;
}

.tag-btn:hover {
  background: rgb(249 250 251);
}

.tag-btn.active {
  background: rgb(37 99 235);
  color: white;
  border-color: rgb(37 99 235);
}

.tag-count {
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: rgb(243 244 246);
  color: rgb(55 65 81);
}

.tag-btn.active .tag-count {
  background: rgba(255, 255, 255, .2);
  color: white;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: rgb(243 244 246);
  color: rgb(55 65 81);
}

html.dark body {
  background-color: rgb(17 24 39);
  color: rgb(243 244 246);
}

/* Dark compatibility layer for legacy Tailwind utility classes (no !important) */
html.dark .bg-white {
  background-color: rgb(31 41 55);
}

html.dark .bg-gray-50 {
  background-color: rgb(17 24 39);
}

html.dark .bg-gray-100 {
  background-color: rgb(55 65 81);
}

html.dark .text-gray-800 {
  color: rgb(243 244 246);
}

html.dark .text-gray-700 {
  color: rgb(229 231 235);
}

html.dark .text-gray-600 {
  color: rgb(209 213 219);
}

html.dark .text-gray-500 {
  color: rgb(156 163 175);
}

html.dark .text-gray-400 {
  color: rgb(156 163 175);
}

html.dark .text-gray-300 {
  color: rgb(107 114 128);
}

html.dark .border-gray-200,
html.dark .border-t {
  border-color: rgb(55 65 81);
}

html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover {
  background-color: rgb(55 65 81);
}

html.dark input,
html.dark textarea,
html.dark select {
  background-color: rgb(17 24 39);
  color: rgb(243 244 246);
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: rgb(156 163 175);
}

.card {
  background: white;
  border: 1px solid rgb(229 231 235);
}

html.dark .card {
  background: rgb(31 41 55);
  border-color: rgb(55 65 81);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  border-radius: .75rem;
  background: rgb(37 99 235);
  color: white;
  font-size: .875rem;
  font-weight: 600;
  transition: background-color .2s ease;
}

.btn-primary:hover {
  background: rgb(29 78 216);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: .75rem;
  border: 1px solid rgb(229 231 235);
  background: white;
  color: rgb(55 65 81);
  font-size: .875rem;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn-ghost:hover {
  background: rgb(249 250 251);
}

html.dark .btn-ghost {
  background: rgb(31 41 55);
  color: rgb(229 231 235);
  border-color: rgb(75 85 99);
}

html.dark .btn-ghost:hover {
  background: rgb(55 65 81);
}

.input-field {
  width: 100%;
  border: 1px solid rgb(229 231 235);
  border-radius: .75rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  background: white;
  color: rgb(31 41 55);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.input-field:focus {
  outline: none;
  border-color: rgb(147 197 253);
  box-shadow: 0 0 0 3px rgb(59 130 246 / .15);
}

.input-field::placeholder {
  color: rgb(156 163 175);
}

html.dark .input-field {
  background: rgb(17 24 39);
  color: rgb(243 244 246);
  border-color: rgb(75 85 99);
}

html.dark .input-field::placeholder {
  color: rgb(156 163 175);
}

html.dark .tag-btn {
  background: rgb(31 41 55);
  color: rgb(229 231 235);
  border-color: rgb(55 65 81);
}

html.dark .tag-btn:hover {
  background: rgb(55 65 81);
}

html.dark .tag-btn.active {
  background: rgb(37 99 235);
  border-color: rgb(37 99 235);
  color: white;
}

html.dark .tag-count {
  background: rgb(17 24 39);
  color: rgb(209 213 219);
}

html.dark .pill {
  background: rgb(17 24 39);
  color: rgb(209 213 219);
}

html.dark .prose p,
html.dark .prose li {
  color: rgb(229 231 235);
}

html.dark .prose code {
  background: rgb(17 24 39);
  color: rgb(229 231 235);
}

html.dark th,
html.dark td {
  border-color: rgb(55 65 81);
}

html.dark th {
  background: rgb(17 24 39);
}

html.dark .callout {
  background: rgb(17 24 39);
  border-color: rgb(55 65 81);
}

html.dark .callout b {
  color: rgb(243 244 246);
}

html.dark {
  --site-hero-gradient: linear-gradient(to right, rgba(0,0,0,0.9), #3b82f6);
}

/* Feathered transitions between sections */
.nav-feather {
  position: relative;
}

.nav-feather::after {
  display: none;
  content: none;
}

html.dark .nav-feather::after {
  display: none;
  content: none;
}

.site-top-nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 80;
}

.site-nav-desktop-links {
  gap: 2rem;
}

.site-nav-status {
  position: relative;
  display: inline-flex;
  max-width: min(36vw, 23rem);
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 999px;
  padding: 0.34rem 0.58rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.95), transparent 30%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(224, 242, 254, 0.82));
  color: rgb(29 78 216);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    0 12px 28px rgba(37, 99, 235, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.site-nav-status::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.78) 42%, transparent 70%);
  transform: translateX(-120%);
  animation: site-nav-status-shine 6s ease-in-out infinite;
  pointer-events: none;
}

.site-nav-status__item {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.32rem;
}

.site-nav-status__item i {
  color: rgb(14 165 233);
  font-size: 0.82rem;
  filter: drop-shadow(0 3px 6px rgba(14, 165, 233, 0.18));
}

.site-nav-status__item [data-nav-date],
.site-nav-status__item [data-nav-weather] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav-status__divider {
  position: relative;
  z-index: 1;
  width: 1px;
  height: 0.9rem;
  flex: 0 0 auto;
  background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.34), transparent);
}

html.dark .site-nav-status {
  border-color: rgba(74, 222, 128, 0.28);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
  color: rgb(187 247 208);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html.dark .site-nav-status::before {
  opacity: 0.28;
  background: linear-gradient(120deg, transparent 0%, rgba(74, 222, 128, 0.18) 42%, transparent 70%);
}

html.dark .site-nav-status__item i {
  color: rgb(74 222 128);
  filter: drop-shadow(0 3px 8px rgba(34, 197, 94, 0.18));
}

html.dark .site-nav-status__divider {
  background: linear-gradient(to bottom, transparent, rgba(74, 222, 128, 0.32), transparent);
}

@keyframes site-nav-status-shine {
  0%, 38% {
    transform: translateX(-120%);
  }
  56%, 100% {
    transform: translateX(120%);
  }
}

.site-mobile-nav-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.92);
  border-radius: 1.75rem;
  padding: 0.95rem;
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.18), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(34, 197, 94, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.9));
  box-shadow:
    0 24px 58px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
}

.site-mobile-nav-card::before,
.site-mobile-nav-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
}

.site-mobile-nav-card::before {
  top: -5.5rem;
  right: -4rem;
  width: 12rem;
  height: 12rem;
  background: rgba(59, 130, 246, 0.14);
}

.site-mobile-nav-card::after {
  left: -4.5rem;
  bottom: -5.5rem;
  width: 11rem;
  height: 11rem;
  background: rgba(34, 197, 94, 0.11);
}

#mobile-nav-panel:not(.hidden) .site-mobile-nav-card {
  animation: site-mobile-nav-in 0.22s cubic-bezier(.2, .8, .2, 1);
}

.site-mobile-nav-card > * {
  position: relative;
  z-index: 1;
}

.site-mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0.15rem 0.75rem;
}

.site-mobile-nav-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgb(37 99 235);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-mobile-nav-head p {
  margin-top: 0.18rem;
  color: rgb(100 116 139);
  font-size: 0.84rem;
  font-weight: 700;
}

.site-mobile-nav-head__spark {
  display: inline-flex;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  border-radius: 0.95rem;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), transparent 16%),
    linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.site-mobile-nav-tool {
  margin-bottom: 0.75rem;
}

.site-mobile-nav-tool .site-tool-center-link {
  width: 100%;
  justify-content: center;
  border-radius: 1.15rem;
  padding: 0.82rem 1rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

.site-mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.site-mobile-nav-link {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 3.72rem;
  align-items: center;
  gap: 0.72rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 1.25rem;
  padding: 0.72rem 0.78rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.74));
  color: rgb(51 65 85);
  font-size: 0.92rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.site-mobile-nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.86), rgba(255, 255, 255, 0.72));
  transition: opacity 0.2s ease;
}

.site-mobile-nav-link > * {
  position: relative;
  z-index: 1;
}

.site-mobile-nav-link__icon {
  display: inline-flex;
  width: 2.28rem;
  height: 2.28rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.92rem;
  background: rgb(239 246 255);
  color: rgb(37 99 235);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.site-mobile-nav-link__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-mobile-nav-link__arrow {
  color: rgb(148 163 184);
  font-size: 0.78rem;
  opacity: 0.72;
  transform: translateX(-3px);
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.site-mobile-nav-link__current {
  border-radius: 999px;
  padding: 0.18rem 0.46rem;
  background: rgba(255, 255, 255, 0.22);
  color: currentColor;
  font-size: 0.68rem;
  font-weight: 900;
}

.site-mobile-nav-link:hover {
  transform: translateY(-3px);
  border-color: rgba(147, 197, 253, 0.9);
  color: rgb(37 99 235);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.12);
}

.site-mobile-nav-link:hover::before {
  opacity: 1;
}

.site-mobile-nav-link:hover .site-mobile-nav-link__icon {
  transform: scale(1.05);
}

.site-mobile-nav-link:hover .site-mobile-nav-link__arrow {
  color: rgb(37 99 235);
  opacity: 1;
  transform: translateX(0);
}

.site-mobile-nav-link.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
  color: white;
  box-shadow:
    0 18px 36px rgba(37, 99, 235, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.site-mobile-nav-link.is-active::before {
  opacity: 0;
}

.site-mobile-nav-link.is-active .site-mobile-nav-link__icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.site-mobile-theme-toggle {
  display: flex;
  width: 100%;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 1.25rem;
  padding: 0.76rem 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.72));
  color: rgb(51 65 85);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.site-mobile-theme-toggle__icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.86rem;
  background: rgb(241 245 249);
  color: rgb(37 99 235);
}

.site-mobile-theme-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.9);
  background: rgb(239 246 255);
  color: rgb(37 99 235);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.1);
}

html.dark .site-mobile-nav-card {
  border-color: rgba(51, 65, 85, 0.95);
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.16), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(34, 197, 94, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9));
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.dark .site-mobile-nav-card::before {
  background: rgba(59, 130, 246, 0.13);
}

html.dark .site-mobile-nav-card::after {
  background: rgba(34, 197, 94, 0.09);
}

html.dark .site-mobile-nav-head__eyebrow,
html.dark .site-mobile-nav-link:hover,
html.dark .site-mobile-theme-toggle:hover {
  color: rgb(147 197 253);
}

html.dark .site-mobile-nav-head p {
  color: rgb(148 163 184);
}

html.dark .site-mobile-nav-link,
html.dark .site-mobile-theme-toggle {
  border-color: rgba(51, 65, 85, 0.95);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.68));
  color: rgb(226 232 240);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

html.dark .site-mobile-nav-link::before {
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(15, 23, 42, 0.72));
}

html.dark .site-mobile-nav-link__icon,
html.dark .site-mobile-theme-toggle__icon {
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
  box-shadow: none;
}

html.dark .site-mobile-nav-link__arrow {
  color: rgb(100 116 139);
}

html.dark .site-mobile-nav-link:hover {
  border-color: rgba(96, 165, 250, 0.52);
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.12);
}

html.dark .site-mobile-nav-link:hover .site-mobile-nav-link__arrow {
  color: rgb(147 197 253);
}

html.dark .site-mobile-nav-link.is-active {
  border-color: rgba(96, 165, 250, 0.2);
  background: linear-gradient(135deg, rgb(29 78 216), rgb(14 116 144));
  color: white;
  box-shadow:
    0 18px 38px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html.dark .site-mobile-nav-link.is-active .site-mobile-nav-link__icon {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

html.dark .site-mobile-theme-toggle:hover {
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(59, 130, 246, 0.14);
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.1);
}

@keyframes site-mobile-nav-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#floating-dog {
  position: fixed;
  left: calc(100vw - 90px);
  top: calc(100vh - 72px);
  z-index: 90;
  width: 61px;
  height: 39px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.16));
  transition: filter 0.2s ease, transform 0.2s ease;
}

#floating-dog.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.22));
  transform: scale(1.06);
}

#floating-dog .floating-eyes-shell {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

#floating-dog .floating-eye {
  position: absolute;
  top: 9px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff 0 10%, transparent 11%),
    linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #111827;
  overflow: hidden;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    0 3px 6px rgba(15, 23, 42, 0.12);
}

#floating-dog .floating-eye.left {
  left: 10px;
}

#floating-dog .floating-eye.right {
  right: 10px;
}

#floating-dog .floating-pupil {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111827;
  transform: translate(var(--pupil-x, 0px), var(--pupil-y, 0px));
  transition: transform 0.045s linear;
}

#floating-dog .floating-pupil::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #ffffff;
}

.hero-feather {
  position: relative;
  overflow: hidden;
}

.hero-feather::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0.7) 30%, rgba(255,255,255,0.3) 60%, transparent);
  pointer-events: none;
  z-index: 51;
}

html.dark .hero-feather::before {
  background: linear-gradient(to bottom, rgba(31,41,55,1) 0%, rgba(31,41,55,0.7) 30%, rgba(31,41,55,0.3) 60%, transparent);
}

.hero-feather::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent 0%, rgba(249,250,251,0.1) 20%, rgba(249,250,251,0.3) 40%, rgba(249,250,251,0.5) 60%, rgba(249,250,251,0.8) 80%, rgba(249,250,251,1) 100%);
  pointer-events: none;
  z-index: 51;
}

html.dark .hero-feather::after {
  background: linear-gradient(to bottom, transparent 0%, rgba(17,24,39,0.1) 20%, rgba(17,24,39,0.3) 40%, rgba(17,24,39,0.5) 60%, rgba(17,24,39,0.8) 80%, rgba(17,24,39,1) 100%);
}

html.dark #top-nav a[href="/index.html"] .text-blue-600 {
  color: rgb(34 197 94);
}

html.dark #top-nav a[href="/index.html"] .text-blue-700 {
  color: rgb(22 163 74);
}

.article-toc {
  overflow: auto;
  max-height: min(70vh, 40rem);
  padding-right: 0.35rem;
  overscroll-behavior: contain;
}

.article-toc > * {
  min-width: max-content;
}

.article-toc::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.article-toc::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.75);
  border-radius: 999px;
}

.article-toc::-webkit-scrollbar-track {
  background: transparent;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

pre,
code,
table {
  max-width: 100%;
}

@media (hover: none) {
  .blog-card:hover,
  .card:hover,
  .site-lift-card:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    -webkit-text-size-adjust: 100%;
  }

  .nav-feather::after {
    display: none;
    content: none;
  }

  .hero-feather::before {
    height: 48px;
  }

  .hero-feather::after {
    height: 72px;
  }

  .tag-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8125rem;
  }

  .tag-count,
  .pill {
    font-size: 0.6875rem;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .input-field {
    font-size: 16px;
  }

  #top-nav .site-brand-handwritten {
    letter-spacing: 0.02em;
  }

  #top-nav a,
  #top-nav button {
    touch-action: manipulation;
  }

  .site-nav-status {
    max-width: min(52vw, 13.5rem);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.22rem;
    border-radius: 1rem;
    padding: 0.42rem 0.58rem;
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .site-nav-status__item {
    width: 100%;
    gap: 0.28rem;
  }

  .site-nav-status__item i {
    width: 0.82rem;
    flex: 0 0 auto;
    font-size: 0.72rem;
    text-align: center;
  }

  .site-nav-status__divider {
    display: none;
  }

  #site-footer .max-w-6xl,
  #top-nav .max-w-6xl,
  header .max-w-6xl,
  header .max-w-7xl,
  main.max-w-6xl,
  main.max-w-7xl,
  main.max-w-\[1500px\] {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  header.hero-bg {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  main {
    overflow-x: hidden;
  }

  .prose,
  .prose p,
  .prose li,
  .prose h1,
  .prose h2,
  .prose h3,
  .prose h4 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .prose h2 {
    font-size: 1.35rem;
  }

  .prose h3 {
    font-size: 1.1rem;
  }

  .prose pre {
    padding: 0.875rem;
    border-radius: 0.875rem;
    font-size: 0.8125rem;
  }

  .prose table,
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .article-toc {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .article-toc > * {
    min-width: 0;
  }

  .article-toc a {
    white-space: normal !important;
    width: auto !important;
    min-width: 0 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .callout {
    padding: 0.875rem 1rem;
    border-radius: 1rem;
  }

  .site-mobile-nav-card {
    border-radius: 1.45rem;
    padding: 0.78rem;
  }

  .site-mobile-nav-grid {
    gap: 0.58rem;
  }

  .site-mobile-nav-link {
    min-height: 3.35rem;
    gap: 0.55rem;
    border-radius: 1.05rem;
    padding: 0.62rem 0.66rem;
    font-size: 0.86rem;
  }

  .site-mobile-nav-link__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.8rem;
  }

  .site-mobile-nav-link__current {
    display: none;
  }

  .site-mobile-theme-toggle {
    border-radius: 1.05rem;
  }
}

@media (max-width: 900px) {
  .home-hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .home-hero__copy {
    max-width: none;
    min-width: 0;
  }

  .home-hero__panel {
    width: min(100%, 34rem);
  }

  .home-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-hero.hero-bg {
    min-height: auto;
    padding-top: 5.5rem !important;
    padding-bottom: 6.25rem !important;
  }

  .home-hero__inner {
    gap: 1.6rem;
  }

  .home-hero__eyebrow {
    max-width: 100%;
    border-radius: 1.25rem;
    white-space: normal;
    line-height: 1.45;
  }

  .home-hero__title {
    margin-top: 1.15rem;
    max-width: 100%;
    font-size: clamp(2.15rem, 11vw, 3.15rem);
    line-height: 1.02;
    letter-spacing: 0.01em;
  }

  .home-hero__title .site-brand-handwritten {
    display: block;
    width: 100%;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .home-hero__title-sub {
    display: block;
    margin-top: 0.72rem;
    font-family: 'Noto Sans SC', system-ui, sans-serif;
    font-size: clamp(1.25rem, 6vw, 1.7rem);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .home-hero__lead {
    margin-top: 1.1rem;
    font-size: 1rem;
    line-height: 1.75;
  }

  .home-hero__lead .site-brand-handwritten {
    white-space: nowrap;
  }

  .home-hero__actions {
    gap: 0.75rem;
    margin-top: 1.45rem;
  }

  .home-hero__button {
    width: 100%;
    min-height: 3rem;
    border-radius: 1.05rem;
  }

  .home-hero__chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 1rem;
  }

  .home-hero__chips span {
    width: 100%;
    justify-content: center;
  }

  .home-hero__panel {
    display: none;
  }

  .home-quick-entry {
    margin-top: -3.8rem;
    border-radius: 1.45rem;
    padding: 1rem;
  }

  .home-section-heading {
    display: block;
    padding-bottom: 0.95rem;
  }

  .home-section-heading p {
    margin-top: 0.65rem;
    max-width: none;
    text-align: left;
  }

  .home-quick-grid {
    grid-template-columns: 1fr;
  }

  #floating-dog {
    width: 52px;
    height: 33px;
    left: calc(100vw - 70px);
    top: calc(100vh - 59px);
    transform-origin: center;
    transform: scale(0.92);
  }

  #floating-dog.dragging {
    transform: scale(0.98);
  }

  #floating-dog .floating-eye {
    top: 7px;
    width: 16px;
    height: 16px;
  }

  #floating-dog .floating-eye.left {
    left: 9px;
  }

  #floating-dog .floating-eye.right {
    right: 9px;
  }

  #floating-dog .floating-pupil {
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
  }
}

/* =========================================================
   Index dynamic moments cards
   首页动态卡片美化：世界动态 / 国内动态 / tuny动态
   ========================================================= */

#world-posts,
#china-posts,
#posts {
  position: relative;
  isolation: isolate;
}

#world-posts::before,
#china-posts::before,
#posts::before {
  content: "";
  position: absolute;
  inset: 2.5rem -2rem auto;
  z-index: -1;
  height: 10rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(59, 130, 246, 0.1), transparent 42%),
    radial-gradient(circle at 78% 50%, rgba(14, 165, 233, 0.08), transparent 44%);
  filter: blur(12px);
  pointer-events: none;
}

#world-posts > .flex,
#china-posts > .flex,
#posts > .flex {
  position: relative;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 1.6rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.12), transparent 34%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(16px);
}

#world-posts h3,
#china-posts h3,
#posts h3 {
  letter-spacing: 0.02em;
}

.home-moments-header {
  flex-wrap: wrap;
}

.home-moments-header__title {
  min-width: min(100%, 15rem);
}

.moments-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(10rem, 1fr) auto;
  width: min(100%, 28rem);
  min-height: 2.85rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(191, 219, 254, 0.84);
  border-radius: 999px;
  padding: 0.18rem 0.42rem 0.18rem 0.82rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72));
  box-shadow:
    0 14px 30px rgba(37, 99, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.moments-search:focus-within {
  border-color: rgb(96 165 250);
  background: white;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    0 16px 34px rgba(37, 99, 235, 0.12);
}

.moments-search__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(96 165 250);
  cursor: text;
}

.moments-search__input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgb(15 23 42);
  font-size: 0.9rem;
  font-weight: 700;
  outline: none;
}

.moments-search__input::placeholder {
  color: rgb(148 163 184);
  font-weight: 600;
}

.moments-search__clear {
  display: inline-flex;
  width: 2.15rem;
  height: 2.15rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.78);
  color: rgb(37 99 235);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.moments-search__clear:hover {
  transform: scale(1.05);
  background: rgb(37 99 235);
  color: white;
}

.moments-search__clear[hidden] {
  display: none;
}

.moments-empty {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-style: dashed !important;
}

.moments-empty__icon {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 1.1rem;
  background: rgba(219, 234, 254, 0.82);
  color: rgb(37 99 235);
  font-size: 1.1rem;
}

.moments-empty strong {
  display: block;
  color: rgb(15 23 42);
  font-weight: 900;
}

.moments-empty p {
  margin-top: 0.25rem;
  color: rgb(100 116 139);
  font-size: 0.92rem;
}

#world-moment-status,
#china-moment-status,
#moments-status {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid rgba(191, 219, 254, 0.84);
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  background: rgba(239, 246, 255, 0.76);
  color: rgb(37 99 235);
  font-weight: 800;
  white-space: nowrap;
}

#world-moment-status::before,
#china-moment-status::before,
#moments-status::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: rgb(34 197 94);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42);
  animation: index-moment-status-pulse 1.8s ease-out infinite;
}

#world-moments,
#china-moments,
#moments {
  position: relative;
}

#world-moments .card,
#china-moments .card,
#moments .card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 1.85rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.82)),
    radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.12), transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.09), transparent 32%);
  box-shadow:
    0 22px 56px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transform: translateZ(0);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
}

#world-moments .card::before,
#china-moments .card::before,
#moments .card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.5) 42%,
      transparent 70%
    );
  transform: translateX(-130%);
  transition: transform 0.78s ease;
}

#world-moments .card::after,
#china-moments .card::after,
#moments .card::after {
  content: "";
  position: absolute;
  top: -5rem;
  right: -5rem;
  z-index: 0;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(59, 130, 246, 0.14), rgba(14, 165, 233, 0.05) 48%, transparent 70%);
  pointer-events: none;
}

#world-moments .card > *,
#china-moments .card > *,
#moments .card > * {
  position: relative;
  z-index: 1;
}

#world-moments .card:hover,
#china-moments .card:hover,
#moments .card:hover {
  transform: translateY(-7px);
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow:
    0 30px 78px rgba(15, 23, 42, 0.14),
    0 14px 32px rgba(37, 99, 235, 0.12);
}

#world-moments .card:hover::before,
#china-moments .card:hover::before,
#moments .card:hover::before {
  transform: translateX(130%);
}

#world-moments .blog-card h4,
#china-moments .blog-card h4 {
  letter-spacing: -0.01em;
  line-height: 1.45;
}

#world-moments .blog-card p,
#china-moments .blog-card p,
#moments .blog-card p {
  font-size: 0.98rem;
}

#world-moments .card .rounded-2xl,
#china-moments .card .rounded-2xl {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

#world-moments .card section.rounded-2xl:hover,
#china-moments .card section.rounded-2xl:hover,
#world-moments .card article.rounded-2xl:hover,
#china-moments .card article.rounded-2xl:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
}

#world-moments .pill,
#china-moments .pill,
#moments .pill {
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: rgba(239, 246, 255, 0.88);
  color: rgb(37 99 235);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#world-moments .btn-ghost,
#china-moments .btn-ghost,
#moments .btn-ghost {
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

#world-moments .btn-ghost:hover,
#china-moments .btn-ghost:hover,
#moments .btn-ghost:hover {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgb(239 246 255);
  color: rgb(37 99 235);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.1);
}

#moments .moment-img {
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.28s ease,
    filter 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

#moments .moment-img:hover {
  transform: scale(1.018);
  border-color: rgba(96, 165, 250, 0.62);
  filter: saturate(1.08) contrast(1.03);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
}

#moments .card:has(.moment-video) {
  transform: none;
  backface-visibility: visible;
}

#moments .card:has(.moment-video):hover {
  transform: none;
}

#moments .card:has(.moment-video)::before {
  display: none;
}

#moments .moment-video-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 1rem;
  background: #000;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
}

#moments .moment-video {
  display: block;
  width: 100%;
  max-height: 560px;
  aspect-ratio: 16 / 9;
  border-radius: inherit;
  background: #000;
  object-fit: contain;
  transform: none;
  backface-visibility: visible;
}

#moments .moment-video-hint {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  background: rgba(15, 23, 42, 0.92);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.55;
}

#moments .moment-video-hint span {
  flex: 1 1 18rem;
}

#moments .moment-video-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: rgba(37, 99, 235, 0.9);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#moments .moment-video-open-link:hover {
  transform: translateY(-1px);
  border-color: rgba(191, 219, 254, 0.75);
  background: rgb(29 78 216);
}

#moments .moment-video-shell--audio-only .moment-video {
  aspect-ratio: auto;
  min-height: 4.2rem;
  max-height: none;
}

#moments .moment-video-shell--audio-only .moment-video-hint {
  display: flex;
}

#moments .comment-details summary {
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248, 250, 252, 0.76);
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

#moments .comment-details[open] summary,
#moments .comment-details summary:hover {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgb(239 246 255);
  color: rgb(37 99 235);
}

#moments form input,
#moments form textarea {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

#moments form input:focus,
#moments form textarea:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

#moments .moment-actions-trigger {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

#moments .moment-actions-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.15);
}

/* Dark mode */
html.dark #world-posts::before,
html.dark #china-posts::before,
html.dark #posts::before {
  background:
    radial-gradient(circle at 18% 50%, rgba(59, 130, 246, 0.12), transparent 42%),
    radial-gradient(circle at 78% 50%, rgba(34, 197, 94, 0.08), transparent 44%);
}

html.dark #world-posts > .flex,
html.dark #china-posts > .flex,
html.dark #posts > .flex {
  border-color: rgba(51, 65, 85, 0.92);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.14), transparent 34%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

html.dark #world-moment-status,
html.dark #china-moment-status,
html.dark #moments-status {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(59, 130, 246, 0.13);
  color: rgb(147 197 253);
}

html.dark .moments-search {
  border-color: rgba(96, 165, 250, 0.32);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.74));
  box-shadow: none;
}

html.dark .moments-search:focus-within {
  border-color: rgb(96 165 250);
  background: rgb(15 23 42);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

html.dark .moments-search__input {
  color: rgb(248 250 252);
}

html.dark .moments-search__clear {
  background: rgba(59, 130, 246, 0.16);
  color: rgb(147 197 253);
}

html.dark .moments-search__clear:hover {
  background: rgb(37 99 235);
  color: white;
}

html.dark .moments-empty__icon {
  background: rgba(59, 130, 246, 0.16);
  color: rgb(147 197 253);
}

html.dark .moments-empty strong {
  color: rgb(248 250 252);
}

html.dark .moments-empty p {
  color: rgb(148 163 184);
}

html.dark #world-moments .card,
html.dark #china-moments .card,
html.dark #moments .card {
  border-color: rgba(51, 65, 85, 0.92);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82)),
    radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.15), transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.08), transparent 32%);
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.dark #world-moments .card::before,
html.dark #china-moments .card::before,
html.dark #moments .card::before {
  background:
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.08) 42%,
      transparent 70%
    );
}

html.dark #world-moments .card::after,
html.dark #china-moments .card::after,
html.dark #moments .card::after {
  background:
    radial-gradient(circle, rgba(96, 165, 250, 0.14), rgba(34, 197, 94, 0.05) 48%, transparent 70%);
}

html.dark #world-moments .card:hover,
html.dark #china-moments .card:hover,
html.dark #moments .card:hover {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow:
    0 30px 78px rgba(0, 0, 0, 0.42),
    0 12px 28px rgba(59, 130, 246, 0.14);
}

html.dark #world-moments .pill,
html.dark #china-moments .pill,
html.dark #moments .pill {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
  box-shadow: none;
}

html.dark #world-moments .btn-ghost:hover,
html.dark #china-moments .btn-ghost:hover,
html.dark #moments .btn-ghost:hover {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
}

html.dark #moments .moment-img {
  border-color: rgba(51, 65, 85, 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

html.dark #moments .moment-img:hover {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.4);
}

html.dark #moments .moment-video-shell {
  border-color: rgba(51, 65, 85, 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

html.dark #moments .moment-video-hint {
  background: rgba(2, 6, 23, 0.94);
  color: rgb(226 232 240);
}

html.dark #moments .comment-details summary {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: none;
}

html.dark #moments .comment-details[open] summary,
html.dark #moments .comment-details summary:hover {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
}

html.dark #moments .moment-actions-panel {
  border-color: rgba(51, 65, 85, 0.95);
}

/* Reduced motion / touch device compatibility */
@media (prefers-reduced-motion: reduce) {
  #world-moment-status::before,
  #china-moment-status::before,
  #moments-status::before {
    animation: none;
  }

  #world-moments .card,
  #china-moments .card,
  #moments .card,
  #moments .moment-img {
    transition: none;
  }

  .site-nav-status::before {
    animation: none;
  }
}

@media (hover: none) {
  #world-moments .card:hover,
  #china-moments .card:hover,
  #moments .card:hover,
  #world-moments .card section.rounded-2xl:hover,
  #china-moments .card section.rounded-2xl:hover,
  #world-moments .card article.rounded-2xl:hover,
  #china-moments .card article.rounded-2xl:hover,
  #moments .moment-img:hover {
    transform: none;
  }
}

@media (max-width: 767px) {
  #world-posts > .flex,
  #china-posts > .flex,
  #posts > .flex {
    display: grid;
    gap: 0.85rem;
    align-items: start;
    padding: 1rem 1rem 1rem 1.15rem;
    border-radius: 1.35rem;
  }

  #world-moment-status,
  #china-moment-status,
  #moments-status {
    width: fit-content;
    white-space: normal;
  }

  .moments-search {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-radius: 1.15rem;
  }

  .moments-empty {
    display: grid;
    text-align: left;
  }

  #world-moments .card,
  #china-moments .card,
  #moments .card {
    border-radius: 1.45rem;
  }

  #moments .card:has(details.moment-actions-menu[open]) {
    overflow: visible;
    z-index: 30;
  }

  #moments details.moment-actions-menu[open] {
    z-index: 60;
  }

  #moments .moment-actions-panel {
    left: 0;
    right: auto;
    max-width: calc(100vw - 2rem);
  }

  #world-moments .card:hover,
  #china-moments .card:hover,
  #moments .card:hover {
    transform: translateY(-3px);
  }

  #moments .card:has(.moment-video),
  #moments .card:has(.moment-video):hover {
    transform: none;
  }
}

@keyframes index-moment-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42);
  }
  70% {
    box-shadow: 0 0 0 0.42rem rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Articles page */
.articles-page {
      position: relative;
      min-height: 100vh;
      background:
        radial-gradient(circle at 8% 12%, rgba(59, 130, 246, 0.12), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(14, 165, 233, 0.1), transparent 26rem),
        linear-gradient(180deg, rgb(248 250 252), rgb(241 245 249));
    }

    .articles-hero {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      padding: 7.25rem 0 7.75rem;
      background:
        radial-gradient(circle at 15% 20%, rgba(125, 211, 252, 0.36), transparent 23rem),
        radial-gradient(circle at 82% 10%, rgba(196, 181, 253, 0.28), transparent 24rem),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 56%, #06b6d4 100%);
    }

    .articles-hero::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -3;
      background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
      background-size: 44px 44px;
      mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
    }

    .articles-hero::after {
      content: "";
      position: absolute;
      right: -6rem;
      bottom: -8rem;
      z-index: -2;
      width: 26rem;
      height: 26rem;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.12);
      filter: blur(2px);
    }

    .articles-hero__inner {
      position: relative;
      z-index: 2;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
      gap: 2.5rem;
      align-items: center;
    }

    .articles-hero__badge {
      display: inline-flex;
      align-items: center;
      gap: .55rem;
      padding: .55rem .85rem;
      border: 1px solid rgba(255, 255, 255, .24);
      border-radius: 999px;
      background: rgba(255, 255, 255, .12);
      color: rgba(255, 255, 255, .88);
      font-size: .9rem;
      font-weight: 700;
      box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
      backdrop-filter: blur(16px);
    }

    .articles-hero__title {
      margin-top: 1.2rem;
      font-size: clamp(3.4rem, 8vw, 6.5rem);
      line-height: .9;
      text-shadow: 0 18px 42px rgba(15, 23, 42, .28);
    }

    .articles-hero__lead {
      max-width: 48rem;
      margin-top: 1.35rem;
      color: rgba(255, 255, 255, .84);
      font-size: clamp(1.02rem, 2vw, 1.25rem);
      line-height: 1.9;
    }

    .articles-hero__panel {
      position: relative;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, .2);
      border-radius: 2rem;
      padding: 1.55rem;
      background:
        linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08)),
        radial-gradient(circle at top left, rgba(255, 255, 255, .28), transparent 46%);
      box-shadow: 0 26px 70px rgba(15, 23, 42, .24);
      backdrop-filter: blur(22px);
    }

    .articles-hero__panel::after {
      content: "";
      position: absolute;
      right: -2.6rem;
      bottom: -2.6rem;
      width: 9rem;
      height: 9rem;
      border-radius: 999px;
      background: rgba(255, 255, 255, .12);
    }

    .articles-hero__panel-icon {
      position: relative;
      display: inline-flex;
      width: 4.15rem;
      height: 4.15rem;
      align-items: center;
      justify-content: center;
      border-radius: 1.35rem;
      color: #0f172a;
      background: linear-gradient(135deg, #ffffff, #bae6fd);
      box-shadow: 0 16px 32px rgba(15, 23, 42, .22);
      font-size: 1.7rem;
    }

    .articles-hero__panel-title {
      position: relative;
      margin-top: 1.2rem;
      color: white;
      font-size: 1.28rem;
      font-weight: 900;
    }

    .articles-hero__panel-text {
      position: relative;
      margin-top: .55rem;
      color: rgba(255, 255, 255, .76);
      line-height: 1.75;
    }

    .articles-shell {
      position: relative;
      z-index: 3;
      margin-top: -4.5rem;
    }

    .articles-toolbar {
      border: 1px solid rgba(226, 232, 240, .88);
      border-radius: 2rem;
      padding: 1.35rem 1.5rem;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .9)),
        radial-gradient(circle at 8% 0%, rgba(59, 130, 246, .12), transparent 34%);
      box-shadow: 0 24px 68px rgba(15, 23, 42, .1);
    }

    .articles-heading-kicker {
      display: inline-flex;
      align-items: center;
      gap: .45rem;
      margin-bottom: .35rem;
      color: rgb(37 99 235);
      font-size: .75rem;
      font-weight: 900;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .articles-status-pill {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      border: 1px solid rgba(191, 219, 254, .9);
      border-radius: 999px;
      padding: .58rem .9rem;
      background: rgba(239, 246, 255, .86);
      color: rgb(37 99 235);
      font-weight: 800;
      box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
    }

    .articles-filter-panel {
      z-index: 20;
      border: 1px solid rgba(226, 232, 240, .9);
      border-radius: 2rem;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .86));
      box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
      backdrop-filter: blur(18px);
    }

    .articles-filter-row {
      align-items: flex-start;
    }

    .articles-tag-buttons {
      flex: 1 1 auto;
      align-content: flex-start;
      min-height: 3.875rem;
    }

    .articles-tag-buttons:not(.tags-expanded) {
      flex: 0 0 auto;
      min-height: 0;
    }

    .tag-btn--all::after {
      content: "\f107";
      display: inline-flex;
      margin-left: .15rem;
      color: currentColor;
      font-family: "Font Awesome 6 Free";
      font-size: .75rem;
      font-weight: 900;
      opacity: .78;
      transition: transform .2s ease;
    }

    .tag-btn--all[aria-expanded="true"]::after {
      transform: rotate(180deg);
    }

    .tag-btn[hidden] {
      display: none;
    }

    .articles-search {
      transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    }

    .articles-search:focus {
      border-color: rgb(96 165 250);
      box-shadow:
        0 0 0 4px rgba(59, 130, 246, .14),
        0 12px 24px rgba(37, 99, 235, .08);
    }

    .tag-btn {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      padding: .6rem .98rem;
      border: 1px solid rgba(226, 232, 240, .95);
      border-radius: 999px;
      background: rgba(255, 255, 255, .9);
      color: rgb(51 65 85);
      font-size: .875rem;
      font-weight: 800;
      box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
      transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
      user-select: none;
    }

    .tag-btn:hover {
      transform: translateY(-2px);
      border-color: rgba(147, 197, 253, .9);
      background: rgb(239 246 255);
      color: rgb(37 99 235);
      box-shadow: 0 12px 24px rgba(37, 99, 235, .1);
    }

    .tag-btn.active {
      border-color: transparent;
      background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
      color: white;
      box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
    }

    .tag-count {
      padding: .15rem .55rem;
      border-radius: 999px;
      background: rgb(241 245 249);
      color: rgb(71 85 105);
      font-size: .75rem;
      font-weight: 900;
    }

    .tag-btn.active .tag-count {
      background: rgba(255, 255, 255, .2);
      color: white;
    }

    .articles-grid {
      align-items: stretch;
    }

    .article-card {
      position: relative;
      display: grid;
      grid-template-rows: auto 1fr;
      min-height: 100%;
      border: 1px solid rgba(226, 232, 240, .92);
      border-radius: 1.8rem;
      overflow: hidden;
      background: rgba(255, 255, 255, .96);
      box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
      transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
    }

    .article-card:hover {
      transform: translateY(-7px);
      border-color: rgba(147, 197, 253, .9);
      box-shadow: 0 28px 62px rgba(15, 23, 42, .13);
    }

.article-card__cover {
  position: relative;
  height: 12.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.article-card__cover--tone-1 {
  background: linear-gradient(90deg, #0f172a, #0f766e, #2563eb);
}

.article-card__cover--tone-2 {
  background: linear-gradient(90deg, #111827, #1d4ed8, #0f766e);
}

.article-card__cover--tone-3 {
  background: linear-gradient(90deg, #172554, #1d4ed8, #0f766e);
}

.article-card__cover--tone-4 {
  background: linear-gradient(90deg, #0f766e, #2563eb);
}

.article-card__cover--tone-5 {
  background: linear-gradient(90deg, #7c3aed, #2563eb);
}

.article-card__cover--tone-6 {
  background: linear-gradient(90deg, #059669, #10b981);
}

.article-card__cover--tone-7 {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.article-card__cover--tone-8 {
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

    .article-card__cover::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .34), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(15, 23, 42, .08));
    }

    .article-card__cover::after {
      content: "";
      position: absolute;
      right: -2.5rem;
      bottom: -2.5rem;
      width: 8rem;
      height: 8rem;
      border-radius: 999px;
      background: rgba(255, 255, 255, .16);
    }

    .article-card__icon {
      position: relative;
      z-index: 1;
      color: rgba(255, 255, 255, .44);
      font-size: 4.25rem;
      filter: drop-shadow(0 14px 24px rgba(15, 23, 42, .18));
      transition: transform .24s ease, color .24s ease;
    }

    .article-card:hover .article-card__icon {
      transform: scale(1.08) rotate(-4deg);
      color: rgba(255, 255, 255, .62);
    }

    .article-card__body {
      display: grid;
      grid-template-rows: auto auto 1fr auto;
      padding: 1.45rem;
    }

    .article-card__meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: .5rem;
      color: rgb(100 116 139);
      font-size: .82rem;
      font-weight: 700;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      padding: .22rem .6rem;
      border-radius: 999px;
      background: rgb(239 246 255);
      color: rgb(37 99 235);
      font-size: .75rem;
      font-weight: 900;
    }

    .article-card__title {
      margin-top: .85rem;
      color: rgb(15 23 42);
      font-size: 1.22rem;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: -.01em;
    }

    .article-card__excerpt {
      margin-top: .65rem;
      color: rgb(71 85 105);
      font-size: .93rem;
      line-height: 1.85;
    }

    .article-card__link {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      gap: .45rem;
      margin-top: 1.1rem;
      border-radius: 999px;
      padding: .58rem .9rem;
      background: rgb(239 246 255);
      color: rgb(37 99 235);
      font-size: .9rem;
      font-weight: 900;
      transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
    }

    .article-card__link:hover {
      transform: translateX(3px);
      background: rgb(37 99 235);
      color: white;
      box-shadow: 0 12px 24px rgba(37, 99, 235, .2);
    }

    .articles-empty {
      border: 1px dashed rgba(147, 197, 253, .8);
      border-radius: 1.8rem;
      padding: 2.25rem;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(239, 246, 255, .72));
      color: rgb(71 85 105);
      text-align: center;
    }

    html.dark .articles-page {
      background:
        radial-gradient(circle at 8% 12%, rgba(59, 130, 246, .11), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(34, 197, 94, .08), transparent 26rem),
        linear-gradient(180deg, rgb(17 24 39), rgb(2 6 23));
    }

    html.dark .articles-hero {
      background:
        radial-gradient(circle at 15% 20%, rgba(34, 197, 94, .18), transparent 23rem),
        radial-gradient(circle at 82% 10%, rgba(59, 130, 246, .22), transparent 24rem),
        linear-gradient(135deg, #020617 0%, #111827 52%, #164e63 100%);
    }

    html.dark .articles-toolbar,
    html.dark .articles-filter-panel,
    html.dark .article-card,
    html.dark .articles-empty {
      border-color: rgba(51, 65, 85, .95);
      background:
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .9));
      box-shadow: 0 20px 58px rgba(0, 0, 0, .28);
    }

    html.dark .articles-heading-kicker,
    html.dark .articles-status-pill {
      color: rgb(147 197 253);
    }

    html.dark .articles-status-pill {
      border-color: rgba(96, 165, 250, .34);
      background: rgba(59, 130, 246, .14);
      box-shadow: none;
    }

    html.dark .tag-btn {
      border-color: rgb(51 65 85);
      background: rgba(15, 23, 42, .82);
      color: rgb(226 232 240);
      box-shadow: none;
    }

    html.dark .tag-btn:hover {
      border-color: rgba(96, 165, 250, .52);
      background: rgba(59, 130, 246, .14);
      color: rgb(147 197 253);
    }

    html.dark .tag-count {
      background: rgba(2, 6, 23, .72);
      color: rgb(203 213 225);
    }

    html.dark .article-card__meta,
    html.dark .article-card__excerpt {
      color: rgb(148 163 184);
    }

    html.dark .article-card__title {
      color: rgb(248 250 252);
    }

    html.dark .pill,
    html.dark .article-card__link {
      background: rgba(59, 130, 246, .14);
      color: rgb(147 197 253);
    }

    html.dark .article-card__link:hover {
      background: rgb(37 99 235);
      color: white;
    }

    @media (max-width: 900px) {
      .articles-hero__inner {
        grid-template-columns: 1fr;
      }

      .articles-hero__panel {
        max-width: 28rem;
      }

      .articles-filter-panel {
        position: static;
      }
    }

    @media (max-width: 640px) {
      .articles-hero {
        padding: 5.75rem 0 6.5rem;
      }

      .articles-shell {
        margin-top: -3.5rem;
      }

      .articles-toolbar,
      .articles-filter-panel {
        border-radius: 1.5rem;
        padding: 1rem;
      }

      .article-card__cover {
        height: 10.5rem;
      }

      .article-card__body {
        padding: 1.2rem;
      }
    }

/* About page */
.about-page {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 13%, rgba(59, 130, 246, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(14, 165, 233, 0.10), transparent 26rem),
    linear-gradient(180deg, rgb(248 250 252), rgb(241 245 249));
}

.about-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 7.35rem 0 8rem;
  background:
    radial-gradient(circle at 15% 22%, rgba(125, 211, 252, 0.36), transparent 23rem),
    radial-gradient(circle at 78% 8%, rgba(196, 181, 253, 0.28), transparent 24rem),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #06b6d4 100%);
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
}

.about-hero::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -8rem;
  z-index: -2;
  width: 27rem;
  height: 27rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.about-hero__glow {
  position: absolute;
  z-index: -2;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.72;
}

.about-hero__glow--left {
  left: -8rem;
  bottom: 3rem;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.34), transparent 66%);
}

.about-hero__glow--right {
  right: -7rem;
  top: 5rem;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25), transparent 64%);
}

.about-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(290px, 0.72fr);
  gap: 3.5rem;
  align-items: center;
}

.about-hero__copy {
  max-width: 760px;
}

.about-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

.about-hero__title {
  margin-top: 1.25rem;
  font-size: clamp(3.25rem, 8vw, 6.35rem);
  line-height: 0.9;
  text-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
}

.about-hero__lead {
  max-width: 50rem;
  margin-top: 1.35rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.9;
}

.about-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.about-hero__button {
  display: inline-flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  border-radius: 1.15rem;
  padding: 0.82rem 1.18rem;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.about-hero__button:hover {
  transform: translateY(-3px);
}

.about-hero__button--primary {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.about-hero__button--primary:hover {
  background: white;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.28);
}

.about-hero__button--secondary {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.about-hero__button--secondary:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.18);
}

.about-hero__panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2.15rem;
  padding: 1.75rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 46%);
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(22px);
}

.about-hero__panel::after {
  content: "";
  position: absolute;
  right: -2.6rem;
  bottom: -2.6rem;
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.about-hero__panel-orbit {
  position: absolute;
  inset: 1.05rem;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 1.7rem;
  pointer-events: none;
}

.about-hero__avatar {
  position: relative;
  display: inline-flex;
  width: 4.55rem;
  height: 4.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.45rem;
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #bae6fd);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
  font-size: 1.7rem;
}

.about-hero__eyebrow {
  position: relative;
  margin-top: 1.15rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about-hero__panel-title {
  position: relative;
  margin-top: 0.35rem;
  color: white;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.35;
}

.about-hero__panel-text {
  position: relative;
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.8;
}

.about-hero__metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.about-hero__metrics div {
  border-radius: 1.18rem;
  padding: 0.88rem 0.65rem;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}

.about-hero__metrics strong,
.about-hero__metrics span {
  display: block;
}

.about-hero__metrics strong {
  font-size: 1.2rem;
  line-height: 1;
}

.about-hero__metrics span {
  margin-top: 0.36rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  line-height: 1.35;
}

.about-shell {
  position: relative;
  z-index: 3;
  margin-top: -4.25rem;
}

.about-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 2rem;
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.12), transparent 34%);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.about-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.28rem;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

.about-card__heading {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.45rem;
}

.about-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  color: rgb(37 99 235);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  gap: 2rem;
  align-items: start;
}

.about-profile-card .about-card__heading,
.about-profile-card .about-profile-text {
  grid-column: 1;
}

.about-profile-text {
  color: rgb(71 85 105);
  font-size: 1.02rem;
  line-height: 2;
}

.about-profile-text b {
  color: rgb(37 99 235);
  font-weight: 900;
}

.about-profile-highlights {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  gap: 0.85rem;
}

.about-profile-highlights div {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.35rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.about-profile-highlights i {
  display: inline-flex;
  width: 2.55rem;
  height: 2.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.95rem;
  color: white;
  background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.about-profile-highlights strong {
  display: block;
  margin-top: 0.85rem;
  color: rgb(15 23 42);
  font-weight: 900;
}

.about-profile-highlights span {
  display: block;
  margin-top: 0.25rem;
  color: rgb(100 116 139);
  font-size: 0.86rem;
  line-height: 1.55;
}

.about-skill-card > .space-y-6 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-skill-card > .space-y-6 > div {
  position: relative;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.45rem;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-skill-card > .space-y-6 > div:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 197, 253, 0.9);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.1);
}

.about-skill-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  color: rgb(51 65 85);
  font-size: 0.9rem;
  font-weight: 900;
}

.about-skill-card h3::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.about-skill-card .flex span {
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.about-skill-card .flex span:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.about-project-card ol {
  border-color: rgba(191, 219, 254, 0.95);
}

.about-project-card ol > li {
  position: relative;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.45rem;
  padding: 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-project-card ol > li:hover {
  transform: translateX(4px);
  border-color: rgba(147, 197, 253, 0.95);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.1);
}

.about-project-card ol > li > .absolute {
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.13);
}

.about-project-card h3 {
  color: rgb(15 23 42);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.45;
}

.about-project-card p,
.about-project-card li {
  line-height: 1.8;
}

.about-project-card ul {
  border-top: 1px dashed rgba(203, 213, 225, 0.9);
  padding-top: 0.85rem;
}

html.dark .about-page {
  background:
    radial-gradient(circle at 8% 13%, rgba(59, 130, 246, 0.11), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(34, 197, 94, 0.08), transparent 26rem),
    linear-gradient(180deg, rgb(17 24 39), rgb(2 6 23));
}

html.dark .about-hero {
  background:
    radial-gradient(circle at 15% 22%, rgba(34, 197, 94, 0.18), transparent 23rem),
    radial-gradient(circle at 78% 8%, rgba(59, 130, 246, 0.22), transparent 24rem),
    linear-gradient(135deg, #020617 0%, #111827 52%, #164e63 100%);
}

html.dark .about-card,
html.dark .about-profile-highlights div,
html.dark .about-skill-card > .space-y-6 > div,
html.dark .about-project-card ol > li {
  border-color: rgba(51, 65, 85, 0.95);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9));
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.28);
}

html.dark .about-card__kicker {
  color: rgb(147 197 253);
}

html.dark .about-profile-text {
  color: rgb(203 213 225);
}

html.dark .about-profile-text b {
  color: rgb(147 197 253);
}

html.dark .about-profile-highlights strong,
html.dark .about-skill-card h3,
html.dark .about-project-card h3 {
  color: rgb(248 250 252);
}

html.dark .about-profile-highlights span {
  color: rgb(148 163 184);
}

html.dark .about-skill-card .flex span {
  border-color: rgba(51, 65, 85, 0.9);
  box-shadow: none;
}

html.dark .about-project-card ol {
  border-color: rgba(96, 165, 250, 0.34);
}

html.dark .about-project-card ul {
  border-top-color: rgba(71, 85, 105, 0.9);
}

@media (max-width: 900px) {
  .about-hero__inner,
  .about-profile-card,
  .about-skill-card > .space-y-6 {
    grid-template-columns: 1fr;
  }

  .about-hero__panel {
    max-width: 34rem;
  }

  .about-profile-card .about-card__heading,
  .about-profile-card .about-profile-text,
  .about-profile-highlights {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .about-hero {
    padding: 5.75rem 0 6.5rem;
  }

  .about-shell {
    margin-top: -3.4rem;
  }

  .about-card {
    border-radius: 1.55rem;
    padding: 1.15rem;
  }

  .about-card__heading {
    display: block;
  }

  .about-hero__actions {
    gap: 0.75rem;
  }

  .about-hero__button {
    width: 100%;
  }

  .about-hero__panel {
    border-radius: 1.65rem;
    padding: 1.25rem;
  }

  .about-hero__metrics {
    grid-template-columns: 1fr;
  }

  .about-profile-highlights,
  .about-skill-card > .space-y-6 {
    gap: 0.75rem;
  }

  .about-project-card ol {
    padding-left: 1rem;
  }

  .about-project-card ol > li {
    margin-left: 0.25rem;
    padding: 1rem;
  }

  .about-project-card ol > li:hover {
    transform: none;
  }
}

/* Contact page */
.contact-page {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 13%, rgba(59, 130, 246, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(14, 165, 233, 0.1), transparent 26rem),
    linear-gradient(180deg, rgb(248 250 252), rgb(241 245 249));
}

.contact-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 7.35rem 0 8rem;
  background:
    radial-gradient(circle at 15% 22%, rgba(125, 211, 252, 0.36), transparent 23rem),
    radial-gradient(circle at 78% 8%, rgba(196, 181, 253, 0.28), transparent 24rem),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #06b6d4 100%);
}

.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
}

.contact-hero::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -8rem;
  z-index: -2;
  width: 27rem;
  height: 27rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.contact-hero__glow {
  position: absolute;
  z-index: -2;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.72;
}

.contact-hero__glow--left {
  left: -8rem;
  bottom: 3rem;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.34), transparent 66%);
}

.contact-hero__glow--right {
  right: -7rem;
  top: 5rem;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25), transparent 64%);
}

.contact-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(290px, 0.72fr);
  gap: 3.5rem;
  align-items: center;
}

.contact-hero__copy {
  max-width: 760px;
}

.contact-hero__badge,
.contact-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.contact-hero__badge {
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

.contact-hero__title {
  margin-top: 1.25rem;
  font-size: clamp(3.25rem, 8vw, 6.35rem);
  line-height: 0.9;
  text-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
}

.contact-hero__lead {
  max-width: 50rem;
  margin-top: 1.35rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.9;
}

.contact-hero__actions,
.contact-actions,
.contact-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-hero__actions {
  margin-top: 2rem;
}

.contact-hero__button,
.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-hero__button {
  min-height: 3.1rem;
  border-radius: 1.15rem;
  padding: 0.82rem 1.18rem;
}

.contact-hero__button:hover,
.contact-btn:hover {
  transform: translateY(-3px);
}

.contact-hero__button--primary {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.contact-hero__button--primary:hover {
  background: white;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.28);
}

.contact-hero__button--secondary {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.contact-hero__button--secondary:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.18);
}

.contact-hero__panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2.15rem;
  padding: 1.75rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 46%);
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(22px);
}

.contact-hero__panel::after {
  content: "";
  position: absolute;
  right: -2.6rem;
  bottom: -2.6rem;
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.contact-hero__panel-orbit {
  position: absolute;
  inset: 1.05rem;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 1.7rem;
  pointer-events: none;
}

.contact-hero__avatar {
  position: relative;
  display: inline-flex;
  width: 4.55rem;
  height: 4.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.45rem;
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #bae6fd);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
  font-size: 1.7rem;
}

.contact-hero__eyebrow {
  position: relative;
  margin-top: 1.15rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-hero__panel-title {
  position: relative;
  margin-top: 0.35rem;
  color: white;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.35;
}

.contact-hero__panel-text {
  position: relative;
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.8;
}

.contact-hero__metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.contact-hero__metrics div {
  border-radius: 1.18rem;
  padding: 0.88rem 0.65rem;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}

.contact-hero__metrics strong,
.contact-hero__metrics span {
  display: block;
}

.contact-hero__metrics strong {
  font-size: 1.2rem;
  line-height: 1;
}

.contact-hero__metrics span {
  margin-top: 0.36rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  line-height: 1.35;
}

.contact-shell {
  position: relative;
  z-index: 3;
  margin-top: -4.25rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.42fr);
  gap: 2rem;
  align-items: start;
}

.contact-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 2rem;
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.12), transparent 34%);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.28rem;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

.contact-card__heading {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.45rem;
}

.contact-card__heading--compact {
  margin-bottom: 1.2rem;
}

.contact-card__kicker {
  margin-bottom: 0.35rem;
  color: rgb(37 99 235);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  background: rgba(239, 246, 255, 0.86);
  color: rgb(37 99 235);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.contact-form-card__desc {
  position: relative;
  margin: -0.45rem 0 1.55rem;
  color: rgb(71 85 105);
  line-height: 1.8;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 1rem;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-field {
  display: grid;
  gap: 0.45rem;
}

.contact-field label {
  color: rgb(51 65 85);
  font-size: 0.86rem;
  font-weight: 900;
}

.contact-control-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1.15rem;
  padding: 0 0.95rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-control-wrap:focus-within {
  border-color: rgb(96 165 250);
  background: white;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    0 12px 24px rgba(37, 99, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.contact-control-wrap > i {
  color: rgb(96 165 250);
}

.contact-control-wrap--textarea {
  align-items: start;
  padding-top: 0.92rem;
}

.contact-control {
  width: 100%;
  border: 0;
  padding: 0.86rem 0;
  background: transparent;
  color: rgb(15 23 42);
  font-size: 0.95rem;
  line-height: 1.65;
}

textarea.contact-control {
  min-height: 11rem;
  resize: vertical;
  padding-top: 0;
}

.contact-control:focus {
  outline: none;
}

.contact-control::placeholder {
  color: rgb(148 163 184);
}

.contact-actions {
  align-items: center;
  margin-top: 0.3rem;
}

.contact-btn {
  min-height: 2.85rem;
  border-radius: 1rem;
  padding: 0.72rem 1.1rem;
  font-size: 0.92rem;
}

.contact-btn--primary {
  border: 1px solid rgb(37 99 235);
  background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
  color: white;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.contact-btn--primary:hover {
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

.contact-btn--ghost {
  border: 1px solid rgb(226 232 240);
  background: white;
  color: rgb(71 85 105);
}

.contact-btn--ghost:hover {
  border-color: rgb(203 213 225);
  background: rgb(248 250 252);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.contact-status-text {
  min-height: 1.35rem;
  color: rgb(37 99 235);
  font-size: 0.88rem;
  font-weight: 800;
}

.contact-preview {
  margin-top: 0.65rem;
  border: 1px solid rgba(191, 219, 254, 0.92);
  border-radius: 1.6rem;
  padding: 1.2rem;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.78), rgba(255, 255, 255, 0.72));
}

.contact-preview__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.contact-preview__heading h3 {
  color: rgb(15 23 42);
  font-size: 1.05rem;
  font-weight: 900;
}

.contact-preview__heading > span {
  color: rgb(100 116 139);
  font-size: 0.78rem;
  font-weight: 800;
}

.contact-preview__box {
  min-height: 9rem;
  max-height: 20rem;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1.2rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.94);
  color: rgb(226 232 240);
  font-size: 0.9rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.contact-preview__actions {
  margin-top: 1rem;
}

.contact-side {
  display: grid;
  gap: 1.2rem;
}

.contact-method-list {
  display: grid;
  gap: 0.9rem;
}

.contact-method {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.35rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.contact-method:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 197, 253, 0.9);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.contact-method__icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: white;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

.contact-method__icon--blue {
  background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
}

.contact-method__icon--green {
  background: linear-gradient(135deg, rgb(22 163 74), rgb(20 184 166));
}

.contact-method__icon--dark {
  background: linear-gradient(135deg, rgb(15 23 42), rgb(71 85 105));
}

.contact-method__body {
  min-width: 0;
}

.contact-method__body span {
  display: block;
  color: rgb(100 116 139);
  font-size: 0.78rem;
  font-weight: 800;
}

.contact-method__body strong,
.contact-method__body a {
  display: block;
  margin-top: 0.18rem;
  overflow-wrap: anywhere;
  color: rgb(15 23 42);
  font-weight: 900;
}

.contact-method__body a {
  color: rgb(37 99 235);
}

.contact-method__body button {
  margin-top: 0.38rem;
  color: rgb(37 99 235);
  font-size: 0.82rem;
  font-weight: 900;
}

.contact-method__body button:hover,
.contact-method__body a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-tips-card h3,
.contact-response-card h3 {
  color: rgb(15 23 42);
  font-size: 1.1rem;
  font-weight: 900;
}

.contact-tips-card ul {
  display: grid;
  gap: 0.72rem;
  margin-top: 1rem;
  color: rgb(71 85 105);
  font-size: 0.92rem;
  line-height: 1.65;
}

.contact-tips-card li {
  display: flex;
  gap: 0.58rem;
  align-items: flex-start;
}

.contact-tips-card li i {
  margin-top: 0.28rem;
  color: rgb(34 197 94);
}

.contact-response-card {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  padding: 1.7rem;
  color: white;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.22), transparent 12rem),
    linear-gradient(135deg, rgb(37 99 235), rgb(79 70 229), rgb(14 165 233));
  box-shadow: 0 22px 58px rgba(37, 99, 235, 0.24);
}

.contact-response-card::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.contact-response-card__icon {
  position: relative;
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 1.12rem;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.25rem;
  backdrop-filter: blur(12px);
}

.contact-response-card h3,
.contact-response-card p {
  position: relative;
}

.contact-response-card h3 {
  margin-top: 1rem;
  color: white;
}

.contact-response-card p {
  margin-top: 0.52rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.8;
}

.contact-faq-list {
  display: grid;
  gap: 0.8rem;
}

.contact-faq-list details {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.18rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: rgb(71 85 105);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-faq-list details:hover,
.contact-faq-list details[open] {
  border-color: rgba(147, 197, 253, 0.9);
  background: rgba(239, 246, 255, 0.66);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
}

.contact-faq-list summary {
  cursor: pointer;
  color: rgb(15 23 42);
  font-weight: 900;
  line-height: 1.55;
}

.contact-faq-list p {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

html.dark .contact-page {
  background:
    radial-gradient(circle at 8% 13%, rgba(59, 130, 246, 0.11), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(34, 197, 94, 0.08), transparent 26rem),
    linear-gradient(180deg, rgb(17 24 39), rgb(2 6 23));
}

html.dark .contact-hero {
  background:
    radial-gradient(circle at 15% 22%, rgba(34, 197, 94, 0.18), transparent 23rem),
    radial-gradient(circle at 78% 8%, rgba(59, 130, 246, 0.22), transparent 24rem),
    linear-gradient(135deg, #020617 0%, #111827 52%, #164e63 100%);
}

html.dark .contact-card,
html.dark .contact-method,
html.dark .contact-faq-list details {
  border-color: rgba(51, 65, 85, 0.95);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9));
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.28);
}

html.dark .contact-card__kicker,
html.dark .contact-status-text,
html.dark .contact-method__body button,
html.dark .contact-method__body a {
  color: rgb(147 197 253);
}

html.dark .contact-status-pill {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
  box-shadow: none;
}

html.dark .contact-form-card__desc,
html.dark .contact-tips-card ul,
html.dark .contact-faq-list details,
html.dark .contact-method__body span,
html.dark .contact-preview__heading > span {
  color: rgb(148 163 184);
}

html.dark .contact-field label,
html.dark .contact-preview__heading h3,
html.dark .contact-method__body strong,
html.dark .contact-tips-card h3,
html.dark .contact-faq-list summary {
  color: rgb(248 250 252);
}

html.dark .contact-control-wrap {
  border-color: rgb(51 65 85);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .contact-control-wrap:focus-within {
  border-color: rgb(96 165 250);
  background: rgb(15 23 42);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

html.dark .contact-control {
  color: rgb(248 250 252);
}

html.dark .contact-btn--ghost {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
  color: rgb(226 232 240);
}

html.dark .contact-btn--ghost:hover {
  border-color: rgb(71 85 105);
  background: rgb(30 41 59);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

html.dark .contact-preview {
  border-color: rgba(96, 165, 250, 0.32);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 0.72));
}

html.dark .contact-preview__box {
  border-color: rgb(51 65 85);
  background: rgba(2, 6, 23, 0.88);
}

html.dark .contact-method:hover,
html.dark .contact-faq-list details:hover,
html.dark .contact-faq-list details[open] {
  border-color: rgba(96, 165, 250, 0.52);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.14), transparent 34%);
}

@media (max-width: 1024px) {
  .contact-layout,
  .contact-hero__inner {
    grid-template-columns: 1fr;
  }

  .contact-hero__panel {
    max-width: 34rem;
  }

  .contact-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-faq-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .contact-hero {
    padding: 5.75rem 0 6.5rem;
  }

  .contact-shell {
    margin-top: -3.4rem;
  }

  .contact-card {
    border-radius: 1.55rem;
    padding: 1.15rem;
  }

  .contact-card__heading,
  .contact-preview__heading {
    display: block;
  }

  .contact-status-pill {
    margin-top: 1rem;
  }

  .contact-hero__actions {
    gap: 0.75rem;
  }

  .contact-hero__button,
  .contact-btn {
    width: 100%;
  }

  .contact-hero__panel {
    border-radius: 1.65rem;
    padding: 1.25rem;
  }

  .contact-hero__metrics,
  .contact-form__grid,
  .contact-side {
    grid-template-columns: 1fr;
  }

  .contact-response-card {
    border-radius: 1.55rem;
    padding: 1.25rem;
  }

  .contact-preview {
    padding: 1rem;
  }

  .contact-method:hover {
    transform: none;
  }
}

/* =========================================================
   Unified site/article polish
   全站与文章详情页统一视觉增强
   ========================================================= */

:root {
  --site-surface: rgba(255, 255, 255, 0.94);
  --site-surface-strong: #ffffff;
  --site-surface-soft: rgba(248, 250, 252, 0.88);
  --site-border: rgba(226, 232, 240, 0.92);
  --site-text: rgb(15 23 42);
  --site-muted: rgb(100 116 139);
  --site-accent: rgb(37 99 235);
  --site-accent-2: rgb(14 165 233);
  --site-accent-3: rgb(34 197 94);
  --site-radius-xl: 1.35rem;
  --site-radius-2xl: 1.75rem;
  --site-radius-3xl: 2.15rem;
  --site-shadow-sm: 0 12px 28px rgba(15, 23, 42, 0.055);
  --site-shadow-md: 0 22px 58px rgba(15, 23, 42, 0.09);
  --site-shadow-lg: 0 32px 88px rgba(15, 23, 42, 0.14);
}

html.dark {
  --site-surface: rgba(15, 23, 42, 0.94);
  --site-surface-strong: rgb(15 23 42);
  --site-surface-soft: rgba(30, 41, 59, 0.82);
  --site-border: rgba(51, 65, 85, 0.95);
  --site-text: rgb(248 250 252);
  --site-muted: rgb(148 163 184);
  --site-accent: rgb(96 165 250);
  --site-accent-2: rgb(34 211 238);
  --site-accent-3: rgb(74 222 128);
  --site-shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.24);
  --site-shadow-md: 0 22px 62px rgba(0, 0, 0, 0.34);
  --site-shadow-lg: 0 32px 92px rgba(0, 0, 0, 0.48);
}

::selection {
  background: rgba(37, 99, 235, 0.22);
  color: rgb(15 23 42);
}

html.dark ::selection {
  background: rgba(96, 165, 250, 0.28);
  color: rgb(248 250 252);
}

body {
  background:
    radial-gradient(circle at 7% 10%, rgba(59, 130, 246, 0.08), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(14, 165, 233, 0.065), transparent 26rem),
    linear-gradient(180deg, rgb(248 250 252), rgb(241 245 249));
}

html.dark body {
  background:
    radial-gradient(circle at 8% 11%, rgba(59, 130, 246, 0.1), transparent 28rem),
    radial-gradient(circle at 92% 14%, rgba(34, 197, 94, 0.075), transparent 26rem),
    linear-gradient(180deg, rgb(17 24 39), rgb(2 6 23));
}

.card,
.blog-card,
.site-lift-card,
.btn-primary,
.btn-ghost,
.tag-btn,
.pill,
.input-field {
  backface-visibility: hidden;
}

.card,
.site-lift-card {
  border-color: var(--site-border);
  border-radius: var(--site-radius-2xl);
  background:
    linear-gradient(135deg, var(--site-surface), var(--site-surface-soft));
  box-shadow: var(--site-shadow-sm);
}

.btn-primary {
  border: 1px solid rgba(37, 99, 235, 0.8);
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25);
}

.btn-ghost {
  border-color: var(--site-border);
  border-radius: 999px;
  background: var(--site-surface);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.045);
  font-weight: 800;
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.7);
  background: rgb(239 246 255);
  color: rgb(37 99 235);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.1);
}

html.dark .btn-primary {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.18);
}

html.dark .btn-ghost {
  border-color: var(--site-border);
  background: var(--site-surface);
  box-shadow: none;
}

html.dark .btn-ghost:hover {
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
}

/* Article list refinements */
.articles-page {
  color: var(--site-text);
}

.articles-hero,
.about-hero,
.contact-hero,
.home-hero,
body:has(#article) .hero-bg {
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.articles-hero__badge,
.articles-status-pill,
.articles-heading-kicker,
.home-hero__eyebrow,
.about-hero__badge,
.contact-hero__badge,
body:has(#article) .hero-bg .text-sm {
  letter-spacing: 0.02em;
}

.articles-toolbar,
.articles-filter-panel,
.article-card {
  position: relative;
  overflow: hidden;
  border-color: var(--site-border);
  background:
    linear-gradient(135deg, var(--site-surface), var(--site-surface-soft)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.11), transparent 34%);
  box-shadow: var(--site-shadow-md);
}

.articles-toolbar::before,
.articles-filter-panel::before,
.article-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.22rem;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
  opacity: 0.88;
}

.article-card::before {
  z-index: 3;
}

.article-card {
  isolation: isolate;
}

.article-card::after {
  content: "";
  position: absolute;
  inset: auto -4rem -5rem auto;
  z-index: 0;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 68%);
  pointer-events: none;
}

.article-card__cover,
.article-card__body {
  position: relative;
  z-index: 1;
}

.article-card__title {
  transition: color 0.2s ease;
}

.article-card:hover .article-card__title {
  color: rgb(37 99 235);
}

html.dark .article-card:hover .article-card__title {
  color: rgb(147 197 253);
}

.articles-search {
  border-color: var(--site-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html.dark .articles-search {
  border-color: var(--site-border);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Article detail pages */
body:has(#article) {
  color: var(--site-text);
}

body:has(#article) .hero-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 2.4rem;
  background:
    radial-gradient(circle at 14% 20%, rgba(125, 211, 252, 0.34), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(196, 181, 253, 0.24), transparent 25rem),
    radial-gradient(circle at 88% 82%, rgba(34, 197, 94, 0.16), transparent 23rem),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #06b6d4 100%);
}

body:has(#article) .hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
}

body:has(#article) .hero-bg::after {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -8rem;
  z-index: -2;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 62%);
  pointer-events: none;
}

html.dark body:has(#article) .hero-bg {
  background:
    radial-gradient(circle at 14% 20%, rgba(34, 197, 94, 0.16), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.2), transparent 25rem),
    radial-gradient(circle at 88% 82%, rgba(14, 165, 233, 0.12), transparent 23rem),
    linear-gradient(135deg, #020617 0%, #111827 52%, #164e63 100%);
}

body:has(#article) .hero-bg > div {
  position: relative;
  z-index: 2;
  padding-top: 5.25rem;
  padding-bottom: 7.5rem;
}

body:has(#article) .hero-bg .text-sm {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

body:has(#article) .hero-bg h1 {
  max-width: 64rem;
  margin-top: 1.15rem;
  font-size: clamp(2.25rem, 5vw, 4.85rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 18px 42px rgba(15, 23, 42, 0.3);
}

body:has(#article) .hero-bg p {
  max-width: 54rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.9;
}

body:has(#article) main {
  position: relative;
  z-index: 3;
  margin-top: -4.75rem;
  padding-top: 0;
  padding-bottom: 4rem;
}

body:has(#article) aside .sticky {
  top: 6.5rem;
}

#article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-3xl);
  background:
    linear-gradient(145deg, var(--site-surface), var(--site-surface-soft)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.11), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.07), transparent 30%);
  box-shadow: var(--site-shadow-lg);
}

#article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.35rem;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

#article.prose {
  color: rgb(51 65 85);
  font-size: 1.02rem;
  line-height: 1.9;
}

#article.prose > * {
  position: relative;
}

#article.prose h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.65rem;
  margin-bottom: 1rem;
  color: rgb(15 23 42);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 950;
  line-height: 1.3;
  letter-spacing: -0.025em;
  scroll-margin-top: 6.5rem;
}

#article.prose h2:first-child {
  margin-top: 0.35rem;
}

#article.prose h2::before {
  content: "";
  width: 0.68rem;
  height: 1.8rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(37 99 235), rgb(14 165 233), rgb(34 197 94));
  box-shadow: 0 0 0 0.36rem rgba(59, 130, 246, 0.1);
}

#article.prose h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.9rem;
  margin-bottom: 0.75rem;
  color: rgb(30 41 59);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  font-weight: 900;
  scroll-margin-top: 6.5rem;
}

#article.prose h3::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgb(14 165 233);
  box-shadow: 0 0 0 0.28rem rgba(14, 165, 233, 0.12);
}

#article.prose p,
#article.prose li {
  color: rgb(55 65 81);
}

#article.prose p {
  margin: 0.95rem 0;
}

#article.prose ul,
#article.prose ol {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
  padding-left: 1.25rem;
}

#article.prose li::marker {
  color: rgb(37 99 235);
  font-weight: 900;
}

#article.prose a {
  color: rgb(37 99 235);
  font-weight: 800;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.24em;
}

#article.prose a:hover {
  color: rgb(29 78 216);
}

#article.prose code {
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: rgba(239, 246, 255, 0.92);
  color: rgb(30 64 175);
  padding: 0.16rem 0.42rem;
  border-radius: 0.55rem;
  font-weight: 750;
}

#article.prose pre {
  position: relative;
  border: 1px solid rgba(30, 41, 59, 0.88);
  border-radius: 1.25rem;
  padding: 1.15rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.14), transparent 34%),
    linear-gradient(135deg, rgb(15 23 42), rgb(2 6 23));
  color: rgb(226 232 240);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

#article.prose pre code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-weight: 500;
}

#article.prose table {
  border: 1px solid var(--site-border);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.055);
}

#article.prose th {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.94));
  color: rgb(30 41 59);
}

#article.prose td,
#article.prose th {
  border-color: rgba(226, 232, 240, 0.95);
}

#article.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.58), transparent);
}

#article.prose blockquote,
#article.prose .callout,
.callout {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.82);
  border-left: 0.34rem solid rgb(37 99 235);
  border-radius: 1.35rem;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.12), transparent 30%);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.075);
}

#article.prose .callout::after,
.callout::after {
  content: "";
  position: absolute;
  right: -2.4rem;
  top: -2.4rem;
  width: 7rem;
  height: 7rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  pointer-events: none;
}

#article.prose img {
  border: 1px solid var(--site-border);
  border-radius: 1.35rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

/* Article sidebars / navigation cards */
body:has(#article) aside .bg-white.rounded-3xl,
body:has(#article) aside .bg-gradient-to-br.rounded-3xl,
body:has(#article) section > .grid a.bg-white.rounded-3xl {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--site-border);
  background:
    linear-gradient(145deg, var(--site-surface), var(--site-surface-soft)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.1), transparent 34%);
  box-shadow: var(--site-shadow-md);
}

body:has(#article) aside .bg-white.rounded-3xl::before,
body:has(#article) section > .grid a.bg-white.rounded-3xl::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.25rem;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

body:has(#article) aside .bg-gradient-to-br.rounded-3xl {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233), rgb(20 184 166));
  box-shadow: 0 22px 58px rgba(37, 99, 235, 0.22);
}

body:has(#article) section > .grid a.bg-white.rounded-3xl {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body:has(#article) section > .grid a.bg-white.rounded-3xl:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: var(--site-shadow-lg);
}

#toc {
  display: grid;
  gap: 0.4rem;
}

#toc a {
  border-radius: 0.85rem;
  padding: 0.45rem 0.65rem;
  color: rgb(71 85 105);
  line-height: 1.45;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

#toc a:hover {
  transform: translateX(2px);
  background: rgba(239, 246, 255, 0.9);
  color: rgb(37 99 235);
  text-decoration: none;
}

#toc button {
  border-color: rgba(191, 219, 254, 0.9) !important;
  border-radius: 0.7rem !important;
  background: rgba(239, 246, 255, 0.9) !important;
  color: rgb(37 99 235) !important;
}

html.dark #article {
  border-color: var(--site-border);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.9)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.14), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.08), transparent 30%);
}

html.dark #article.prose {
  color: rgb(203 213 225);
}

html.dark #article.prose h2,
html.dark #article.prose h3,
html.dark #article.prose th {
  color: rgb(248 250 252);
}

html.dark #article.prose p,
html.dark #article.prose li {
  color: rgb(203 213 225);
}

html.dark #article.prose a {
  color: rgb(147 197 253);
}

html.dark #article.prose a:hover {
  color: rgb(191 219 254);
}

html.dark #article.prose code {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.16);
  color: rgb(191 219 254);
}

html.dark #article.prose pre {
  border-color: rgba(51, 65, 85, 0.95);
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.13), transparent 34%),
    linear-gradient(135deg, rgb(2 6 23), rgb(15 23 42));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
}

html.dark #article.prose th {
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.9));
}

html.dark #article.prose td,
html.dark #article.prose th {
  border-color: rgba(51, 65, 85, 0.95);
}

html.dark #article.prose blockquote,
html.dark #article.prose .callout,
html.dark .callout {
  border-color: rgba(96, 165, 250, 0.3);
  border-left-color: rgb(96 165 250);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(15, 23, 42, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.08), transparent 30%);
  box-shadow: none;
}

html.dark body:has(#article) aside .bg-white.rounded-3xl,
html.dark body:has(#article) section > .grid a.bg-white.rounded-3xl {
  border-color: var(--site-border);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.86)),
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.13), transparent 34%);
  box-shadow: var(--site-shadow-md);
}

html.dark #toc a {
  color: rgb(203 213 225);
}

html.dark #toc a:hover {
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
}

html.dark #toc button {
  border-color: rgba(96, 165, 250, 0.32) !important;
  background: rgba(59, 130, 246, 0.14) !important;
  color: rgb(147 197 253) !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-ghost,
  #toc a,
  body:has(#article) section > .grid a.bg-white.rounded-3xl {
    transition: none;
  }
}

@media (max-width: 1024px) {
  body:has(#article) main {
    margin-top: -3.75rem;
  }

  body:has(#article) aside .sticky {
    position: static;
  }
}

@media (max-width: 767px) {
  body:has(#article) .hero-bg {
    padding-top: 1.4rem;
  }

  body:has(#article) .hero-bg > div {
    padding-top: 4.35rem;
    padding-bottom: 6.35rem;
  }

  body:has(#article) .hero-bg .text-sm {
    width: 100%;
    border-radius: 1.2rem;
    line-height: 1.55;
  }

  body:has(#article) .hero-bg h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: -0.02em;
  }

  body:has(#article) main {
    margin-top: -3.25rem;
    gap: 1rem;
  }

  #article {
    border-radius: 1.55rem;
    padding: 1.2rem;
  }

  #article.prose {
    font-size: 0.98rem;
  }

  #article.prose h2 {
    align-items: flex-start;
    gap: 0.62rem;
    margin-top: 2.15rem;
    font-size: 1.38rem;
  }

  #article.prose h2::before {
    height: 1.45rem;
    margin-top: 0.12rem;
  }

  #article.prose h3 {
    font-size: 1.12rem;
  }

  body:has(#article) aside .bg-white.rounded-3xl,
  body:has(#article) aside .bg-gradient-to-br.rounded-3xl,
  body:has(#article) section > .grid a.bg-white.rounded-3xl {
    border-radius: 1.45rem;
    padding: 1.1rem;
  }

  #toc {
    gap: 0.28rem;
  }

  #toc a {
    padding: 0.42rem 0.55rem;
  }
}
