:root {
  --bg: #f6f5f1;
  --text: #12131a;
  --muted: #7b808a;
  --line: rgba(18, 19, 26, 0.1);
  --line-strong: rgba(18, 19, 26, 0.16);
  --card: rgba(255, 255, 255, 0.56);
  --surface-solid: #fff;
  --media-placeholder: #dfe5f3;
  --text-inverse: #fff;
  --radius-media: 18px;
  --radius-card: 20px;
  --radius-pill: 999px;
  --shadow: 0 1px 0 rgba(18, 19, 26, 0.02);
  --shadow-soft: 0 14px 32px rgba(18, 19, 26, 0.04);
  --shadow-frame: none;
}
html[data-theme="dark"] {
  --bg: #0f1115;
  --text: #f2f4f8;
  --muted: #a2a8b3;
  --line: rgba(242, 244, 248, 0.1);
  --line-strong: rgba(242, 244, 248, 0.16);
  --card: rgba(18, 24, 38, 0.56);
  --surface-solid: #151923;
  --media-placeholder: #202737;
  --text-inverse: #fff;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.22);
  --shadow-frame: none;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
a, button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button { font: inherit; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text) 42%, transparent);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; }
.wrap { width: min(1216px, calc(100vw - 160px)); margin: 0 auto; }
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 64px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .2s ease, box-shadow .2s ease;
}
html[data-scrolled] .topbar {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 50%, transparent);
}
.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  outline-offset: 3px;
}
.brand, .nav, .actions { display: flex; align-items: center; }
.brand {
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text);
}
.menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.brand-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none'%3E%3Cpath fill='black' d='M140.98 8.21C79.76 7.16 30.11 54.09 21.68 116.44C39.91 77.16 79.06 43.02 132.87 42.94C161.55 42.9 185.04 54.71 199.87 71.61C202.72 75.01 206.48 78.89 215.19 78.89C225.56 78.89 233.76 69.43 233.76 61.92C233.76 52.91 229.72 49.11 223.71 43.08C202.24 21.44 173.74 8.77 140.98 8.21Z'/%3E%3Cpath fill='black' d='M214.88 176.28C207.42 176.78 203.69 181.83 200.78 185.09C185.89 201.06 166.88 210.69 140.11 210.92C113.98 210.92 93.36 199.94 75.82 182.02C89.89 211.72 113.17 236.19 149.64 247.7C182.12 245.11 207.37 230.16 228.22 206.76C232.18 202.24 233.98 198.29 233.75 193.46C233.22 184.25 225.31 175.62 214.88 176.28Z'/%3E%3Cpath fill='black' d='M21.67 137.68C30.88 102.19 53.94 71.78 97.61 55.36C72.15 74.91 58.71 99.79 58.68 130.06C58.67 138.21 59.97 146.07 61.87 153.83C67.93 190.75 92.01 226.71 130.68 247.7C84.01 243.73 43.09 213.78 26.91 169.11C23.49 158.92 22.06 149.33 21.67 137.68Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none'%3E%3Cpath fill='black' d='M140.98 8.21C79.76 7.16 30.11 54.09 21.68 116.44C39.91 77.16 79.06 43.02 132.87 42.94C161.55 42.9 185.04 54.71 199.87 71.61C202.72 75.01 206.48 78.89 215.19 78.89C225.56 78.89 233.76 69.43 233.76 61.92C233.76 52.91 229.72 49.11 223.71 43.08C202.24 21.44 173.74 8.77 140.98 8.21Z'/%3E%3Cpath fill='black' d='M214.88 176.28C207.42 176.78 203.69 181.83 200.78 185.09C185.89 201.06 166.88 210.69 140.11 210.92C113.98 210.92 93.36 199.94 75.82 182.02C89.89 211.72 113.17 236.19 149.64 247.7C182.12 245.11 207.37 230.16 228.22 206.76C232.18 202.24 233.98 198.29 233.75 193.46C233.22 184.25 225.31 175.62 214.88 176.28Z'/%3E%3Cpath fill='black' d='M21.67 137.68C30.88 102.19 53.94 71.78 97.61 55.36C72.15 74.91 58.71 99.79 58.68 130.06C58.67 138.21 59.97 146.07 61.87 153.83C67.93 190.75 92.01 226.71 130.68 247.7C84.01 243.73 43.09 213.78 26.91 169.11C23.49 158.92 22.06 149.33 21.67 137.68Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.nav {
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  margin-left: 8px;
}
.nav a {
  padding: 4px 0;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  position: relative;
  transition: color .18s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
  opacity: .28;
}
.nav a:hover {
  color: var(--text);
}
.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}
.nav a[aria-current="page"] {
  color: var(--text);
}
.nav a[aria-current="page"]::after {
  opacity: 1;
  animation: nav-underline-in .35s cubic-bezier(.2, .8, .2, 1) .1s forwards;
}
.nav a:focus-visible,
.ghost-btn:focus-visible,
.login-btn:focus-visible,
.icon-btn:focus-visible,
.socials a:focus-visible {
  color: var(--text);
}
@keyframes nav-underline-in {
  to { transform: scaleX(1); }
}
.actions {
  gap: 10px;
  margin-left: auto;
  padding: 6px 0;
}
.ghost-btn, .login-btn, .icon-btn { border: 0; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  transition: background .18s ease;
}
.icon-btn:hover {
  background: color-mix(in srgb, var(--card) 64%, transparent);
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  background: color-mix(in srgb, var(--card) 38%, transparent);
  transition: opacity .18s ease, color .18s ease, background .18s ease;
}
.ghost-btn:hover {
  color: var(--text);
  opacity: 1;
  background: color-mix(in srgb, var(--card) 62%, transparent);
}
.ghost-btn--muted {
  cursor: default;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 28%, transparent);
}
.ghost-btn--muted:hover {
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 28%, transparent);
}
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background: #121826;
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  transition: background .18s ease;
}
.login-btn:hover {
  background: color-mix(in srgb, #121826 82%, transparent);
}
html[data-theme="dark"] .login-btn { background: #f2f4f8; color: #121826; }
html[data-theme="dark"] .login-btn:hover {
  background: color-mix(in srgb, #f2f4f8 84%, transparent);
}
.page-shell { padding: 88px 0 56px; }
.home-shell { padding: 0; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(332px, 0.82fr);
  gap: 72px;
  align-items: center;
  min-height: min(800px, calc(100svh - 64px));
  padding: 0 0 12px;
}
.home-intro {
  max-width: 620px;
  padding-top: 14px;
}
.home-gallery {
  position: relative;
  margin-left: auto;
  margin-top: 30px;
  width: min(100%, 360px);
  height: 480px;
}
.home-title {
  margin: 0;
  font-size: clamp(44px, 4vw, 58px);
  line-height: .98;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.home-lead {
  margin: 26px 0 0;
  max-width: 33ch;
  color: var(--muted);
  line-height: 1.78;
  font-size: 16px;
}
.socials {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  margin-top: 30px;
}
.avatar {
  width: 34px;
  height: 34px;
  position: relative;
  margin-right: 14px;
  border-radius: var(--radius-pill);
  background: url("/assets/hero-chip.jpg") center/cover;
  box-shadow: none;
}
.avatar::after {
  content: "";
  position: absolute;
  top: 7px;
  right: -14px;
  height: 18px;
  border-left: 1px solid var(--line-strong);
}
.socials a {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: color .18s ease, transform .18s ease, opacity .18s ease;
}
.socials a:hover {
  transform: translateY(-1px);
  color: var(--text);
  opacity: 1;
}
.social-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-gallery-card {
  position: absolute;
  inset-inline: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  border-radius: 24px;
  background: var(--media-placeholder);
  color: inherit;
  text-align: inherit;
  isolation: isolate;
  cursor: pointer;
  will-change: top, height, opacity, transform;
  transition:
    top .44s cubic-bezier(.2, .8, .2, 1),
    height .44s cubic-bezier(.2, .8, .2, 1),
    opacity .26s ease,
    transform .3s ease,
    box-shadow .28s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-gallery-card:not(.is-active) {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.hero-gallery-image,
.hero-gallery-overlay,
.hero-gallery-copy {
  position: absolute;
  inset: 0;
}
.hero-gallery-image {
  background: var(--media-placeholder) center/cover no-repeat;
  filter: saturate(.98) brightness(.96);
  transition: filter .24s ease;
}
.hero-gallery-overlay {
  background:
    linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(0,0,0,.18) 100%),
    linear-gradient(180deg, rgba(0,0,0,0) 54%, rgba(0,0,0,.5) 100%),
    linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity .24s ease;
}
.hero-gallery-copy {
  inset: auto 0 0 0;
  padding: 16px;
  display: grid;
  justify-items: end;
  gap: 4px;
  color: #fff;
  text-align: right;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .28s ease, transform .32s ease;
}
.hero-gallery-kicker {
  font-size: 12px;
  line-height: 1;
  opacity: .82;
}
.hero-gallery-title {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 620;
  max-width: 18ch;
}
.hero-gallery-card.is-active {
  z-index: 10;
}
.hero-gallery-card.is-active .hero-gallery-overlay,
.hero-gallery-card.is-active .hero-gallery-copy {
  opacity: 1;
}
.hero-gallery-card.is-active .hero-gallery-copy {
  transform: translateY(0);
}
.hero-gallery-card.is-active .hero-gallery-image {
  filter: saturate(1) brightness(1);
}
.hero-gallery-card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--text) 18%, transparent),
    0 16px 36px rgba(18, 19, 26, 0.14);
}
.hero-gallery-card:active {
  transform: scale(.995);
}

.blog-page {
  padding: 28px 0 84px;
}
.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 30px;
  align-items: center;
  padding: 8px 0 26px;
}
.blog-hero,
.blog-hero-cover,
.blog-hero-copy {
  transition: opacity .18s ease, transform .18s ease;
}
.blog-hero.is-switching {
  opacity: .84;
}
.blog-hero.is-switching .blog-hero-cover {
  transform: scale(.995);
}
.blog-hero-cover {
  display: block;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: none;
  background: var(--media-placeholder);
  transition: transform .22s ease, filter .22s ease;
}
.blog-hero-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1.78;
  object-fit: cover;
  filter: saturate(.99) contrast(1.01);
  transition: transform .32s ease, filter .22s ease;
}
.blog-hero-cover:hover img,
.blog-hero-cover:focus-visible img {
  transform: scale(1.02);
  filter: saturate(1.03) contrast(1.02);
}
.blog-hero-copy {
  min-width: 0;
  padding-top: 2px;
}
.blog-profile .blog-hero-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
}
.blog-profile h1 {
  margin: 0;
  font-size: clamp(34px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.028em;
}
.blog-profile h1 a {
  color: inherit;
  display: block;
  max-width: none;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.blog-profile p {
  margin: 20px 0 0;
  max-width: 30ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.blog-hero-meta {
  margin-top: 18px;
  color: color-mix(in srgb, var(--text) 92%, transparent);
  font-size: 14px;
}
.blog-hero-meta strong { font-weight: 700; }
.blog-featured {
  padding: 0 0 12px;
}
.blog-featured h2,
.listing-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.024em;
}
.blog-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.blog-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transition: opacity .18s ease, color .18s ease;
}
.blog-card:hover { transform: none; }
.blog-card a { display: grid; color: inherit; }
.blog-card .item-media {
  min-height: 198px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-media);
  overflow: hidden;
  background: var(--media-placeholder) center/cover no-repeat;
  transition: filter .18s ease, transform .18s ease;
}
.blog-card--logo .item-media {
  background: color-mix(in srgb, var(--bg) 82%, var(--surface-solid)) center/cover no-repeat;
}
.blog-card--logo .item-media::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: center/contain no-repeat url('/assets/post-grok2api.png');
}
.blog-card .item-copy { padding: 12px 0 0; }
.blog-card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.2; }
.blog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
  font-size: 13px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.blog-card a:hover h3,
