:root {
  --paper: #f6f2e9;
  --paper-deep: #ece5d7;
  --ink: #20201e;
  --muted: #6f6a60;
  --line: #cfc6b6;
  --accent: #d84f2a;
  --accent-dark: #a9371b;
  --note: #efe198;
  --white: #fffdf8;
  --serif: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.8;
}

::selection {
  color: var(--white);
  background: var(--accent);
}

a {
  color: inherit;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.36;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(80, 65, 45, 0.07) 0 0.7px, transparent 0.8px),
    radial-gradient(circle at 75% 60%, rgba(80, 65, 45, 0.05) 0 0.6px, transparent 0.7px);
  background-size: 7px 7px, 11px 11px;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 23px;
  font-style: italic;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: -4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.site-header nav {
  display: flex;
  gap: 34px;
}

.site-header nav a {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -5px;
  height: 2px;
  background: var(--accent);
  transition: right 180ms ease;
}

.site-header nav a:hover {
  color: var(--ink);
}

.site-header nav a:hover::after {
  right: 0;
}

.hero {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 80px;
  align-items: center;
  padding: 82px 5% 88px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.hero h1,
.post-header h1,
.about-page h1,
.not-found h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: 730px;
  font-size: clamp(54px, 7.5vw, 92px);
}

.hero h1 em {
  color: var(--accent);
  font-weight: 500;
}

.hero-intro {
  max-width: 620px;
  margin: 34px 0 32px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 18px;
}

.primary-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.primary-link {
  padding-bottom: 7px;
}

.primary-link span {
  color: var(--accent);
  font-size: 20px;
}

.hero-note {
  position: relative;
  padding: 40px 34px 28px;
  background: var(--note);
  transform: rotate(2.2deg);
  box-shadow: 9px 12px 0 rgba(74, 65, 45, 0.08);
}

.note-pin {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.2);
}

.note-label,
.note-date {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.note-label {
  color: #776b30;
}

.note-main {
  margin: 28px 0 38px;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.25;
}

.note-date {
  margin: 0;
  color: #776b30;
}

.latest {
  padding: 92px 5%;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 46px;
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 500;
}

.section-heading > p {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
}

.post-card {
  min-height: 178px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 56px;
  gap: 24px;
  align-items: center;
  padding: 32px 8px;
  border-top: 1px solid var(--line);
}

.post-card:last-child {
  border-bottom: 1px solid var(--line);
}

.post-number {
  align-self: start;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}

.post-card-meta {
  display: flex;
  gap: 18px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.post-card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.35;
}

.post-card h3 a {
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.post-card h3 a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent);
}

.post-card-body > p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
}

.post-arrow {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-size: 24px;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.post-arrow:hover {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateX(4px);
}

.small-note {
  padding: 100px 11%;
  text-align: center;
}

.project-bridge {
  padding: 92px 5%;
  border-bottom: 1px solid var(--line);
}

.project-bridge .section-heading h2 {
  max-width: 760px;
}

.project-bridge-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: clamp(44px, 8vw, 110px);
  align-items: end;
  padding: clamp(38px, 6vw, 72px);
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
  box-shadow: 10px 12px 0 var(--paper-deep);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-bridge-card::after {
  content: "AI";
  position: absolute;
  z-index: -1;
  right: -0.05em;
  top: -0.2em;
  color: rgba(255, 253, 248, 0.045);
  font-family: var(--serif);
  font-size: clamp(160px, 28vw, 380px);
  font-style: italic;
  line-height: 1;
}

.project-bridge-card:hover,
.project-bridge-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 10px 16px 0 var(--paper-deep);
}

