:root {
  --bg: #efe9dd;
  --bg-soft: rgba(255, 255, 255, 0.48);
  --panel: rgba(255, 252, 246, 0.7);
  --panel-strong: rgba(250, 245, 237, 0.92);
  --text: #171512;
  --muted: #655d53;
  --line: rgba(23, 21, 18, 0.12);
  --line-strong: rgba(23, 21, 18, 0.2);
  --accent: #ad5d36;
  --accent-soft: rgba(173, 93, 54, 0.12);
  --shadow: 0 20px 60px rgba(31, 22, 14, 0.08);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --space-1: 0.75rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;
  --spacing-lg: 1rem;
  --content-width: min(1180px, calc(100% - 2rem));
  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 21, 18, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 18, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 90%);
  pointer-events: none;
  opacity: 0.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  position: relative;
  overflow: clip;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  pointer-events: none;
  opacity: 0.65;
}

.ambient-left {
  top: 7rem;
  left: -10rem;
  width: 20rem;
  height: 20rem;
  background: rgba(174, 104, 61, 0.14);
}

.ambient-right {
  top: 24rem;
  right: -8rem;
  width: 18rem;
  height: 18rem;
  background: rgba(31, 55, 69, 0.12);
}

main {
  width: var(--content-width);
  margin: 0 auto;
}

.footer {
  width: var(--content-width);
  margin: 0 auto;
}

#posts-grid {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  backdrop-filter: blur(0);
  border-bottom: 1px solid transparent;
  will-change: background, backdrop-filter, border-color;
  transition:
    background 320ms ease,
    backdrop-filter 320ms ease,
    border-color 320ms ease;
}