.home-card a:hover h3,
.project-work h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.blog-card a:hover .item-media,
.home-card a:hover .item-media {
  filter: saturate(1.02) brightness(.99);
}
.blog-listing {
  padding: 20px 0 68px;
}
.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}
.listing-head p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 38ch;
  line-height: 1.72;
  font-size: 13px;
}
.listing-panel {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  gap: 30px;
}
.listing-filters {
  display: grid;
  gap: 14px;
  align-content: start;
  position: sticky;
  top: 92px;
}
.search-block {
  display: grid;
}
.blog-search {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0 13px;
  font: inherit;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease;
}
.blog-search::placeholder { color: var(--muted); }
.blog-search:focus-visible {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--line-strong) 10%, transparent);
}
.filter-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
}
.filter-block .chip-row { gap: 8px; }
.filter-block .chip-row button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(127,127,127,0.04);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.filter-block .chip-row button:first-child {
  color: var(--text);
  border-color: var(--line-strong);
}
.filter-block .chip-row button[aria-pressed="true"] {
  color: var(--text-inverse);
  border-color: var(--text);
  background: var(--text);
}
.filter-block .chip-row button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
}
.filter-block .chip-row button[aria-pressed="true"]:hover {
  opacity: .9;
}
.listing-empty {
  padding: 18px 0 6px;
  color: var(--muted);
  font-size: 14px;
}
.listing-items { display: grid; gap: 10px; }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  min-height: 86px;
}
.list-item--featured {
  padding: 0;
}
.list-item--featured a {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}
.list-item--featured .item-media { min-height: 142px; }
.list-item--featured .item-copy { padding: 18px 18px 18px 0; }
.list-item--featured .item-meta { margin-top: 0; }
.article-link { display: block; font-weight: 600; }
.list-item span { color: var(--muted); font-size: 13px; }
.list-item:not(.list-item--featured) {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  min-height: auto;
}
.list-item:not(.list-item--featured) .article-link {
  font-weight: 500;
}
.blog-grid .item-media {
  background-position: center;
  background-size: cover;
}
.blog-grid .blog-card--logo .item-media {
  display: grid;
  place-items: center;
}
.blog-grid .blog-card--logo .item-media::before {
  width: 72%;
  height: 72%;
}
.blog-page .listing-items {
  display: grid;
  gap: 0;
}
.blog-page .list-item {
  display: block;
  padding: 13px 0;
  min-height: auto;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: border-color .18s ease, color .18s ease;
}
.blog-page .list-item--featured {
  border-top: 0;
  padding-top: 0;
}
.blog-page .list-item--featured a {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}
.blog-page .list-item--featured .item-media {
  min-height: 148px;
  border-radius: 18px;
}
.blog-page .list-item--featured .item-copy {
  padding: 16px 18px 16px 0;
}
.blog-page .list-item:not(.list-item--featured) .item-copy {
  padding: 0;
}
.blog-page .list-item:not(.list-item--featured) .item-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}
.blog-page .list-item:not(.list-item--featured) .article-link {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.42;
  transition: color .18s ease;
}
.blog-page .list-item:focus-visible {
  outline: none;
}
.blog-page .list-item:focus-visible .article-link,
.blog-page .list-item:hover .article-link {
  color: var(--text);
}
.blog-page .list-item:hover {
  transform: none;
  border-top-color: var(--line-strong);
}
.blog-page .list-item span {
  color: var(--muted);
  font-size: 12px;
}
.blog-section {
  padding: 18px 0 20px;
}
.blog-section-grid {
  display: grid;
  gap: 40px;
}
.blog-section-grid--recent {
  grid-template-columns: minmax(0, 1.78fr) minmax(260px, 0.95fr);
  align-items: start;
}
.blog-section-grid--archive {
  grid-template-columns: minmax(240px, 0.92fr) minmax(0, 1.78fr);
  align-items: start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.recent-card {
  overflow: hidden;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
}
.recent-card a {
  display: grid;
  color: inherit;
}
.recent-card-media {
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: var(--media-placeholder) center/cover no-repeat;
}
.recent-card-media--dialogue {
  background-image: url("/assets/blog-hero-dialogue.png");
}
.recent-card-media--bench {
  background-image: url("/assets/blog-benchmark-card.png");
}
.recent-card-media--grok {
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.18) 100%),
    url("/assets/post-grok2api.png") center/contain no-repeat,
    var(--surface-solid);
  background-size: cover, 72% auto, auto;
}
.recent-card-media--agents {
  background-image: url("/assets/blog-agents-card.png");
}
.recent-card-copy {
  padding: 12px 0 0;
}
.recent-card-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.recent-card-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 13px;
}
.recent-card-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.recent-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: url("/assets/hero-chip.jpg") center/cover;
  box-shadow: none;
}
.recent-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .4;
}
.recent-aside,
.archive-aside {
  position: sticky;
  top: 92px;
  align-self: start;
}
.blog-section-aside h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.blog-section-aside p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}
.section-stats {
  margin-top: 14px !important;
  font-size: 13px;
}
.read-more--button {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 18px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}
.read-more--button:hover {
  border-color: var(--line-strong);
}
.archive-list {
  display: grid;
  gap: 0;
}
.archive-row {
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}
.archive-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.archive-row-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.archive-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.archive-row h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.archive-row p {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.78;
  font-size: 14px;
}
.intro-band {
  border-top: 1px solid var(--line);
  padding: 56px 0 78px;
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) 280px;
  gap: 64px;
  align-items: start;
}
.posts {
  display: grid;
  gap: 18px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.section-head h2,
.grid-title,
.about-title,
.article-title {
  margin: 0;
  font-size: 23px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.section-head p,
.about-note,
.page-hero p,
.summary-panel p,
.article-meta,
.post p,
.prose p,
.about-summary,
.about-small,
.footer-note {
  color: var(--muted);
  line-height: 1.75;
}
.section-head p { margin: 6px 0 0; font-size: 14px; max-width: 44ch; }
.read-more { font-weight: 600; white-space: nowrap; }
.post {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.post-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}
.post-media {
  min-height: 150px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 24%, rgba(0,0,0,0.56) 100%), url("/assets/blog-hero-dialogue.png") center/cover;
}
.post-media--grok { background-image: linear-gradient(180deg, rgba(0,0,0,0) 24%, rgba(0,0,0,0.56) 100%), url("/assets/post-grok2api.png"); }
.post-media--bench { background-image: linear-gradient(180deg, rgba(0,0,0,0) 24%, rgba(0,0,0,0.56) 100%), url("/assets/blog-benchmark-card.png"); }
.post-media--agents { background-image: linear-gradient(180deg, rgba(0,0,0,0) 24%, rgba(0,0,0,0.56) 100%), url("/assets/blog-agents-card.png"); }
.post-copy {
  padding: 18px 20px;
}
.post-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.post h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.16;
}
.post p { margin: 0; font-size: 14px; max-width: 60ch; }
.home-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 24px;
  margin-top: 10px;
}
.home-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.home-card a {
  display: grid;
  color: inherit;
}
.home-card .item-media {
  min-height: 184px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-media);
  background: var(--media-placeholder) center/cover no-repeat;
  transition: filter .18s ease, transform .18s ease;
}
.home-card:first-child .item-media {
  background-position: center 44%;
}
.home-card .item-copy {
  padding: 14px 0 0;
}
.home-card .post-top {
  margin-bottom: 8px;
}
.home-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.18;
  font-weight: 650;
}
.home-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-panel {
  position: sticky;
  top: 84px;
  align-self: start;
  padding-top: 8px;
}
.side-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.side-card h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.18; }
.side-card p { margin: 0; }
.summary-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.summary-metrics div {
  padding: 11px 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
.summary-metrics strong { display: block; font-size: 18px; line-height: 1; }
.summary-metrics span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.side-card blockquote {
  margin: 16px 0 0;
  padding: 12px 0 0 14px;
  border-left: 3px solid currentColor;
  background: transparent;
  color: var(--muted);
  line-height: 1.75;
}
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
}
.about-layout--light {
  max-width: 980px;
}
.about-shell {
  padding: 112px 0 72px;
}
.about-page-hero {
  display: grid;
  gap: 12px;
  max-width: 720px;
  padding: 0 0 28px;
}
.about-page-top {
  max-width: 54ch;
}
.about-page-top h1 {
  margin: 0;
  font-size: clamp(42px, 3.8vw, 54px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.about-hero {
  padding-top: 0;
}
.about-eye, .about-eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.about-headline {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.about-summary {
  margin: 16px 0 0;
  max-width: 58ch;
}
.project-card,
.list-item,
.article-card,
.toc,
.post-nav a,
.related a,
.site-footer a {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.about-meta strong,
.site-footer strong,
.article-meta strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}
.about-stack {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 92px;
  align-self: start;
}
.about-stack--light {
  gap: 22px;
}
.about-note-block {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.about-note-block strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}
.about-note-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}
.about-note-block a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.info-card,
.project-card,
.article-card,
.list-item,
.toc,
.post-nav a,
.related a {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.info-card { padding: 20px; }
.info-card h2 { margin: 0 0 10px; font-size: 18px; }
.info-card p { margin: 0; color: var(--muted); line-height: 1.75; }
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chip-row span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(127,127,127,0.04);
}
.page-hero { max-width: 58ch; padding-top: 8px; }
.page-hero h1,
.article-title {
  margin: 0;
  font-size: clamp(46px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.article-shell { max-width: 1040px; }
.article-shell > .page-hero,
.article-shell > .toc,
.article-shell > .prose,
.article-shell > .post-nav,
.article-shell > .related {
  max-width: 860px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
}
.article-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.toc {
  margin-top: 28px;
  padding: 18px 20px;
}
.toc strong { display: block; margin-bottom: 10px; }
.toc a {
  display: block;
  color: var(--muted);
  line-height: 1.9;
}
.prose {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}
.prose section {
  padding: 0;
  line-height: 1.85;
}
.prose h2 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.18;
}
.prose p { margin: 0; }
.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.25em;
  color: var(--muted);
  line-height: 1.8;
}
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--text); }
.prose blockquote {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 3px solid currentColor;
  background: rgba(127, 127, 127, 0.06);
  color: var(--muted);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.prose table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  margin: 0;
}
.prose th,
.prose td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  border-top: 0;
  background: rgba(127, 127, 127, 0.04);
  color: var(--text);
  font-weight: 600;
}
.prose td { color: var(--muted); }
.prose a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.prose :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(127, 127, 127, 0.12);
}
.prose pre {
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 8%, var(--surface-solid));
  color: var(--text);
}
.prose pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  background: transparent;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
}
.post-nav {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.post-nav a {
  padding: 10px 14px;
  border-radius: 999px;
}
.related {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}
.related strong { display: block; margin-bottom: 4px; }
.related a {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.related a:hover,
.post-nav a:hover,
.site-footer a:hover,
.about-links a:hover,
.project-card:hover,
.article-card:hover,
.toc:hover,
.related a:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}
.related span { color: var(--muted); }
.list { margin-top: 30px; display: grid; gap: 12px; }
.list-item,
.project-card,
.article-card {
  padding: 0;
  overflow: hidden;
}
.list-item a,
.project-card a,
.article-card a { color: inherit; }
.list-item--featured a,
.article-card a {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}
.list-item--featured .item-media,
.article-card .item-media {
  min-height: 148px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 24%, rgba(0,0,0,0.56) 100%), url("/assets/blog-hero-tech.png") center/cover;
}
.list-item--featured .item-copy,
.article-card .item-copy { padding: 18px 20px; }
.list-item--featured h3,
.article-card h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.16; }
.list-item--featured p,
.article-card p { margin: 0; }
.list-item--featured .item-meta,
.article-card .item-meta {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.project-shell {
  padding: 128px 0 108px;
}
.project-hero {
  max-width: 620px;
}
.project-hero h1 {
  margin: 0;
  font-size: clamp(50px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.034em;
  font-weight: 600;
}
.project-hero p {
  margin: 13px 0 0;
  color: color-mix(in srgb, var(--muted) 94%, white 6%);
  line-height: 1.68;
  font-size: 13px;
  max-width: 27ch;
}
.project-layout {
  margin-top: 42px;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 54px;
  align-items: start;
}
.project-aside {
  position: sticky;
  top: 136px;
  align-self: start;
  min-height: 0;
}
.project-detail {
  min-height: 0;
  display: block;
  transition: opacity .22s ease, transform .22s ease;
}
.project-detail.is-switching {
  opacity: .5;
  transform: translateY(4px);
}
.project-aside h2 {
  margin: 0 0 16px;
  font-size: 23px;
  line-height: 1.33;
  letter-spacing: -0.024em;
  font-weight: 600;
}
.project-aside p {
  margin: 0;
  color: var(--muted);
  line-height: 1.74;
  font-size: 13.5px;
  max-width: 33ch;
}
.project-stack {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: block;
  gap: 6px;
  color: color-mix(in srgb, var(--muted) 94%, white 6%);
  font-size: 13.5px;
  line-height: 1.72;
}
.project-stack strong {
  color: color-mix(in srgb, var(--text) 86%, transparent);
  font-weight: 580;
}
.project-showcase {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  align-items: start;
}
.project-work {
  display: grid;
  gap: 10px;
  opacity: .7;
  transform: scale(.975);
  transform-origin: center top;
  cursor: pointer;
  filter: saturate(.98);
  transition: opacity .26s ease, transform .3s cubic-bezier(.2, .8, .2, 1), filter .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.project-work.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: saturate(1) blur(0);
}
.project-work:hover:not(.is-active) {
  opacity: .88;
  transform: scale(.985);
  filter: saturate(.99);
}
.project-work:focus-visible:not(.is-active),
.project-work:focus-within:not(.is-active) {
  opacity: .88;
  transform: scale(.985);
  filter: saturate(.99);
  outline: none;
}
.project-frame {
  display: block;
  border-radius: 26px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 34%, white 66%);
  box-shadow: 0 1px 0 rgba(18, 19, 26, 0.02);
  transition: transform .22s ease, filter .22s ease, opacity .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.project-frame img {
  width: 100%;
  aspect-ratio: 1.28;
  object-fit: cover;
}
.project-work:hover .project-frame {
  transform: none;
  border-color: color-mix(in srgb, var(--line-strong) 46%, white 54%);
}
.project-work.is-active .project-frame,
.project-work:focus-visible .project-frame,
.project-work:focus-within .project-frame {
  border-color: color-mix(in srgb, var(--line-strong) 88%, white 12%);
  box-shadow: 0 10px 28px rgba(18, 19, 26, 0.08), 0 1px 0 rgba(18, 19, 26, 0.03), inset 0 0 0 1px color-mix(in srgb, var(--line-strong) 12%, transparent);
}
.project-work:not(.is-active):focus-visible .project-frame,
.project-work:not(.is-active):focus-within .project-frame {
  border-color: color-mix(in srgb, var(--line-strong) 56%, white 44%);
  box-shadow: 0 6px 18px rgba(18, 19, 26, 0.05), 0 1px 0 rgba(18, 19, 26, 0.03);
}
.project-work[aria-current="true"] h3 a {
  text-decoration: none;
  font-weight: 640;
}
.project-detail {
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .24s ease;
  transform: translateY(0);
  opacity: 1;
  will-change: transform, opacity;
}
.project-detail.is-switching {
  transform: translateY(5px);
  opacity: .8;
}
.project-card-copy {
  display: grid;
  gap: 8px;
}
.project-work h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.28;
  color: var(--text);
  font-weight: 590;
}
.project-work[aria-current="true"] h3 {
  font-weight: 640;
}
.project-link {
  width: fit-content;
  font-size: 12px;
  line-height: 1;
  color: color-mix(in srgb, var(--text) 76%, transparent);
  padding-bottom: 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 42%, transparent);
  transition: color .18s ease, border-color .18s ease;
}
.project-card-stack {
  position: relative;
}
.project-card-copy {
  position: relative;
  z-index: 1;
}
.project-link:hover,
.project-link:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--line-strong) 84%, transparent);
}
.site-footer {
  margin-top: 14px;
  padding: 34px 0 42px;
  border-top: 1px solid color-mix(in srgb, var(--line) 90%, white 10%);
  color: color-mix(in srgb, var(--muted) 94%, white 6%);
  font-size: 11.5px;
}
.site-footer-inner {
  display: grid;
  grid-template-columns: 1.06fr repeat(3, minmax(102px, 1fr));
  gap: 12px 18px;
}
.site-footer strong {
  display: block;
  color: color-mix(in srgb, var(--text) 86%, transparent);
  margin-bottom: 7px;
}
.site-footer a {
  display: block;
  line-height: 1.62;
}
.site-footer p {
  margin: 0;
  line-height: 1.54;
  max-width: 29ch;
}
.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--line) 88%, white 12%);
  color: color-mix(in srgb, var(--muted) 95%, white 5%);
}
.article-top {
  display: grid;
  gap: 16px;
}
.article-cover {
  height: 360px;
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.4) 100%), url("/assets/blog-hero-tech.png") center/cover;
  box-shadow: var(--shadow-soft);
}
.article-cover.alt-1 { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.4) 100%), url("/assets/post-benchmark.jpg") center/cover; }
.article-cover.alt-2 { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.4) 100%), url("/assets/blog-hero-tech.png") center/cover; }
.article-cover.alt-3 { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.4) 100%), url("/assets/post-agents.png") center/cover; }
.article-cover .hero-feature-copy { align-items: flex-end; text-align: right; }
.article-body-wrap { display: grid; gap: 24px; }
.article-lede { max-width: 72ch; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}
.article-body { min-width: 0; }
.article-body h2[id],
.prose h2[id] {
  scroll-margin-top: 104px;
}
.article-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  align-self: start;
}
.article-side .side-card { padding: 18px 18px 16px; }
.article-side .side-card h3,
.article-side .side-card h2 { margin: 0 0 10px; font-size: 18px; }
.article-side .side-card p { margin: 0; }
.article-side .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.article-author .avatar { width: 36px; height: 36px; }
.article-index {
  display: grid;
  gap: 12px;
}
.article-mobile-nav {
  display: none;
}
.article-index a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(127,127,127,0.04);
  color: var(--muted);
  transition: border-color .18s ease, color .18s ease, background .18s ease, opacity .18s ease;
}
.article-index span {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(127,127,127,0.04);
  color: var(--muted);
  opacity: .84;
}
.article-index a:hover { border-color: var(--line-strong); }
.article-index a[aria-current="true"] {
  color: var(--text);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
}
.article-index a:not([aria-current="true"]):not(:hover) {
  opacity: .8;
}

