:root {
  color-scheme: dark;
  --ink-950: #08090b;
  --ink-900: #0e1013;
  --ink-850: #14171b;
  --ink-800: #1b1f24;
  --ink-700: #2a2f36;
  --ink-600: #3d434b;
  --ink-500: #6b7178;
  --fg: #ecebe7;
  --fg-secondary: #c4c8cb;
  --fg-muted: #9aa0a6;
  --fg-faint: #7c8288;
  --ember: #f5b562;
  --ember-bright: #ffc97f;
  --ember-dim: #c08a45;
  --ember-wash: rgba(245, 181, 98, 0.12);
  --signal: #7fd4c1;
  --danger: #f2837a;
  --hairline: rgba(236, 235, 231, 0.1);
  --hairline-strong: rgba(236, 235, 231, 0.18);
  --glow-ember: radial-gradient(60% 70% at 78% 8%, rgba(245, 181, 98, 0.18), rgba(245, 181, 98, 0) 68%);
  --elevation-card: 0 16px 36px rgba(0, 0, 0, 0.18);
  --elevation-card-hover: 0 22px 48px rgba(0, 0, 0, 0.3);
  --font-display: "LXGW Bright", "霞鹜新晰黑", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell: 1180px;
  --reading: 680px;
}

* { box-sizing: border-box; }

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

body {
  min-width: 320px;
  margin: 0;
  background: var(--ink-950);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; }

a {
  color: var(--ember);
  text-underline-offset: 4px;
}

a:hover { color: var(--ember-bright); }

button, input, textarea {
  color: inherit;
  font: inherit;
}

button { cursor: pointer; }

::selection {
  background: var(--ember);
  color: var(--ink-950);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  border: 1px solid var(--signal);
  border-radius: 8px;
  background: var(--ink-950);
  color: var(--fg);
  transform: translateY(-180%);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(18px);
}

.nav-shell,
.section-shell,
.footer-shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

.nav-shell {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-glyph {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--ember-dim);
  border-radius: 50%;
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 19px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  color: var(--fg-secondary);
  font-size: 14px;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--ember);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ember); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
}

.language-switch a,
.language-switch span {
  min-width: 32px;
  padding: 5px 8px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.language-switch [aria-current="true"] {
  background: var(--ember-wash);
  color: var(--ember);
}

.icon-button,
.nav-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: transparent;
}

.icon-button:hover,
.nav-toggle:hover {
  border-color: var(--ember-dim);
  color: var(--ember);
}

.icon-button svg,
.nav-toggle svg {
  width: 19px;
  height: 19px;
}

.nav-toggle { display: none; }

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

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(790px, calc(100svh - 64px));
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: var(--glow-ember);
  content: "";
  opacity: 0.18;
  animation: glow-breathe 18s ease-in-out infinite;
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 58%;
  border-left: 1px solid var(--hairline);
  background: linear-gradient(90deg, transparent, rgba(245, 181, 98, 0.03));
  content: "";
}

.hero-shell {
  position: relative;
  display: grid;
  width: min(var(--shell), calc(100% - 48px));
  min-height: inherit;
  margin-inline: auto;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
}

.hero-copy {
  z-index: 2;
  grid-column: 1 / span 7;
  padding-block: 112px 104px;
  transform: translateY(calc(var(--hero-progress, 0) * -24px));
}

.hero-kicker,
.eyebrow {
  margin: 0 0 18px;
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  line-height: 1.6;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 7vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.18;
}

.hero h1 span {
  display: block;
  opacity: 0;
  transform: translateY(16px);
}

.is-ready .hero h1 span {
  animation: hero-line-in 700ms ease-out forwards;
}

.is-ready .hero h1 span:nth-child(2) { animation-delay: 140ms; }

.hero-subtitle {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--fg-secondary);
  font-size: 19px;
  line-height: 1.75;
}

