/* AI数据中心博士 · draidc.com
   Restrained editorial stylesheet. No third-party assets. */

:root {
  --bg: #f4f1ea;
  --paper: #faf8f3;
  --text: #1b1916;
  --muted: #5f594f;
  --faint: #8a847a;
  --line: #e2ddd4;
  --line-strong: #c9c3b8;
  --accent: #9a1c1f;
  --accent-hover: #6e1013;
  --soft: #f1e6e3;
  --thead: #efeae2;
  --focus: #9a1c1f;
  --max: 42rem;
  --wide: 52rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei",
    "Heiti SC", sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC",
    "STSong", "SimSun", "Songti TC", "Times New Roman", serif;
  --font-mono: "SF Mono", ui-monospace, "Menlo", "Consolas", "Source Code Pro",
    "Courier New", monospace;
}

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

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--paper);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  z-index: 10;
}

.skip:focus {
  top: 0.75rem;
}

/* Masthead */

.site-header {
  border-bottom: 1px solid var(--line-strong);
}

.site-header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

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

.brand img {
  width: 44px;
  height: 44px;
  display: block;
  background: #000;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand-zh {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.brand-en {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.header-tag {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3.5rem;
}

.site-footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.site-footer p {
  margin: 0 0 0.4rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

/* Home */

.page {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 0;
}

.intro {
  max-width: var(--max);
}

.intro h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 1.25rem;
  line-height: 1.35;
}

.intro p {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}

.article-index {
  margin-top: 2.5rem;
  max-width: var(--max);
}

.article-index h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.entry {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 1rem 0 1.15rem;
}

.entry:hover .entry-title {
  color: var(--accent);
}

