:root {
  --paper: #f4f1ea;
  --paper-bright: #faf8f3;
  --ink: #0a0e13;
  --muted: #50545b;
  --rule: rgba(10, 14, 19, 0.2);
  --blue: #1748d8;
  --night: #07111d;
  --night-text: #f7f5ef;
  --content: 1440px;
  --gutter: clamp(24px, 5vw, 76px);
  --serif: "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.62), transparent 32%),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: white;
  background: var(--blue);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
.hero,
.articles,
.site-footer {
  width: min(100% - (var(--gutter) * 2), var(--content));
  margin-inline: auto;
}

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

.brand {
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
}

nav {
  display: flex;
  align-self: stretch;
  gap: clamp(24px, 4vw, 60px);
}

nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 42px;
  font-size: 1rem;
  text-decoration: none;
}

nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

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

.hero {
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
  align-items: center;
  gap: 48px;
  padding-block: clamp(56px, 8vw, 120px);
  border-bottom: 1px solid var(--rule);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.25rem, 7.6vw, 7.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.hero p {
  margin: 24px 0 22px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 38px;
  padding: 12px 20px;
  color: white;
  background: var(--blue);
  font-weight: 650;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.primary-link:hover { background: #103bb8; transform: translateY(-2px); }
.primary-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

.primary-link svg,
.article-list svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.hero-motif {
  position: relative;
  justify-self: end;
  width: min(100%, 520px);
  aspect-ratio: 1.35;
}

.motif-circle {
  position: absolute;
  top: 3%;
  right: 18%;
  width: 58%;
  aspect-ratio: 1;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
}

.motif-vline {
  position: absolute;
  top: -8%;
  right: 18%;
  width: 1px;
  height: 108%;
  background: var(--ink);
}

.motif-dot {
  position: absolute;
  top: 40%;
  right: calc(18% - 11px);
  width: 23px;
  height: 23px;
  background: var(--blue);
  border-radius: 50%;
}

.motif-lines {
  position: absolute;
  top: 40%;
  right: 0;
  width: 100%;
  height: 84px;
  border-block: 1px solid var(--rule);
  background: repeating-linear-gradient(to bottom, transparent 0 20px, var(--rule) 20px 21px);
}

.articles { padding-block: 28px 22px; }

.articles h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.2;
}

.article-list { margin: 0; padding: 0; list-style: none; }

.article-list li { border-bottom: 1px solid var(--rule); }
.article-list li:last-child { border-bottom: 0; }

.article-list a {
  display: grid;
  grid-template-columns: minmax(140px, .28fr) 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 60px;
  text-decoration: none;
  transition: color 180ms ease, padding 180ms ease;
}

.article-list time { color: var(--muted); }
.article-list span { font-size: 1.08rem; font-weight: 650; }
.article-list a:hover { color: var(--blue); padding-inline: 8px; }
.article-list a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.about {
  margin-top: 12px;
  color: var(--night-text);
  background: var(--night);
}

.about-inner {
  width: min(100% - (var(--gutter) * 2), var(--content));
  min-height: 200px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(180px, .55fr) 1.55fr minmax(180px, .7fr);
  align-items: center;
  gap: clamp(32px, 5vw, 82px);
  padding-block: 42px;
}

.about h2 {
  position: relative;
  margin: 0;
  padding-bottom: 18px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.1;
  border-right: 1px solid rgba(255,255,255,.7);
}

.about h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 58px;
  height: 3px;
  background: var(--blue);
}

.about p { margin: 0; font-size: clamp(1rem, 1.5vw, 1.25rem); }

.about-motif {
  justify-self: end;
  width: 180px;
  height: 120px;
  border-top: 1px solid rgba(255,255,255,.75);
  border-left: 1px solid rgba(255,255,255,.75);
  border-radius: 100% 0 0 0;
  padding: 28px 0 0 50px;
}

.about-motif span {
  display: block;
  width: 100%;
  height: 72px;
  background: repeating-linear-gradient(to bottom, transparent 0 13px, rgba(255,255,255,.55) 13px 14px);
}

.site-footer {
  display: flex;
  align-items: center;
  min-height: 72px;
  color: var(--muted);
}

.post-page { background: var(--paper-bright); }

.post-shell {
  width: min(100% - (var(--gutter) * 2), 840px);
  margin-inline: auto;
  padding-block: clamp(48px, 8vw, 110px);
}

.post-shell .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 52px;
  color: var(--blue);
  font-weight: 650;
  text-decoration: none;
}

.post-shell .back-link::before { content: "←"; }

.post-shell h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 1.15;
  letter-spacing: -.045em;
}

.post-meta { margin-bottom: 56px; color: var(--muted); }

.post-content {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 2;
}

.post-content p { margin: 0 0 1.5em; }
.post-content h2 { margin: 2em 0 .7em; font-family: var(--sans); line-height: 1.35; }

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.not-found strong { display: block; color: var(--blue); font-size: clamp(5rem, 18vw, 12rem); line-height: .9; }
.not-found h1 { font-family: var(--serif); font-size: clamp(2rem, 5vw, 4rem); }
.not-found a { color: var(--blue); font-weight: 700; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-motif { width: min(78vw, 520px); justify-self: center; }
  .about-inner { grid-template-columns: .7fr 1.3fr; }
  .about-motif { display: none; }
}

@media (max-width: 620px) {
  :root { --gutter: 20px; }
  .site-header { min-height: 66px; }
  .brand { font-size: 1.45rem; }
  nav { gap: 16px; }
  nav a { font-size: .92rem; }
  .hero { min-height: auto; padding-block: 56px 42px; gap: 22px; }
  .hero h1 { font-size: clamp(3.2rem, 17vw, 4.6rem); }
  .hero p { margin-top: 20px; }
  .hero-motif { width: 86vw; max-height: 210px; overflow: hidden; }
  .articles { padding-block: 30px 20px; }
  .article-list a { grid-template-columns: 1fr auto; gap: 8px 16px; padding-block: 12px; }
  .article-list time { grid-column: 1; font-size: .86rem; }
  .article-list span { grid-column: 1; }
  .article-list svg { grid-column: 2; grid-row: 1 / span 2; }
  .about-inner { min-height: 280px; grid-template-columns: 1fr; gap: 30px; padding-block: 48px; }
  .about h2 { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