.hero-status {
  display: flex;
  max-width: 620px;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.hero-status::before {
  width: 56px;
  height: 1px;
  background: var(--ember-dim);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
}

.is-ready .hero-status::before { animation: line-draw 1100ms ease-out 180ms forwards; }

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

.button-primary,
.button-secondary {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.button-primary {
  background: var(--ember);
  color: var(--ink-950);
}

.button-primary:hover {
  background: var(--ember-bright);
  color: var(--ink-950);
  transform: translateY(-3px);
}

.button-primary:active { transform: translateY(1px); }

.button-secondary {
  border-color: var(--hairline-strong);
  background: transparent;
  color: var(--fg-secondary);
}

.button-secondary:hover {
  border-color: var(--ember);
  color: var(--ember);
  transform: translateY(-3px);
}

.hero-ring {
  position: absolute;
  right: 7%;
  bottom: 12%;
  width: 120px;
  height: 120px;
  border: 1px solid var(--ember-dim);
  border-radius: 50%;
  opacity: 0.12;
}

.is-ready .hero-ring { animation: ring-in 1200ms ease-out forwards; }

.hero-rail {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: -24px;
  width: 1px;
  background: var(--hairline);
}

.hero-rail::before,
.hero-rail::after {
  position: absolute;
  left: -12px;
  width: 13px;
  height: 1px;
  background: var(--ember-dim);
  content: "";
}

.hero-rail::before { top: 28%; }
.hero-rail::after { bottom: 22%; }

.section {
  padding-block: 96px;
}

.section + .section { border-top: 1px solid var(--hairline); }

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

.section-heading h2,
.section-heading p { margin: 0; }

.section-heading h2 {
  margin-top: 2px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 400;
  line-height: 1.35;
}

.section-heading p:not(.eyebrow) {
  max-width: 520px;
  color: var(--fg-muted);
  font-size: 15px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ember);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.text-link::after {
  content: "→";
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.text-link:hover::after { transform: translateX(4px); }

.post-grid,
.project-grid {
  display: grid;
  gap: 18px;
}

.post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.post-card,
.project-card {
  display: flex;
  min-height: 252px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--ink-850);
  box-shadow: var(--elevation-card);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.post-card:hover,
.project-card:hover {
  border-color: rgba(245, 181, 98, 0.28);
  background: var(--ink-800);
  box-shadow: var(--elevation-card-hover);
  transform: translateY(-3px);
}

.post-meta,
.project-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 18px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.post-meta span + span::before,
.article-meta span + span::before {
  margin-right: 16px;
  color: var(--ember-dim);
  content: "·";
}

.post-card h3,
.project-card h3 {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.post-card p,
.project-card p {
  margin: 13px 0 22px;
  color: var(--fg-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.post-card .text-link,
.project-card .text-link { margin-top: auto; }

.category-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.category-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 21px 0 21px 18px;
  border-bottom: 1px solid var(--hairline);
  color: var(--fg);
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), color 220ms ease;
}

.category-row::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 2px;
  background: var(--ember);
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.category-row:hover {
  color: var(--ember);
  transform: translateX(-4px);
}

.category-row:hover::before { opacity: 1; }
.category-row strong { font-family: var(--font-display); font-size: 20px; font-weight: 400; }
.category-row span { color: var(--fg-muted); font-family: var(--font-mono); font-size: 13px; }
.category-row p { margin: 0; color: var(--fg-muted); font-size: 15px; }

.tag-cloud,
.skill-list,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.tag,
.skill-list li,
.project-tags span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.tag:hover {
  border-color: var(--ember);
  color: var(--ember);
}

.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.project-card {
  display: grid;
  min-height: 196px;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  align-items: start;
}

.project-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--hairline-strong);
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 17px;
}

.project-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.project-card p { margin-bottom: 14px; }
.project-tags { margin: 0 0 18px; }

.about-preview {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  align-items: start;
  max-width: 840px;
}

.portrait {
  overflow: hidden;
  width: 96px;
  height: 96px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--ink-850);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy p {
  max-width: 650px;
  margin: 0;
  color: var(--fg-secondary);
  font-size: 19px;
  line-height: 1.75;
}

.about-copy .text-link { margin-top: 20px; }

.contact-band {
  position: relative;
  overflow: hidden;
  padding-block: 76px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--ink-900);
}

.contact-band::before {
  position: absolute;
  inset: -25% -10% -30% 48%;
  background: radial-gradient(55% 70% at 72% 28%, rgba(245, 181, 98, 0.1), transparent 68%);
  content: "";
}

.contact-band-inner {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.contact-band h2 {
  max-width: 620px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 400;
  line-height: 1.35;
}

.contact-band p {
  margin: 13px 0 0;
  color: var(--fg-muted);
}

.contact-band .button-primary { flex: 0 0 auto; }

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: 88px 62px;
  border-bottom: 1px solid var(--hairline);
}

.page-hero::before {
  position: absolute;
  inset: -35% 25% -45% 55%;
  background: radial-gradient(55% 70% at 65% 20%, rgba(245, 181, 98, 0.1), transparent 68%);
  content: "";
}

.page-hero .section-shell { position: relative; }
.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.28;
}

