:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --surface: #fffaf1;
  --surface-strong: #ffffff;
  --ink: #17201f;
  --muted: #66706c;
  --line: rgba(23, 32, 31, 0.14);
  --accent: #047a78;
  --accent-strong: #005b58;
  --amber: #c88719;
  --coral: #c25742;
  --violet: #6f5bb8;
  --shadow: 0 24px 70px rgba(24, 31, 29, 0.16);
  --header: rgba(246, 241, 232, 0.78);
  --radius: 8px;
  --max: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101615;
  --surface: #16211f;
  --surface-strong: #1d2a27;
  --ink: #f4efe3;
  --muted: #a9b6af;
  --line: rgba(244, 239, 227, 0.14);
  --accent: #55c7bd;
  --accent-strong: #8ee4dc;
  --amber: #d6a140;
  --coral: #e0765d;
  --violet: #aa94df;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --header: rgba(16, 22, 21, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(4, 122, 120, 0.24);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: transform 0.2s ease;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 16px clamp(18px, 4vw, 48px);
  color: #fffaf1;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: var(--header);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-text strong {
  font-size: 15px;
}

.brand-text small {
  color: currentColor;
  opacity: 0.72;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 14px;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  color: currentColor;
  opacity: 0.84;
}

.main-nav a.active,
.main-nav a:hover {
  opacity: 1;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: currentColor;
  background: transparent;
  transition: transform 0.18s ease, background 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.site-header.scrolled .icon-button:hover {
  background: rgba(23, 32, 31, 0.06);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fffaf1;
  isolation: isolate;
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  object-fit: cover;
  z-index: -3;
}

.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(9, 12, 13, 0.86), rgba(9, 12, 13, 0.52) 45%, rgba(9, 12, 13, 0.2)),
    linear-gradient(180deg, rgba(9, 12, 13, 0.22), rgba(9, 12, 13, 0.82));
}

.hero-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 120px 0 148px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.hero .eyebrow {
  color: #8ee4dc;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 250, 241, 0.84);
  font-size: 19px;
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #f8f2e8;
  background: var(--accent);
}

.button.ghost {
  color: #fffaf1;
  border-color: rgba(255, 250, 241, 0.42);
  background: rgba(255, 250, 241, 0.08);
  backdrop-filter: blur(8px);
}

.hero-rail {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(var(--max), calc(100% - 36px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  background: rgba(255, 250, 241, 0.08);
  backdrop-filter: blur(16px);
}

.hero-rail div {
  min-height: 72px;
  padding: 16px;
}

.hero-rail span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 250, 241, 0.62);
  font-size: 12px;
}

.hero-rail strong {
  font-size: 16px;
}

.section {
  padding: 104px 0;
  scroll-margin-top: 82px;
}

.section.band {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border-block: 1px solid var(--line);
}

.section-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 38px;
}

.section-heading.compact {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  max-width: none;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-copy {
  max-width: 540px;
  color: var(--muted);
  line-height: 1.8;
}

.overview-grid,
.project-grid,
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.note-grid {
  grid-template-columns: repeat(4, 1fr);
}

.metric-card,
.note-card,
.project-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 12px 30px rgba(18, 24, 23, 0.06);
}

.metric-card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: 36px;
}