.entry-date {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.entry-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.entry-meta {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Article */

.article {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 0;
}

.article-nav {
  font-size: 0.85rem;
  margin: 0 0 1.75rem;
}

.article-nav a {
  color: var(--muted);
  text-decoration: none;
}

.article-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article > header h1 {
  font-family: var(--font-sans);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
}

.article-meta {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

.article-meta time {
  font-variant-numeric: tabular-nums;
}

.article-note {
  margin: 1.1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.7;
}

.article-body {
  margin-top: 2rem;
  font-size: 1.02rem;
  line-height: 1.9;
}

.article-body p {
  margin: 0 0 1.15em;
}

.article-body .lede-quote {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem 0.85rem 1.05rem;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  font-size: 0.98rem;
  line-height: 1.8;
}

.article-body .lede-quote p {
  margin: 0;
}

.article-body blockquote {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem 0.85rem 1.05rem;
  border-left: 3px solid var(--line-strong);
  background: var(--paper);
  font-size: 0.98rem;
  line-height: 1.8;
}

.article-body blockquote p {
  margin: 0;
}

.article-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 2.4rem 0 0.9rem;
  letter-spacing: 0.01em;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 1.8rem 0 0.7rem;
}

.article-body ol {
  margin: 0 0 1.15em;
  padding-left: 1.4em;
}

.article-body li {
  margin: 0 0 0.45em;
}

.article-body li:last-child {
  margin-bottom: 0;
}

/* Tables */

.table-wrap {
  margin: 0 0 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.article-body th,
.article-body td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.article-body thead th {
  background: var(--thead);
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.article-body tbody tr:last-child th,
.article-body tbody tr:last-child td {
  border-bottom: 0;
}

.article-body tbody th {
  font-weight: 600;
  white-space: nowrap;
}

.table-note {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.figure-note {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1.25rem;
  padding: 0.2rem 0 0;
}

.article-figure {
  margin: 1.5rem 0 1.75rem;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}

.article-figure figcaption {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0.55rem 0 0;
}

/* References */

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

.refs li {
  margin: 0 0 0.75rem;
  padding-left: 2.4rem;
  text-indent: -2.4rem;
  font-size: 0.88rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.refs .ref-id {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-right: 0.35rem;
  text-indent: 0;
}

.ref-group {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.5rem 0 0.65rem;
}

/* In-text citations */

cite.refs-inline,
a.ref {
  font-style: normal;
  font-size: 0.84em;
  letter-spacing: 0;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

a.ref:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* 404 */

.not-found {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.25rem 0;
}

.not-found h1 {
  font-size: 1.35rem;
  margin: 0 0 0.8rem;
}

.not-found p {
  margin: 0 0 0.8rem;
  line-height: 1.8;
  color: var(--text);
}

/* Print */

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .skip,
  .site-header,
  .article-nav {
    display: none;
  }

  .site-footer {
    border: 0;
    margin-top: 2rem;
  }

  .article,
  .page {
    max-width: none;
    padding: 0;
  }

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

  .table-wrap {
    border-color: #ccc;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .article > header h1 {
    font-size: 1.4rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .article-body th,
  .article-body td {
    padding: 0.45rem 0.5rem;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 800px) {
  html {
    font-size: 18px;
  }

  .article-body {
    font-size: 1.02rem;
  }
}

/* Archive links and accounts */
.footer-links, .account-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
}
.footer-links, .site-footer .account-list {
  margin-bottom: .85rem;
}
.account-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.follow-section {
  max-width: var(--max);
  margin-top: 2rem;
  color: var(--muted);
  font-size: .85rem;
}
.follow-section h2, .article-toc p {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  margin: 0 0 .75rem;
}
.follow-section h2 {
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.article-toc {
  display: none;
}
@media screen and (min-width: 1024px) {
  .article-layout {
    display: grid;
    grid-template-columns: minmax(10rem, 13rem) minmax(0, var(--max));
    gap: 1.5rem;
    justify-content: center;
    padding-inline: 1.25rem;
  }
  .article-layout .article {
    width: 100%;
    margin: 0;
  }
  .article-toc {
    display: block;
    align-self: start;
    position: sticky;
    top: 1.75rem;
    margin-top: 1.75rem;
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
    border-left: 1px solid var(--line-strong);
    padding: 0 .65rem 0 .85rem;
    font-size: .8rem;
    color: var(--muted);
  }
  .article-toc p { color: var(--text); }
  .article-toc ul { list-style: none; margin: 0; padding: 0; }
  .article-toc li + li { margin-top: .5em; }
  .article-toc a { color: inherit; text-decoration: none; }
  .article-toc a:hover, .article-toc a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
  }
}
@media print {
  .article-toc, .footer-links, [data-follow-me], [data-stats], .follow-section {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.mail-form {
  position: relative;
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .45rem .6rem;
  max-width: var(--max);
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: .85rem;
}
.mail-form label span { display: block; margin-bottom: .3rem; }
.mail-form input, .mail-form button {
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
  color: var(--text);
  padding: .5em .75em;
  font: inherit;
}
.mail-form label { max-width: 100%; }
.mail-form input { width: 17rem; max-width: 100%; }
.mail-form button {
  border-color: var(--accent);
  color: var(--accent);
  cursor: pointer;
}
.mail-form button:disabled { opacity: .65; cursor: default; }
.mail-form .mail-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mail-form p { width: 100%; margin: 0; }
.mail-form [role="status"] { color: var(--accent); }
.mail-form [role="status"]:empty { margin-top: -.45rem; }
.map-links { padding-left: 1.3rem; }
.map-links li { margin-bottom: .5rem; }
.visit-map {
  margin: 1.25rem 0;
  padding-block: .8rem;
  border-block: 1px solid var(--line);
}
.visit-map figcaption { margin-bottom: .6rem; }
.visit-map strong { color: var(--text); margin-right: .5em; }
.visit-map-canvas {
  position: relative;
  max-width: 36rem;
  margin-inline: auto;
  background: var(--paper);
}
.visit-map-canvas img { display: block; width: 100%; height: auto; }
.visit-map-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.visit-map circle { fill: var(--accent); stroke: var(--paper); stroke-width: 1; }
@media print {
  .mail-form, .visit-map { display: none; }
}