.page-hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--fg-muted);
  font-size: 19px;
}

.page-section { padding-block: 66px 96px; }
.page-section + .page-section { border-top: 1px solid var(--hairline); }

.filter-bar {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin: 28px 0 22px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: rgba(245, 181, 98, 0.35);
  background: var(--ember-wash);
  color: var(--ember);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--ink-900);
}

.search-box:focus-within {
  border-color: var(--signal);
  box-shadow: 0 0 0 2px rgba(127, 212, 193, 0.18);
}

.search-box svg { flex: 0 0 auto; color: var(--fg-muted); }
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
}

.search-box input::placeholder { color: var(--fg-faint); }

.archive-year {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 28px;
}

.archive-year + .archive-year {
  margin-top: 54px;
}

.archive-year-label {
  position: sticky;
  top: 92px;
  align-self: start;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.archive-year h2 {
  margin: 0 0 15px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.35;
}

.archive-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.archive-row {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}

.archive-row time {
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.archive-row a {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 19px;
  text-decoration: none;
}

.archive-row a:hover { color: var(--ember); }

.article-layout {
  display: grid;
  width: min(1040px, calc(100% - 48px));
  margin-inline: auto;
  grid-template-columns: minmax(0, var(--reading)) 200px;
  gap: 62px;
}

.article-header {
  padding-block: 68px 34px;
}

.article-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.28;
}

.article-header p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--fg-muted);
  font-size: 19px;
}

.article-cover {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto 22px;
}

.article-cover img {
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  object-fit: cover;
}

.prose {
  padding-block: 34px 88px;
}

.prose h2 {
  margin: 2.15em 0 0.65em;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.35;
}

.prose h3 {
  margin: 2em 0 0.55em;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.prose p { margin: 0 0 1.35em; }
.prose li { margin-bottom: 0.55em; }

.prose blockquote {
  margin: 2em 0;
  padding: 20px 24px;
  border-left: 3px solid var(--ember-dim);
  background: var(--ink-900);
  color: var(--fg-secondary);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--ink-800);
  color: var(--ember-bright);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.article-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding-top: 7px;
}

.article-toc strong {
  display: block;
  margin-bottom: 14px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-toc ol {
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--hairline);
  list-style: none;
}

.article-toc li { margin: 0; }

.article-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}

.article-toc a:hover,
.article-toc a.is-active {
  border-left: 2px solid var(--ember);
  margin-left: -1px;
  color: var(--ember);
}

.reading-progress {
  position: fixed;
  z-index: 40;
  top: 64px;
  right: 0;
  left: 0;
  height: 2px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ember);
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-author .portrait {
  width: 54px;
  height: 54px;
}

.article-author p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 13px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 28px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.post-nav a {
  display: flex;
  min-height: 76px;
  align-items: center;
  padding: 16px 18px;
  color: var(--fg-secondary);
  text-decoration: none;
}

.post-nav a + a {
  justify-content: end;
  border-left: 1px solid var(--hairline);
  text-align: right;
}

.post-nav a:hover {
  background: var(--ink-850);
  color: var(--ember);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--ink-850);
}