@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 32px);
    max-width: 1440px;
  }
  .home-hero,
  .intro-grid,
  .about-layout,
  .article-layout,
  .project-layout,
  .blog-hero,
  .listing-panel { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-hero-copy { padding-top: 0; }
  .blog-hero-copy p { max-width: 44ch; }
  .blog-hero {
    gap: 18px;
  }
  .blog-profile h1 {
    font-size: clamp(34px, 4.8vw, 48px);
  }
  .blog-hero-gallery {
    width: 100%;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 116px 96px;
  }
  .blog-section-grid--recent,
  .blog-section-grid--archive {
    grid-template-columns: 1fr;
  }
  .recent-aside,
  .archive-aside {
    position: static;
  }
  .home-gallery { margin-left: 0; width: 100%; }
  .side-panel,
  .about-stack,
  .project-aside,
  .article-side { position: static; top: auto; }
  .project-work--small {
    justify-self: stretch;
    width: 100%;
    margin: 0;
  }
  .listing-panel { gap: 20px; }
  .listing-filters { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 24px);
    max-width: 1440px;
  }
  .page-shell {
    padding-top: calc(72px + env(safe-area-inset-top));
  }
  .topbar-inner { height: 58px; gap: 10px; }
  .topbar {
    min-height: calc(58px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }
  .menu-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: -8px;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .nav {
    display: none;
    position: absolute;
    left: 10px;
    top: calc(58px + env(safe-area-inset-top));
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg);
    box-shadow: var(--shadow-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 148px;
  }
  .nav a {
    min-height: 40px;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 4px;
  }
  .nav a[aria-current="page"]::after { display: none; }
  html[data-menu-open] .nav { display: flex; }
  .nav a[aria-current="page"] {
    background: color-mix(in srgb, var(--card) 62%, transparent);
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
    font-weight: 600;
  }
  .actions {
    gap: 4px;
  }
  html[data-menu-open] .actions {
    opacity: .16;
    pointer-events: none;
  }
  .ghost-btn {
    display: inline-flex;
    height: 30px;
    padding: 0 8px;
    font-size: 13px;
  }
  .login-btn {
    display: none;
  }
  .home-hero { min-height: auto; padding: 24px 0 18px; gap: 22px; }
  .home-intro { padding-top: 8px; }
  .home-title {
    font-size: clamp(36px, 11vw, 48px);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .home-gallery {
    width: min(100%, 520px);
    height: clamp(340px, 86vw, 480px);
  }
  .hero-gallery-copy {
    padding: 14px;
  }
  .hero-gallery-title { font-size: 18px; }
  .home-card-grid { grid-template-columns: 1fr; }
  .home-card-grid { gap: 22px; }
  .home-card .item-media { min-height: clamp(190px, 52vw, 240px); }
  .read-more {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
  }
  .intro-band { padding: 44px 0 56px; }
  .blog-hero {
    gap: 18px;
    padding: 12px 0 20px;
  }
  .blog-profile h1 {
    font-size: clamp(30px, 8.4vw, 38px);
  }
  .blog-page {
    padding: 18px 0 64px;
  }
  .blog-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 12px 0 18px;
  }
  .blog-profile h1 {
    font-size: clamp(30px, 7.6vw, 36px);
  }
  .blog-profile h1 a {
    max-width: none;
  }
  .blog-profile p {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }
  .blog-featured {
    padding-top: 10px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .blog-card .item-media {
    min-height: 200px;
  }
  .blog-card p {
    -webkit-line-clamp: 3;
  }
  .listing-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .listing-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .listing-filters {
    position: static;
  }
  .listing-items {
    gap: 0;
  }
  .blog-page .list-item--featured a {
    grid-template-columns: 1fr;
  }
  .blog-page .list-item--featured .item-copy {
    padding: 14px 0 0;
  }
  .blog-page .list-item--featured .item-media {
    min-height: 200px;
  }
  .blog-section {
    padding: 10px 0 12px;
  }
  .blog-section-grid {
    gap: 22px;
  }
  .recent-grid {
    grid-template-columns: 1fr;
  }
  .blog-section-aside h2 {
    font-size: clamp(28px, 9vw, 38px);
  }
  .archive-row {
    padding: 14px 0 16px;
  }
  .archive-row h3 {
    font-size: 18px;
  }
  .project-shell {
    padding: calc(96px + env(safe-area-inset-top)) 0 70px;
  }
  .project-hero h1 {
    font-size: clamp(30px, 8vw, 36px);
  }
  .project-hero p {
    margin-top: 12px;
  }
  .project-layout {
    margin-top: 24px;
    gap: 20px;
  }
  .about-shell {
    /* The fixed 58px mobile topbar needs an explicit content offset. */
    padding: calc(82px + env(safe-area-inset-top)) 0 68px;
  }
  .about-page-hero {
    gap: 14px;
    padding-bottom: 12px;
  }
  .about-page-top h1 {
    font-size: clamp(34px, 9vw, 42px);
  }
  .project-showcase {
    gap: 18px;
    padding-bottom: 16px;
    grid-template-columns: 1fr;
  }
  .project-work {
    gap: 12px;
    opacity: 1;
    transform: none;
    filter: none;
  }
  .project-work.is-active,
  .project-work:hover,
  .project-work:focus-visible,
  .project-work:focus-within {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .project-work.is-active .project-frame {
    border-color: color-mix(in srgb, var(--line-strong) 90%, white 10%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--line-strong) 18%, transparent), 0 8px 20px rgba(18, 19, 26, 0.06);
  }
  .project-detail {
    min-height: 0;
  }
  .project-aside h2 {
    margin-bottom: 14px;
    font-size: 26px;
  }
  .project-aside p {
    line-height: 1.72;
  }
  .project-frame {
    border-radius: 16px;
  }
  .project-frame img {
    aspect-ratio: 16 / 10;
  }
  .project-work h3 {
    font-size: 15px;
  }
  .about-layout {
    gap: 18px;
  }
  .about-headline {
    font-size: clamp(30px, 10vw, 40px);
    max-width: 10ch;
  }
  .about-links {
    max-width: 100%;
  }
  .about-meta {
    grid-template-columns: 1fr;
  }
  .about-stack {
    position: static;
  }
  .article-top {
    gap: 14px;
  }
  .article-cover {
    height: 220px;
    border-radius: 16px;
  }
  .article-cover .hero-feature-copy {
    padding: 14px;
  }
  .article-cover .hero-feature-copy strong {
    font-size: 18px;
    line-height: 1.05;
  }
  .article-shell > .page-hero,
  .article-shell > .toc,
  .article-shell > .prose,
  .article-shell > .post-nav,
  .article-shell > .related {
    max-width: 100%;
  }
  .article-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .article-side {
    position: static;
    display: none;
  }
  .article-mobile-nav {
    display: block;
    /* Preserve the compact ZIP mobile layout while separating metadata from the TOC control. */
    margin: 12px 0 4px;
  }
  .article-mobile-nav summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .article-mobile-nav summary::-webkit-details-marker {
    display: none;
  }
  .article-mobile-nav summary::after {
    content: "+";
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
  }
  .article-mobile-nav[open] summary::after {
    content: "-";
  }
  .article-mobile-nav .article-index {
    margin-top: 10px;
  }
  .article-mobile-nav + .article-body {
    margin-top: 4px;
  }
  .article-side .summary-metrics {
    grid-template-columns: 1fr;
  }
  .toc {
    padding: 14px 16px;
  }
  .prose {
    gap: 14px;
  }
  .prose h2 {
    font-size: 18px;
  }
  .prose pre {
    padding: 12px;
  }
  .prose table {
    min-width: 0;
  }
  .related a,
  .post-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .listing-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-head { align-items: start; flex-direction: column; }
  .post-grid,
  .list-item--featured a,
  .article-card a { grid-template-columns: 1fr; }
  .post-media,
  .list-item--featured .item-media,
  .article-card .item-media { min-height: 180px; }
  .site-footer-inner,
  .about-meta,
  .summary-metrics { grid-template-columns: 1fr; }
  .site-footer-bottom { flex-direction: column; }
  .article-cover { height: 280px; }
  .site-footer {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }
}

@supports (-webkit-touch-callout: none) {
  html {
    min-height: -webkit-fill-available;
  }
  body {
    min-height: -webkit-fill-available;
  }
  .blog-search {
    -webkit-appearance: none;
    appearance: none;
  }
  .hero-bar,
  .blog-card a,
  .blog-hero-cover,
  .blog-page .list-item,
  .project-work,
  .nav a,
  .menu-btn,
  .icon-btn,
  .ghost-btn,
  .login-btn {
    -webkit-tap-highlight-color: transparent;
  }
}



/* Salt Orbit article binding: preserve the ZIP article geometry while keeping short Chinese titles balanced. */
.article-shell .article-title { font-size: clamp(42px, 3.35vw, 50px); letter-spacing: -0.04em; }


/* Mobile article title: compact the visual step slightly without changing the article structure. */
@media (max-width: 720px) {
  .article-shell .article-title {
    font-size: 38px;
    line-height: 0.96;
  }
}