.topbar.scrolled {
  background: rgba(243, 237, 226, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(23, 21, 18, 0.14), transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 1.35rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav a[aria-current="true"] {
  color: var(--text);
}

.nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.content-card h3 a {
  color: inherit;
  text-decoration: none;
}

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

.posts-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.filter-panel {
  position: static;
  flex-shrink: 0;
  width: 240px;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.filter-panel-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.34);
  font-size: 0.95rem;
  transition: border-color 180ms ease;
  margin-bottom: 1.5rem;
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box svg {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  font-size: inherit;
  font-family: inherit;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--muted);
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.tag-filter:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
}

.tag-filter.active {
  background: var(--text);
  color: #f6f1e8;
  border-color: var(--text);
}

.category-filters {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.category-filter {
  display: flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.category-filter:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
}

.category-filter.active {
  background: var(--text);
  color: #f6f1e8;
  border-color: var(--text);
}

.no-results {
  text-align: center;
  padding: 3rem 0;
  color: var(--muted);
}

.no-results p {
  margin: 0;
}

.posts-list {
  flex: 1;
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.3rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  min-width: 2.1rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.pagination-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(173, 93, 54, 0.42);
  background: rgba(255, 252, 246, 0.9);
  transform: translateY(-1px);
}

.pagination-btn.active {
  color: #f6f1e8;
  border-color: var(--text);
  background: var(--text);
}

.pagination-btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.waterfall {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.waterfall .content-card {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* 文章卡片新布局 */
.post-card {
  display: flex;
  flex-direction: column;
}

.post-card-content {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

.post-card-body h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-card-body p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 文章卡片缩略图 */
.card-thumb {
  flex: 0 0 170px;
  width: 170px;
  min-height: 110px;
  align-self: stretch;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.card-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.content-card:hover .card-thumb img {
  transform: scale(1.04);
}

@media (max-width: 900px) {
  .posts-container {
    flex-direction: column;
  }
  
  .filter-panel {
    position: static;
    width: auto;
  }

  .pagination-controls {
    justify-content: flex-start;
  }

  .project-detail-container {
    padding-top: 2rem;
  }

  .project-detail-header {
    margin-bottom: 1.6rem;
  }

  .project-detail-section {
    padding: 1.05rem 1rem;
  }

  .project-gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-nav {
    flex-direction: column;
  }
}

main {
  padding: 4rem 0 2rem;
  box-sizing: border-box;
}

.hero,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: var(--space-5);
  align-items: start;
  padding: 3.5rem 0 var(--space-7);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.footer h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(3.4rem, 8vw, 6.9rem);
}

.hero-text {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.hero-stats {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: #f6f1e8;
  border-color: var(--text);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #23201c;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.45);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.7);
}

.hero-terminal {
  display: grid;
  gap: 1rem;
}

.terminal-window,
.terminal-panel,
.content-card,
.project-card,
.stack-card,
.about-card,
.note-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.terminal-window {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.terminal-bar,
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.terminal-bar span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(23, 21, 18, 0.2);
}

.terminal-body,
.terminal-content {
  padding: 1.4rem 1.2rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.terminal-body p,
.terminal-content p {
  margin: 0 0 0.72rem;
}

.prompt {
  color: var(--accent);
}

.dim {
  color: var(--muted);
}

.cursor-line::after {
  content: "";
  display: inline-block;
  width: 0.7ch;
  height: 1.1em;
  margin-left: 0.18rem;
  vertical-align: -0.16em;
  background: var(--text);
  animation: blink 1s steps(1) infinite;
}

.hero-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#about .hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: stretch;
}

.about-profile-card {
  display: grid;
  justify-items: center;
  text-align: center;
  align-content: start;
  gap: 1.15rem;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.about-avatar-wrap {
  display: flex;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.58);
}

.about-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-profile-meta {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
}

.about-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.38rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.about-role {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.about-profile-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.about-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  min-height: 2.4rem;
  min-width: 2.4rem;
  padding: 0;
  border-radius: 999px;
}

.about-link-icon {
  width: 1.08rem;
  height: 1.08rem;
  display: block;
  object-fit: contain;
}

.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10000;
  pointer-events: none;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.note-card {
  padding: 1.1rem;
  border-radius: var(--radius-md);
}

.note-card p {
  margin: 0.55rem 0 0;
}

.note-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section {
  width: 100%;
  padding: 0 0 var(--space-7);
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  max-width: 58rem;
  margin-bottom: 2rem;
}

.section-heading h2,
.footer h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.about-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-card,
.content-card,
.stack-card {
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.about-card h3,
.content-card h3,
.stack-card h3,
.project-main h3 {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
}

.project-main h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.project-main h3 a:hover,
.project-main h3 a:focus-visible {
  color: var(--accent);
}

.about-card p,
.content-card p,
.project-main p,
.stack-card li {
  color: var(--muted);
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-card {
  min-height: 100%;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-row,
.project-side {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.tag-row span,
.project-side span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  font-size: 0.85rem;
}

/* 首页文章卡片统一高度与分行 */
#home :is(#posts-grid, #projects-grid) .post-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#home :is(#posts-grid, #projects-grid) .post-card .card-topline {
  min-height: 1.4rem;
  margin-bottom: 0.9rem;
}

#home :is(#posts-grid, #projects-grid) .post-card h3 {
  margin: 0 0 0.8rem;
  line-height: 1.4;
  min-height: calc(1.4em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

#home :is(#posts-grid, #projects-grid) .post-card p {
  margin: 0;
  line-height: 1.65;
  min-height: calc(1.65em * 3);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

#home :is(#posts-grid, #projects-grid) .post-card .tag-row {
  margin-top: 1rem;
  min-height: 2.1rem;
  align-content: flex-start;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.post-tag:hover {
  background: rgba(173, 93, 54, 0.08);
  color: var(--accent);
  border-color: var(--accent);
}

.project-list {
  display: grid;
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 1.2rem;
  align-items: start;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
}

.project-card.is-clickable {
  cursor: pointer;
}

:is(.content-card, .project-card, .about-card, .stack-card, .note-card, .article-post-nav-link) {
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

:is(.content-card, .project-card, .about-card, .stack-card, .note-card, .article-post-nav-link):hover,
:is(.content-card, .project-card, .about-card, .stack-card, .note-card, .article-post-nav-link):focus-within {
  transform: translateY(-7px);
  border-color: rgba(173, 93, 54, 0.42);
  background: rgba(255, 252, 246, 0.9);
  box-shadow: 0 26px 62px rgba(31, 22, 14, 0.16);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(173, 93, 54, 0.12);
}

.project-detail-container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  max-width: 100%;
  min-height: calc(100vh - 210px);
  padding-top: 2.6rem;
}

.project-detail-header {
  margin: 0 auto 2.2rem;
}

.project-detail-title-block {
  display: grid;
  gap: 0.8rem;
}

.project-detail-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.project-detail-meta-divider {
  width: 1px;
  height: 0.85rem;
  background: var(--line-strong);
  opacity: 0.55;
}

.project-detail-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-detail-body {
  display: grid;
  gap: 1rem;
}

.project-detail-section {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.4rem;
}

.project-detail-section h2 {
  margin: 0 0 0.8rem;
  font-family: var(--font-mono);
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}

.project-detail-section h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1rem;
}

.project-detail-section p {
  margin: 0.62rem 0;
}

.project-detail-section ul {
  margin: 0.45rem 0 0.85rem;
  padding-left: 1.25rem;
}

.project-detail-section li {
  margin: 0.45rem 0;
}

.project-decision-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.project-decision-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.36);
  padding: 0.9rem 1rem;
}

.project-decision-card h4 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
}

.project-decision-card p {
  margin: 0.32rem 0;
}

.project-decision-tradeoff {
  color: var(--muted);
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.project-gallery-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
}

.project-gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.project-gallery-grid figcaption {
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.project-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
}

.project-not-found {
  text-align: center;
  padding: 4rem 2rem;
}

.section-workflow .workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 1rem;
}

.section-timeline .section-heading {
  margin-bottom: 1.5rem;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 1rem;
  padding-left: 1.25rem;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 1px;
  background: var(--line-strong);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.99rem;
  top: 0.62rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(173, 93, 54, 0.12);
}

.timeline-date {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 0.35rem;
}

.timeline-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.timeline-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
}

.terminal-panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.terminal-header {
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-state {
  color: var(--accent);
}

.stack-columns {
  display: grid;
  gap: 1rem;
}

.stack-card ul {
  margin: 0;
  padding-left: 1rem;
}

.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0 3rem;
  border-top: 1px solid var(--line);
}

.footer > div:first-child {
  width: 945px;
}

.footer-legal {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-legal a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-contact {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
  font-family: var(--font-mono);
  width: 220px;
}

.footer-contact a {
  position: relative;
  color: var(--muted);
}

.footer-contact a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.noscript-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  max-width: 24rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: rgba(23, 21, 18, 0.92);
  color: #f6f1e8;
  font-size: 0.9rem;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms ease,
    transform 560ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1080px) {
  .hero,
  .section-workflow .workflow-grid,
  .project-card,
  .footer {
    grid-template-columns: 1fr;
  }

  .project-meta {
    margin-bottom: 0.25rem;
  }

  .project-side {
    margin-top: 0;
  }

  #about .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0.9rem 1.1rem;
  }

  .about-grid,
  .card-grid,
  .hero-notes {
    grid-template-columns: 1fr;
  }

  main {
    padding-top: 2.5rem;
  }

  .hero {
    padding-top: 1rem;
  }

  .timeline-list {
    padding-left: 1rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .timeline-date {
    padding-top: 0;
  }

  .about-avatar-wrap {
    width: 100%;
  }
}

:is(#posts, #projects) .hero {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
}

:is(#posts, #projects) .hero-copy {
  width: 100%;
  max-width: 100%;
}

:is(#posts, #projects) .hero h1 {
  max-width: 100%;
  width: 100%;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

:is(#posts, #projects) .hero-text {
  max-width: 100%;
  width: 100%;
}

@media (max-width: 640px) {
  :root {
    --content-width: min(100vw - 1.1rem, 100%);
    --space-7: 4.5rem;
  }

  .topbar,
  .footer,
  main {
    width: min(100vw - 1.1rem, 100%);
  }

  .topbar-inner {
    width: min(100vw - 1.1rem, 100%);
  }

  .topbar {
    padding: 0.85rem 0;
  }

  .hero h1 {
    max-width: 100%;
  }

  .hero-actions,
  .footer {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .terminal-window,
  .terminal-panel,
  .project-card,
  .about-card,
  .content-card,
  .stack-card,
  .note-card {
    border-radius: 1.25rem;
  }
}

.article-container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  max-width: 100%;
  min-height: calc(100vh - 210px);
  padding-top: 2.6rem;
}

.article-header-section {
  width: calc(100% - (240px + 2rem));
  margin: 0 0 2.9rem;
  max-width: calc(1180px - 240px - 2rem);
}

.article-header-content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.article-category {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(173, 93, 54, 0.08);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0;
  align-self: flex-start;
}

.article-body-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.article-main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.article-content-wrapper {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.article-title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0;
}

.article-meta {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  width: 100%;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.article-meta-icon {
  width: 1rem;
  height: 1rem;
  opacity: 0.76;
  color: rgba(23, 21, 18, 0.72);
  flex-shrink: 0;
}

.article-meta-icon-tags {
  transform: translateY(0.2px);
}

.article-meta-divider {
  width: 1px;
  height: 0.86rem;
  background: var(--line-strong);
  opacity: 0.55;
}

.article-date {
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.article-tag-group {
  min-width: 0;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
  margin-left: 0;
  justify-content: flex-start;
}

.article-tags span {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.article-tags span + span::before {
  content: "/";
  color: var(--line-strong);
  margin-right: 0.58rem;
}

.article-header-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(23, 21, 18, 0.2), rgba(23, 21, 18, 0.08) 55%, transparent);
  opacity: 0.75;
}

@media (max-width: 900px) {
  .article-container {
    padding-top: 2rem;
  }

  .article-header-section {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 0.5rem 0.7rem;
  }

  .article-meta-divider {
    display: none;
  }

  .article-tags {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

.article-body {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-top: 0;
  padding-top: 0;
}

.article-body h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}

.article-body h2 {
  font-size: 1.4rem;
  margin: 2.2rem 0 1.1rem;
  padding: 0 0 0 0.6rem;
  border-left: 6px solid #ff7e79;
  font-weight: 700;
  line-height: 1.45;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.6rem;
  font-weight: 700;
  line-height: 1.45;
}

.article-body h4 {
  font-size: 1.08rem;
  margin: 1.2rem 0 0.5rem;
  font-weight: 700;
  line-height: 1.45;
}

.article-body h5,
.article-body h6 {
  font-size: 0.95rem;
  margin: 1rem 0 0.45rem;
  line-height: 1.5;
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body ul,
.article-body ol {
  margin: 0.75rem 0 1.25rem;
  padding-left: 1.6rem;
  line-height: 1.8;
}

.article-body li {
  margin: 0.6rem 0;
}

.article-body img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem 0 1.15rem;
  border-radius: 8px;
}

.article-body hr {
  margin: 1.6rem 0;
  border: 0;
  border-top: 1px solid rgba(23, 21, 18, 0.12);
}

.article-body a {
  color: #f22f27;
  text-decoration: none;
}

.article-body a:hover {
  color: #f55852;
  text-decoration: underline;
}

.article-body code {
  color: #c7254e;
  background-color: #f9f2f4;
  border-radius: 4px;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  padding: 2px 4px;
  font-size: 90%;
}

.article-body pre {
  overflow-x: auto;
  margin: 0;
  padding: 0;
  border-radius: 0 0 10px 10px;
  background: #ffffff;
  color: #3b3b3b;
  border: 1px solid rgba(23, 21, 18, 0.12);
  border-top: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
  box-shadow: 0 10px 26px rgba(23, 21, 18, 0.06);
}

.article-body pre code {
  display: block;
  color: inherit;
  background: transparent;
  padding: 0.45rem 0;
  border-radius: 0;
  font-size: 1em;
  font-family: Consolas, "Courier New", monospace;
}

.code-block {
  margin: 1.45rem 0;
}

.code-line {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  align-items: baseline;
  white-space: pre;
}

.code-line-number {
  padding: 0 0.45rem 0 0.25rem;
  text-align: right;
  color: rgba(23, 21, 18, 0.45);
  border-right: 1px solid rgba(23, 21, 18, 0.08);
  user-select: none;
}

.code-line-text {
  display: block;
  min-width: 0;
  padding: 0 0.9rem;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.52rem 0.95rem;
  margin: 0;
  border-radius: 10px 10px 0 0;
  background: #ffffff;
  border: 1px solid rgba(23, 21, 18, 0.12);
  border-bottom: 1px solid rgba(23, 21, 18, 0.08);
}

.code-header + pre {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}

.code-lang {
  font-family: "DengXian", "Microsoft YaHei", sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-family: "DengXian", "Microsoft YaHei", sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-1px);
  transition: color 180ms ease, border-color 180ms ease, opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.code-block:hover .code-copy-btn,
.code-copy-btn:focus-visible,
.code-copy-btn.copied {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.code-copy-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.code-copy-btn.copied {
  color: var(--accent);
  border-color: var(--accent);
}

.code-copy-btn svg {
  width: 14px;
  height: 14px;
}

.article-body blockquote {
  position: relative;
  margin: 0 0 1rem;
  padding: 1.25rem 2.1rem;
  border: none;
  background: rgba(255, 255, 255, 0.32);
  color: #777;
  font-style: normal;
}

.article-body blockquote::before {
  content: "“";
  position: absolute;
  left: 0.65rem;
  top: -0.15rem;
  color: #e0e0e0;
  font-size: 2.6rem;
  font-family: Arial, serif;
  line-height: 1;
  font-weight: 700;
}

.article-body blockquote::after {
  content: "”";
  position: absolute;
  right: 0.65rem;
  bottom: -1rem;
  color: #e0e0e0;
  font-size: 2.6rem;
  font-family: Arial, serif;
  line-height: 1;
  font-weight: 700;
}

.article-body figure {
  margin: 1rem 0;
}

.article-body figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.45rem 1.1rem;
  margin-bottom: 1.4rem;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.4rem;
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid rgba(23, 21, 18, 0.12);
  background: rgba(255, 255, 255, 0.35);
}

.article-body thead th {
  background: rgba(255, 255, 255, 0.62);
  font-weight: 700;
  text-align: left;
}

.article-body th,
.article-body td {
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(23, 21, 18, 0.1);
  vertical-align: top;
}

.article-body tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.2);
}

.article-body .footnotes,
.article-body section.footnotes {
  margin-top: 1.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(23, 21, 18, 0.12);
  color: var(--muted);
  font-size: 0.92rem;
}

.article-body a.footnote-ref,
.article-body .footnote-ref a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  margin-left: 0.1rem;
}

.article-body .footnotes ol {
  margin: 0.6rem 0 0;
  padding-left: 1.35rem;
}

.article-body .footnotes li {
  margin: 0.35rem 0;
}

.article-body a.footnote-backref {
  margin-left: 0.35rem;
  opacity: 0.7;
  text-decoration: none;
}

.article-body .admonition,
.article-body .callout,
.article-body div[data-callout] {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid rgba(173, 93, 54, 0.8);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
}

.article-body .admonition-title,
.article-body .callout-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.article-body blockquote.callout-note,
.article-body blockquote.callout-tip,
.article-body blockquote.callout-warning,
.article-body blockquote.callout-important {
  border-left: 4px solid rgba(173, 93, 54, 0.8);
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.4);
}

.article-body blockquote.callout-note::before,
.article-body blockquote.callout-note::after,
.article-body blockquote.callout-tip::before,
.article-body blockquote.callout-tip::after,
.article-body blockquote.callout-warning::before,
.article-body blockquote.callout-warning::after,
.article-body blockquote.callout-important::before,
.article-body blockquote.callout-important::after {
  content: none;
}

.article-body blockquote.callout-tip {
  border-left-color: #2f9e67;
}

.article-body blockquote.callout-warning {
  border-left-color: #d08b2a;
}

.article-body blockquote.callout-important {
  border-left-color: #b35252;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  transition: color 180ms ease;
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
}

.article-outline {
  position: sticky;
  top: 120px;
  flex-shrink: 0;
  width: 240px;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.outline-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.outline-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.outline-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 1.8rem;
  padding: 0.15rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.outline-link-text {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.outline-link::before {
  flex: 0 0 auto;
  width: 0.9rem;
  text-align: center;
  color: rgba(23, 21, 18, 0.5);
}

.outline-link:hover {
  color: var(--text);
  opacity: 0.9;
}

.outline-link.active {
  color: var(--accent);
  font-weight: 600;
}

.outline-link.h1 {
  padding-left: 0;
}

.outline-link.h1::before {
  content: "●";
}

.outline-link.h2 {
  padding-left: 0.75rem;
}

.outline-link.h2::before {
  content: "◦";
}

.outline-link.h3 {
  padding-left: 1.5rem;
  font-size: 0.88rem;
}

.outline-link.h3::before {
  content: "–";
}

.outline-link.h4 {
  padding-left: 2.25rem;
  font-size: 0.85rem;
}

.outline-link.h4::before {
  content: "·";
}

.outline-link.active::before {
  color: var(--accent);
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(420px, 58vh, 620px);
  color: var(--muted);
}

.article-not-found {
  text-align: center;
  padding: 4rem 2rem;
}

.article-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.article-post-nav-link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.article-post-nav-link.next {
  text-align: right;
  align-items: flex-end;
}

.article-post-nav-link.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.article-post-nav-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-post-nav-title {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1300px) {
  .article-header-section {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .article-outline {
    position: static;
    width: auto;
    margin-top: 2rem;
  }
  
  .article-body-wrapper {
    flex-direction: column;
  }

  .article-main-column {
    max-width: 100%;
  }
  
  .article-content-wrapper {
    max-width: 100%;
    padding: 1.2rem 1.1rem;
    border-radius: var(--radius-md);
  }

  .article-post-nav {
    flex-direction: column;
  }

  .article-post-nav-link.next {
    text-align: left;
    align-items: flex-start;
  }

  .article-post-nav-link.is-empty {
    display: none;
  }
}

.article-body .mermaid {
  margin: 2rem 0;
  text-align: center;
}

.article-body .mermaid svg {
  max-width: 100%;
  height: auto;
}

.article-body .math-block {
  display: block;
  overflow-x: auto;
  margin: 1.5rem 0;
  padding: 0.8rem 0;
  text-align: center;
  font-size: 1.1rem;
}

.article-body .math-inline {
  padding: 0 0.15em;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.article-body img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(23,21,18,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.img-lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

.img-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  cursor: default;
}

.img-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 1.4rem;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  transition: background 180ms ease;
}

.img-lightbox-close:hover {
  background: rgba(0,0,0,0.7);
}