.photo-card.wide { grid-column: 1 / -1; }
.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-card.wide img { aspect-ratio: 16 / 7; }

.photo-card figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px 19px;
}

.photo-card strong {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
}

.photo-card span {
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) 1fr;
  gap: 62px;
  align-items: start;
}

.profile-photo {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.profile-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.profile-copy > p {
  max-width: 650px;
  margin: 0;
  color: var(--fg-secondary);
  font-size: 19px;
  line-height: 1.75;
}

.profile-copy h2 {
  margin: 46px 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
}

.timeline {
  margin: 20px 0 0;
  padding: 0 0 0 24px;
  border-left: 1px solid var(--hairline-strong);
  list-style: none;
}

.timeline li { position: relative; padding: 0 0 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  position: absolute;
  top: 0.82em;
  left: -29px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--ink-950);
  border-radius: 50%;
  background: var(--ember-dim);
  box-shadow: 0 0 0 1px var(--ember-dim);
  content: "";
}

.timeline time {
  display: block;
  margin-bottom: 4px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.timeline strong {
  display: block;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
}

.timeline p {
  margin: 5px 0 0;
  color: var(--fg-muted);
  font-size: 15px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.65fr);
  gap: 64px;
  align-items: start;
}

.contact-form {
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--ink-850);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field { margin-bottom: 17px; }
.form-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--ink-900);
  color: var(--fg);
}

.form-field input { height: 48px; padding: 0 13px; }
.form-field textarea { min-height: 164px; padding: 12px 13px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 2px rgba(127, 212, 193, 0.18);
}

.form-field.has-error input,
.form-field.has-error textarea { border-color: var(--danger); }
.form-error {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-size: 12px;
}

.form-status {
  min-height: 24px;
  margin: 13px 0 0;
  color: var(--signal);
  font-size: 13px;
}

.contact-notes {
  padding-top: 8px;
}

.contact-notes h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
}

.contact-notes p {
  color: var(--fg-muted);
  font-size: 15px;
}

.contact-list {
  margin: 26px 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.contact-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.contact-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-list a { text-decoration: none; }

.site-footer {
  padding-block: 52px 28px;
  border-top: 1px solid var(--hairline);
  background: var(--ink-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 42px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.footer-grid p {
  max-width: 250px;
  margin: 0;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--fg-muted);
  font-size: 13px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ember);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--fg-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

.footer-bottom a { color: var(--fg-faint); }

.error-page {
  display: grid;
  min-height: 65svh;
  place-items: center;
  padding: 80px 24px;
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: clamp(5.5rem, 14vw, 10rem);
  line-height: 1;
}

.error-page h1 {
  margin: 15px 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
}

.error-page p { margin: 0 auto 24px; color: var(--fg-muted); }

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

.is-ready [data-reveal] {
  animation: reveal-in 700ms ease-out forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.12; transform: scale(1); }
  50% { opacity: 0.18; transform: scale(1.03) translate3d(-1%, 1%, 0); }
}

@keyframes hero-line-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes line-draw {
  to { transform: scaleX(1); }
}

@keyframes ring-in {
  from { opacity: 0; transform: rotate(-30deg) scale(0.86); }
  to { opacity: 0.12; transform: rotate(0) scale(1); }
}

@keyframes reveal-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1023px) {
  .nav-shell,
  .hero-shell,
  .section-shell,
  .footer-shell,
  .article-layout,
  .article-cover {
    width: min(100% - 40px, var(--shell));
  }

  .site-nav ul { gap: 13px; }
  .site-nav a { font-size: 13px; }
  .hero-copy { grid-column: 1 / span 8; }
  .hero::after { left: 66%; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: minmax(0, var(--reading)); }
  .article-toc {
    position: static;
    grid-row: 1;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--hairline);
  }
  .article-layout > div:first-child { grid-row: 2; }
  .article-toc ol { display: flex; overflow-x: auto; gap: 4px; border-left: 0; }
  .article-toc a { padding: 7px 11px; border: 1px solid var(--hairline); border-radius: 3px; white-space: nowrap; }
  .article-toc a:hover,
  .article-toc a.is-active { margin-left: 0; border-color: var(--ember); }
}

