@font-face {
  font-family: "Instrument Sans";
  src: url("/images/instrumentsans-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/images/instrumentsans-medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/images/instrumentsans-semibold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #111111;
  --muted: #575757;
  --line: #e6e6e6;
  --line-strong: #cecece;
  --accent: #111111;
  --reading-width: 1120px;
  --label-tracking: 0.16em;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  font-family: "Instrument Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.72;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.blog-brand-logo {
  height: 50px;
  width: auto;
  max-width: min(48vw, 172px);
  object-fit: contain;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
}

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.site-nav a {
  color: #2d2d2d;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: #181818;
  transition: width 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.main-content {
  padding: 34px 0 22px;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 40px 36px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 32px;
}

.hero-kicker {
  margin: 0;
  color: #666666;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero h1 {
  margin: 10px 0 16px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  font-size: clamp(30px, 3.4vw, 44px);
}

.hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

.hero p.hero-paragraph-break {
  margin-top: 1.25em;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
}

.btn-primary {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

.btn-primary:hover {
  opacity: 1;
  background: #000000;
}

.btn-ghost {
  color: #111111;
  background: #ffffff;
}

.btn-ghost:hover {
  opacity: 1;
  background: var(--surface-soft);
}

.hero-panel {
  border-left: 1px solid var(--line);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-panel h2 {
  margin: 0 0 12px;
  line-height: 1.35;
  font-size: 12px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

.hero-panel ul {
  margin: 0;
  padding-left: 18px;
}

.hero-panel li {
  margin-bottom: 8px;
  color: #3f3f3f;
}

.hero-panel-media {
  border-left: none;
  padding-left: 0;
}

.hero-panel-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 20px;
}

.category-tabs {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #232323;
  font-size: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.category-tab:hover {
  opacity: 1;
  border-color: #bdbdbd;
  background: #fafafa;
}

.category-tab-label {
  font-weight: 600;
  line-height: 1;
}

.category-tab-meta {
  color: #6a6a6a;
  font-size: 12px;
  line-height: 1;
}

.section-block + .section-block {
  margin-top: 52px;
}

.post-list {
  margin-top: 30px;
  margin-bottom: 0;
}

.post-list-home {
  margin-top: 78px;
}

.section-title {
  margin-bottom: 8px;
}

.section-title-with-tabs {
  display: block;
  margin-bottom: 12px;
}

.section-title-main {
  flex: 0 0 auto;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.section-kicker {
  margin: 0;
  color: #686868;
  font-size: 12px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  font-weight: 600;
}

.section-title h2 {
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-size: clamp(22px, 2.5vw, 30px);
}

.section-title-with-tabs .section-title-main h2 {
  margin-bottom: 0;
}

.section-title-with-tabs .section-title-row h2 {
  margin: 0;
}

.section-title-with-tabs .category-tabs {
  margin-top: 0;
  justify-content: flex-start;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: 18px;
}

.post-item {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: end;
}

.post-item:first-of-type {
  border-top: 1px solid var(--line);
}

.post-item:hover {
  border-bottom-color: var(--line-strong);
}

.post-item.is-featured {
  padding-top: 30px;
  padding-bottom: 30px;
}

.post-item h2,
.post-item h3 {
  margin: 0 0 10px;
  line-height: 1.26;
  letter-spacing: -0.01em;
  font-size: clamp(18px, 2vw, 27px);
  min-width: 0;
  overflow: hidden;
}

.post-item.is-featured h2,
.post-item.is-featured h3 {
  font-size: clamp(22px, 2.7vw, 33px);
}

.post-item-main {
  grid-column: 1 / 2;
  min-width: 0;
}

.post-list .post-item h2 a,
.post-list .post-item h3 a {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-item p {
  margin: 0;
  max-width: 78ch;
  color: var(--muted);
}

.post-item-side {
  grid-column: 2 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.post-item-side.has-cover {
  min-width: 172px;
}

.post-item-cover {
  display: block;
  width: 172px;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f5f5f5;
}

.post-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-item-meta {
  font-size: 13px;
  color: #666666;
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
  margin-top: 0;
}

.post-list-home {
  counter-reset: home-post;
}

.post-list-home .post-item {
  counter-increment: home-post;
  padding-top: 32px;
  padding-bottom: 32px;
}

.post-list-home .post-item h3 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  font-size: clamp(17px, 1.8vw, 23px);
}

.post-list-home .post-item h3 a,
.post-list-directory .post-item h2 a {
  flex: 1 1 auto;
}

.post-list-home .post-item h3::before {
  content: counter(home-post, decimal-leading-zero);
  font-size: 12px;
  letter-spacing: var(--label-tracking);
  color: #767676;
  line-height: 1;
  flex: 0 0 auto;
  transform: translateY(-2px);
}

.post-list-home .post-item.is-featured {
  border-top: 1px solid var(--line);
  position: relative;
}

.post-list-home .post-item.is-featured::before {
  content: "Featured";
  position: absolute;
  top: 10px;
  right: 0;
  color: #6b6b6b;
  font-size: 11px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

.post-list-home .post-item.is-featured h3::before {
  content: "00";
}

.post-list-home .post-item.is-featured h3 a {
  flex: 1 1 auto;
}

.post-list-home .post-item.is-featured h3 {
  font-size: clamp(20px, 2.4vw, 30px);
}

.post-list-home .post-item p {
  line-height: 1.9;
}

.post-list-directory {
  counter-reset: directory-post;
}

.post-list-directory .post-item {
  counter-increment: directory-post;
}

.post-list-directory .post-item h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.post-list-directory .post-item h2::before {
  content: counter(directory-post, decimal-leading-zero);
  font-size: 12px;
  letter-spacing: var(--label-tracking);
  color: #767676;
  line-height: 1;
  flex: 0 0 auto;
}

.category-head {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.category-kicker {
  margin: 0;
  color: #686868;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.category-head h1 {
  margin: 10px 0 12px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  font-size: clamp(30px, 3.6vw, 44px);
}

.category-head p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}

.category-stats {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: #4b4b4b;
  background: #ffffff;
}

.post-article {
  max-width: var(--reading-width);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 34px 32px;
}

.post-header {
  border-top: 2px solid #111111;
  border-bottom: 1px solid var(--line);
  padding-top: 18px;
  padding-bottom: 20px;
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #6a6a6a;
  margin-bottom: 12px;
}

.post-breadcrumb a {
  color: #383838;
}

.post-kicker {
  margin: 0;
  color: #6a6a6a;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.post-header h1 {
  margin: 10px 0 14px;
  line-height: 1.15;
  letter-spacing: -0.012em;
  font-size: clamp(28px, 3.2vw, 42px);
}

.post-subtitle {
  margin: 0;
  color: #515151;
  max-width: 64ch;
}

.post-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: #666666;
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-meta-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a7a7a;
}

.post-meta-value {
  color: #333333;
}

.post-body {
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.95;
  color: #1e1e1e;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 34px 0 12px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-body h1 {
  font-size: clamp(25px, 3.2vw, 34px);
}

.post-body h2 {
  font-size: clamp(20px, 2.9vw, 28px);
}

.post-body h3 {
  font-size: clamp(15px, 1.8vw, 18px);
}

.post-body h4 {
  font-size: clamp(14px, 1.6vw, 17px);
}

.post-body p {
  margin: 0 0 16px;
}

.post-body > p:first-of-type {
  font-size: 1.08em;
  color: #151515;
}

.post-body ul,
.post-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body blockquote {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--line-strong);
  background: var(--surface-soft);
  color: #3f3f3f;
}

.post-body .header-anchor {
  color: inherit;
}

.post-body a {
  text-decoration: underline;
  text-decoration-color: #9f9f9f;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-body a:hover {
  opacity: 1;
  text-decoration-color: #111111;
}

.post-body img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto 18px;
  border-radius: 20px;
}

.post-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f3f3f3;
  border: 1px solid #ebebeb;
  font-family: ui-monospace, sfmono-regular, menlo, monaco, "Courier New", monospace;
  font-size: 0.88em;
}

.post-body pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #ececec;
  background: #f8f8f8;
}

.post-body pre code {
  padding: 0;
  border: none;
  background: transparent;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 16px;
}

.post-body th,
.post-body td {
  border: 1px solid #e8e8e8;
  padding: 10px 12px;
  text-align: left;
}

.post-body th {
  background: #f7f7f7;
  font-weight: 600;
}

.post-tip {
  margin-top: 30px;
  border: none;
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 20px;
}

.post-tip h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.post-tip p {
  margin: 0 0 12px;
  color: #545454;
}

.post-backlink {
  max-width: var(--reading-width);
  margin: 18px auto 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.post-backlink a {
  font-size: 14px;
  color: #3a3a3a;
  border-bottom: 1px solid transparent;
}

.post-backlink a:hover {
  border-color: #111111;
  opacity: 1;
}

.site-footer {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 16px 0 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
}

.footer-brand-logo {
  height: 40px;
  width: auto;
  max-width: min(48vw, 136px);
  object-fit: contain;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-links a {
  color: #3c3c3c;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-panel {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 18px;
  }

  .hero-panel.hero-panel-media {
    border-top: none;
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .container {
    width: calc(100% - 28px);
  }

  .main-content {
    padding: 24px 0 12px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px 16px;
  }

  .site-nav.open {
    display: flex;
    flex-wrap: wrap;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .hero {
    padding: 28px 22px;
  }

  .hero h1 {
    font-size: clamp(26px, 8vw, 36px);
  }

  .category-tabs {
    gap: 8px;
  }

  .section-block + .section-block {
    margin-top: 42px;
  }

  .section-title h2 {
    font-size: clamp(20px, 6vw, 27px);
  }

  .section-title-with-tabs {
    margin-bottom: 10px;
  }

  .section-title-row {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-title-with-tabs .category-tabs {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .post-list-home {
    margin-top: 54px;
  }

  .post-item {
    padding: 20px 0;
    column-gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
    align-items: start;
  }

  .post-item h2,
  .post-item h3 {
    font-size: clamp(17px, 5.2vw, 24px);
  }

  .post-item.is-featured h2,
  .post-item.is-featured h3 {
    font-size: clamp(20px, 6.6vw, 27px);
  }

  .post-item-main,
  .post-item-side {
    grid-column: 1 / 2;
  }

  .post-item-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }

  .post-item-side.has-cover {
    min-width: 0;
  }

  .post-item-cover {
    width: 118px;
    flex: 0 0 118px;
  }

  .post-item-meta {
    margin-left: auto;
  }

  .post-list-home .post-item h3 {
    display: flex;
    font-size: clamp(17px, 4.8vw, 22px);
  }

  .post-list-home .post-item.is-featured::before {
    top: 8px;
  }

  .post-list-home .post-item.is-featured h3 {
    font-size: clamp(20px, 6.2vw, 27px);
  }

  .post-list-directory .post-item h2 {
    display: flex;
  }

  .post-article {
    max-width: 100%;
    border-radius: 12px;
    padding: 28px 22px;
  }

  .post-header h1 {
    font-size: clamp(22px, 7.4vw, 32px);
  }

  .post-body {
    font-size: 16.5px;
    line-height: 1.85;
  }

  .post-meta-item {
    width: 100%;
  }

  .post-body h1 {
    font-size: clamp(23px, 6.8vw, 30px);
  }

  .post-body h2 {
    font-size: clamp(20px, 5.8vw, 26px);
  }

  .post-body h3 {
    font-size: clamp(15px, 4.4vw, 19px);
  }

  .post-body h4 {
    font-size: clamp(14px, 4vw, 17px);
  }

  .blog-brand-logo {
    height: 42px;
    max-width: min(52vw, 148px);
  }

  .footer-brand-logo {
    height: 34px;
    max-width: min(50vw, 120px);
  }

  .footer-inner {
    flex-direction: column;
  }
}