.metric-card p,
.note-card p,
.project-card p,
.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.segmented,
.stack-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.segment,
.stack-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.segment.active,
.stack-tab.active {
  color: #fffaf1;
  background: var(--ink);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: min(320px, 100%);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.search-field span {
  color: var(--muted);
  font-size: 13px;
}

.search-field input,
.command-head input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.note-card {
  display: grid;
  align-content: start;
  gap: 16px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.note-card.is-hidden {
  display: none;
}

.note-card:hover,
.project-card:hover {
  transform: translateY(-4px);
}

.tag,
.chip-list li {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(4, 122, 120, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.tag.accent {
  color: #2c6385;
  background: rgba(44, 99, 133, 0.14);
}

.tag.warm {
  color: var(--amber);
  background: rgba(200, 135, 25, 0.14);
}

.tag.violet {
  color: var(--violet);
  background: rgba(111, 91, 184, 0.14);
}

.note-card h3,
.project-card h3,
.timeline h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.note-card a,
.text-link {
  color: var(--accent-strong);
  font-weight: 800;
}

.project-card {
  display: grid;
  gap: 20px;
}

.project-card.featured {
  background: var(--ink);
  color: var(--bg);
}

.project-card.featured p {
  color: color-mix(in srgb, var(--bg) 76%, transparent);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.project-card.featured .project-topline {
  color: color-mix(in srgb, var(--bg) 68%, transparent);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card.featured .chip-list li {
  color: var(--bg);
  background: rgba(255, 255, 255, 0.12);
}

.life-main {
  min-height: 70vh;
}

.life-hero {
  padding: 96px 0 56px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 80%, transparent), transparent),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.life-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
}

.life-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.04;
}

.life-hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.life-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.life-grid.compact {
  grid-template-columns: repeat(4, 1fr);
}

.life-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 18px 46px rgba(18, 24, 23, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.life-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 62px rgba(18, 24, 23, 0.14);
}

.life-card.large {
  grid-column: span 2;
}

.life-card-link {
  display: grid;
  height: 100%;
}

.life-photo-grid {
  display: grid;
  min-height: 220px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.life-photo-grid.count-1 {
  grid-template-columns: 1fr;
}

.life-photo-grid.count-2 {
  grid-template-columns: repeat(2, 1fr);
}

.life-photo-grid.count-3,
.life-photo-grid.count-4 {
  grid-template-columns: repeat(2, 1fr);
}

.life-photo-grid figure {
  position: relative;
  min-height: 120px;
  margin: 0;
  overflow: hidden;
}

.life-photo-grid img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.life-photo-grid figcaption {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fffaf1;
  background: rgba(5, 8, 8, 0.48);
  font-size: 30px;
  font-weight: 800;
}

.life-card-body {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.life-card-body time {
  color: var(--muted);
  font-size: 13px;
}

.life-card-body h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.life-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.life-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.life-meta li {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--coral);
  background: color-mix(in srgb, var(--coral) 14%, transparent);
  font-size: 12px;
  font-weight: 700;
}

.stack-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.stack-tabs {
  flex-direction: column;
  width: 100%;
}

.stack-panel {
  display: none;
  gap: 12px;
}

.stack-panel.active {
  display: grid;
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr minmax(170px, 30%);
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.skill-row div {
  display: grid;
  gap: 6px;
}

.skill-row span {
  color: var(--muted);
  font-size: 14px;
}

meter {
  width: 100%;
  height: 12px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 54%, transparent);
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 118px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 32px;
  padding: 24px 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 112px;
  top: 32px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent);
}

.time {
  color: var(--muted);
  font-size: 14px;
}

.timeline div {
  max-width: 760px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 6vw, 86px);
  align-items: start;
}

.contact-links {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.contact-links a {
  width: fit-content;
  color: var(--accent-strong);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: var(--muted);
  font-size: 13px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus,
.search-field:focus-within,
.command-head:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(4, 122, 120, 0.12);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 48px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 800;
}

.command-dialog {
  width: min(640px, calc(100% - 28px));
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: transparent;
}

.command-dialog::backdrop {
  background: rgba(5, 8, 8, 0.58);
  backdrop-filter: blur(6px);
}

.command-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.command-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.command-list {
  max-height: 420px;
  overflow: auto;
  padding: 8px;
}

.command-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 62px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius);
  text-align: left;
  color: var(--ink);
  background: transparent;
}

.command-item:hover,
.command-item:focus {
  outline: 0;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}

.command-item strong {
  font-size: 15px;
}

.command-item span {
  color: var(--muted);
  font-size: 13px;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero h1 {
    font-size: 56px;
  }

  .overview-grid,
  .project-grid,
  .note-grid,
  .life-grid,
  .life-grid.compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .life-card.large {
    grid-column: span 1;
  }

  .stack-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .stack-tabs {
    flex-direction: row;
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  .site-header {
    padding: 12px 16px;
  }

  .brand-mark,
  .icon-button {
    width: 34px;
    height: 34px;
  }

  .header-actions {
    display: none;
  }

  [data-command-open] {
    display: none;
  }

  .brand-text small {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-inner {
    width: min(100% - 30px, var(--max));
    padding: 104px 0 180px;
  }

  .hero h1 {
    max-width: 420px;
    font-size: 42px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-rail {
    grid-template-columns: 1fr;
    bottom: 16px;
  }

  .hero-rail div {
    min-height: 54px;
    padding: 10px 14px;
  }

  .section {
    padding: 74px 0;
  }

  .section-heading.compact,
  .toolbar {
    display: grid;
    align-items: start;
  }

  .overview-grid,
  .project-grid,
  .note-grid,
  .life-grid,
  .life-grid.compact {
    grid-template-columns: 1fr;
  }

  .life-hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .life-photo-grid {
    min-height: 190px;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segment {
    flex: 0 0 auto;
  }

  .search-field {
    width: 100%;
  }

  .skill-row {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 34px;
  }

  .timeline li::before {
    left: 2px;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.inner-template {
  padding-top: 72px;
}

.archive-main,
.article-main {
  min-height: 70vh;
}

.archive-hero {
  padding: 92px 0 42px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.archive-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
}

.archive-list {
  display: grid;
  gap: 16px;
}

.archive-card,
.archive-empty,
.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.archive-card h2,
.archive-empty h2,
.empty-state h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.18;
}

.archive-card p,
.archive-empty p,
.empty-state p {
  color: var(--muted);
  line-height: 1.8;
}

.archive-nav .page-navigator {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.archive-nav .page-navigator a,
.archive-nav .page-navigator span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
}

.article-shell {
  width: min(840px, calc(100% - 36px));
  margin: 0 auto;
  padding: 92px 0 96px;
}

.article-header {
  margin-bottom: 34px;
}

.entry-meta,
.article-tags {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.article-tags a {
  display: inline-flex;
  margin: 0 8px 8px 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(4, 122, 120, 0.12);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.article-header h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
}

.article-content {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.9;
}

.article-content > * {
  margin-top: 0;
  margin-bottom: 1.1em;
}

.article-content h2,
.article-content h3 {
  margin-top: 2em;
  line-height: 1.25;
}

.article-content a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content pre,
.article-content code {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.article-content pre {
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.article-content img {
  border-radius: var(--radius);
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post-nav div {
  min-height: 62px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.comments {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.comments h2 {
  margin: 0 0 18px;
}

.comment-list,
.comment-list ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-list .comment-body {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.comment-form {
  display: grid;
  gap: 14px;
}

.comment-form label {
  display: grid;
  gap: 8px;
}

.comment-form span,
.comment-login {
  color: var(--muted);
  font-size: 14px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  outline: 0;
  color: var(--ink);
  background: var(--surface);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(4, 122, 120, 0.12);
}

@media (max-width: 700px) {
  .inner-template {
    padding-top: 58px;
  }

  .article-shell {
    padding: 62px 0 74px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }
}

.button.subtle {
  color: var(--ink);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
}

.life-entry-section {
  padding-top: 88px;
}

.life-entry-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 42%),
    linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
}

.life-entry-copy {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.life-entry-copy h2 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
}

.life-entry-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.life-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.life-main .life-hero {
  padding: 118px 0 52px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, transparent), var(--bg)),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 56%);
}

.life-main .life-hero-inner {
  align-items: center;
}

.life-main .life-hero h1 {
  font-size: clamp(42px, 8vw, 92px);
}

.life-main .life-hero p:not(.eyebrow) {
  font-size: 17px;
}

.life-feed-section {
  padding-top: 46px;
}

.life-feed-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.life-feed-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.1;
}

.life-main .life-grid {
  display: block;
  column-count: 3;
  column-gap: 18px;
}

.life-main .life-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  vertical-align: top;
  background: color-mix(in srgb, var(--surface-strong) 95%, var(--accent));
}

.life-main .life-card.large {
  grid-column: auto;
}

.life-main .life-card-link {
  display: block;
  height: auto;
  color: inherit;
}

.life-main .life-photo-grid {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 2px;
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.life-main .life-photo-grid.count-1 {
  grid-template-columns: 1fr;
  aspect-ratio: 16 / 10;
}

.life-main .life-photo-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  aspect-ratio: 3 / 2;
}

.life-main .life-photo-grid.count-3,
.life-main .life-photo-grid.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.life-main .life-photo-grid.count-3 figure:first-child {
  grid-row: span 2;
}

.life-main .life-photo-grid figure {
  min-height: 0;
}

.life-main .life-photo-grid img {
  display: block;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.life-main .life-card.text-only .life-card-body {
  padding-top: 28px;
}

.life-main .life-card-body {
  gap: 10px;
  padding: 20px;
}

.life-main .life-card-body h3 {
  font-size: 21px;
}

.life-main .life-card-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.life-main .life-grid .empty-state {
  display: block;
  column-span: all;
  margin: 0;
}

@media (max-width: 980px) {
  .life-entry-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .life-entry-actions {
    justify-content: flex-start;
  }

  .life-main .life-grid {
    column-count: 2;
  }
}

@media (max-width: 700px) {
  .life-entry-section {
    padding-top: 70px;
  }

  .life-entry-panel {
    padding: 24px;
  }

  .life-entry-actions,
  .life-entry-actions .button,
  .life-main .life-hero .button {
    width: 100%;
  }

  .life-main .life-hero {
    padding: 92px 0 36px;
  }

  .life-feed-head {
    display: block;
  }

  .life-main .life-grid {
    column-count: 1;
  }

  .life-main .life-photo-grid,
  .life-main .life-photo-grid.count-1,
  .life-main .life-photo-grid.count-2 {
    aspect-ratio: 4 / 3;
  }
}