@media (max-width: 767px) {
  .nav-shell,
  .hero-shell,
  .section-shell,
  .footer-shell,
  .article-layout,
  .article-cover {
    width: min(100% - 28px, var(--shell));
  }

  .nav-shell { min-height: 56px; gap: 10px; }
  .brand { font-size: 17px; }
  .header-tools { margin-left: auto; }
  .language-switch { display: none; }
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: fixed;
    z-index: 25;
    top: 56px;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    margin: 0;
    padding: 26px 22px;
    background: rgba(8, 9, 11, 0.98);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; gap: 2px; }
  .site-nav a {
    min-height: 52px;
    padding: 0 12px;
    border-bottom: 1px solid var(--hairline);
    font-size: 16px;
  }
  .site-nav a::after { display: none; }
  .hero { min-height: 650px; }
  .hero::before {
    inset: 0 -25% 52% -25%;
    background: radial-gradient(75% 80% at 62% 8%, rgba(245, 181, 98, 0.18), rgba(245, 181, 98, 0) 72%);
  }
  .hero::after { top: 56px; left: 20px; right: 20px; bottom: auto; height: 1px; border: 0; background: var(--hairline); }
  .hero-shell { display: block; }
  .hero-copy { padding-block: 112px 72px; }
  .hero h1 { font-size: 38px; line-height: 1.18; }
  .hero-subtitle { font-size: 17px; }
  .hero-status { display: block; margin-top: 24px; line-height: 1.7; }
  .hero-status::before { display: block; width: 72px; margin-bottom: 11px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions a { min-height: 46px; }
  .hero-ring { display: none; }
  .hero-rail { top: 82px; bottom: 20px; left: -8px; }
  .section { padding-block: 64px; }
  .section-heading,
  .contact-band-inner,
  .article-footer,
  .footer-bottom { align-items: start; flex-direction: column; }
  .section-heading { gap: 13px; margin-bottom: 24px; }
  .post-grid,
  .gallery,
  .field-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 0; }
  .category-row { grid-template-columns: 1fr auto; gap: 10px 16px; padding-block: 18px; }
  .category-row p { grid-column: 1 / -1; }
  .project-card { grid-template-columns: 52px 1fr; gap: 15px; padding: 22px; }
  .project-mark { width: 52px; height: 52px; }
  .about-preview,
  .profile-grid,
  .contact-layout { grid-template-columns: 1fr; gap: 26px; }
  .about-preview { grid-template-columns: 72px 1fr; }
  .portrait { width: 72px; height: 72px; }
  .about-copy p,
  .profile-copy > p { font-size: 17px; }
  .contact-band { padding-block: 64px; }
  .contact-band .button-primary { width: 100%; }
  .page-hero { padding-block: 66px 48px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero p:not(.eyebrow) { font-size: 17px; }
  .page-section { padding-block: 52px 64px; }
  .archive-year { grid-template-columns: 1fr; gap: 13px; }
  .archive-year-label { position: static; }
  .archive-row { grid-template-columns: 1fr; gap: 3px; }
  .archive-row .tag { display: none; }
  .article-header { padding-block: 52px 28px; }
  .article-header h1 { font-size: 32px; }
  .article-header p:not(.eyebrow) { font-size: 17px; }
  .article-toc ol { margin-right: -14px; padding-right: 14px; }
  .article-cover img { max-height: 320px; }
  .prose { padding-block: 28px 64px; }
  .prose h2 { font-size: 24px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a + a { border-top: 1px solid var(--hairline); border-left: 0; text-align: left; justify-content: start; }
  .photo-card.wide { grid-column: auto; }
  .photo-card.wide img { aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 120ms !important;
  }
  .hero::before { opacity: 0.14; }
  .hero h1 span,
  [data-reveal] { opacity: 1; transform: none; }
  .hero-status::before { transform: scaleX(1); }
}