.project-bridge-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.project-bridge-label {
  margin: 0 0 32px;
  color: #e58b6d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.project-bridge-copy h3 {
  max-width: 720px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.project-bridge-copy > p:not(.project-bridge-label) {
  max-width: 650px;
  margin: 28px 0 34px;
  color: rgba(255, 253, 248, 0.65);
  font-family: var(--serif);
  font-size: 15px;
}

.project-bridge-cta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.project-bridge-cta strong {
  color: #e58b6d;
  font-size: 19px;
}

.project-bridge-stats {
  margin: 0;
  border-top: 1px solid rgba(255, 253, 248, 0.25);
}

.project-bridge-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 253, 248, 0.18);
}

.project-bridge-stats dt {
  color: #e58b6d;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
}

.project-bridge-stats dd {
  margin: 0;
  color: rgba(255, 253, 248, 0.58);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.small-note blockquote {
  max-width: 820px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.55;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.footer-meta {
  text-align: right;
}

.post {
  width: min(790px, 100%);
  margin: 0 auto;
  padding: 94px 0 110px;
}

.post-header {
  margin-bottom: 60px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line);
}

.post-header h1 {
  font-size: clamp(48px, 7vw, 78px);
}

.post-meta {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.post-lead {
  margin: 36px 0 0;
  color: #4f4b43;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.9;
}

.post-content {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
}

.post-content h2 {
  margin: 70px 0 22px;
  font-family: var(--sans);
  font-size: 26px;
  line-height: 1.4;
}

.post-content h2::before {
  content: "◆";
  display: inline-block;
  margin-right: 12px;
  color: var(--accent);
  font-size: 11px;
  transform: translateY(-3px) rotate(45deg);
}

.post-content p {
  margin: 0 0 24px;
}

.post-content blockquote {
  margin: 38px 0;
  padding: 22px 28px;
  color: #4d473b;
  background: var(--paper-deep);
  border-left: 4px solid var(--accent);
  font-size: 19px;
}

.post-content blockquote p {
  margin: 0;
}

.post-content pre {
  overflow-x: auto;
  margin: 34px 0;
  padding: 24px 26px;
  color: #f4eee2;
  background: #282824;
  border-radius: 2px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
}

.post-content code {
  padding: 0.15em 0.36em;
  color: var(--accent-dark);
  background: var(--paper-deep);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.post-content pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.post-content ol,
.post-content ul {
  margin: 26px 0 30px;
  padding-left: 26px;
}

.post-content li {
  margin-bottom: 9px;
  padding-left: 6px;
}

.post-end {
  margin-top: 76px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.post-end span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.post-end p {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
}

.post-end a {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.about-page,
.not-found {
  min-height: 620px;
  padding: 92px 5% 110px;
}

.about-page h1 {
  max-width: 850px;
  font-size: clamp(52px, 7vw, 82px);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  margin-top: 70px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.about-lead {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.65;
}

.about-lead p,
.about-body p {
  margin-top: 0;
}

.about-body {
  color: #514d45;
  font-family: var(--serif);
  font-size: 17px;
}

.not-found {
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 120px;
  font-style: italic;
  line-height: 1;
}

.not-found h1 {
  margin: 28px 0 18px;
  font-size: 52px;
}

.not-found > p:not(.error-code) {
  margin-bottom: 34px;
  color: var(--muted);
}

@media (max-width: 780px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    min-height: 84px;
  }

  .brand small {
    display: none;
  }

  .site-header nav {
    gap: 18px;
  }

  .site-header nav a:last-child {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 58px;
    padding: 64px 5% 76px;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 70px);
  }

  .hero-note {
    width: min(100%, 300px);
    justify-self: center;
  }

  .project-bridge {
    padding: 68px 5%;
  }

  .project-bridge-card {
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 38px 28px;
  }

  .project-bridge-stats {
    width: 100%;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .post-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .post-arrow {
    display: none;
  }

  .post {
    padding: 66px 12px 82px;
  }

  .post-header h1 {
    font-size: clamp(43px, 13vw, 62px);
  }

  .post-content {
    font-size: 16px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 48px;
  }

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

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .site-header nav a:nth-child(2) {
    display: none;
  }
}

