:root {
  color-scheme: dark;
  --bg: #090b0c;
  --bg-elevated: #101416;
  --surface: #14191b;
  --surface-strong: #1b2224;
  --text: #f3f6f4;
  --text-soft: #a5afab;
  --text-faint: #6f7a76;
  --border: #27302d;
  --border-strong: #3a4641;
  --accent: #65e6b1;
  --accent-strong: #37cf91;
  --accent-soft: #15392d;
  --accent-warm: #f2c14f;
  --danger: #ff7968;
  --header-bg: 9, 11, 12;
  --shadow: rgba(0, 0, 0, 0.32);
  --max-width: 1180px;
  --header-height: 68px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f4;
  --bg-elevated: #ffffff;
  --surface: #edf1ee;
  --surface-strong: #e2e9e5;
  --text: #121715;
  --text-soft: #56615d;
  --text-faint: #7b8682;
  --border: #d4dcd7;
  --border-strong: #b7c4bd;
  --accent: #087f5b;
  --accent-strong: #066647;
  --accent-soft: #d8f4e8;
  --accent-warm: #e9b640;
  --danger: #bd3d2c;
  --header-bg: 245, 247, 244;
  --shadow: rgba(28, 42, 36, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  transition: background-color 220ms ease, color 220ms ease;
}

body.dialog-open {
  overflow: hidden;
}

body.menu-open-body {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: #08110d;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 2px solid var(--bg);
  border-radius: 8px;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

svg {
  width: 1em;
  height: 1em;
  stroke-width: 1.8;
}

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

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 2px;
  pointer-events: none;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(var(--header-bg), 0.92);
  border-color: var(--border);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(var(--max-width), calc(100% - 48px));
  height: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.brand-name {
  font-size: 16px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav a {
  position: relative;
  color: var(--text-soft);
  font-size: 14px;
  transition: color 180ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--text);
}

.desktop-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.availability span,
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.icon-button,
.icon-link {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-soft);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.icon-button:hover,
.icon-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 10;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 150ms ease, transform 150ms ease;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mobile-menu-button,
.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  min-height: calc(100svh - 88px);
  padding: calc(var(--header-height) + 64px) 0 76px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

#signal-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero-grid {
  display: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(var(--header-bg), 0.18);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 90px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 20px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}

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

.hero h1 {
  margin: 0;
  font-size: 82px;
  line-height: 1;
  font-weight: 700;
}

.hero-lead {
  margin: 24px 0 0;
  max-width: 720px;
  font-size: 38px;
  line-height: 1.28;
  font-weight: 600;
}

.hero-summary {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: 17px;
}

.hero-actions,
.project-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 32px;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button svg {
  width: 17px;
  height: 17px;
}

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

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

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-facts {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.hero-facts span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-facts svg {
  color: var(--accent);
}

.signal-readout {
  align-self: end;
  margin-bottom: 48px;
  padding-left: 22px;
  border-left: 1px solid var(--border-strong);
}

.signal-readout p {
  margin: 0 0 7px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.signal-readout strong {
  display: block;
  font-size: 19px;
}

.signal-readout > span {
  display: block;
  margin-top: 9px;
  color: var(--text-soft);
  font-size: 13px;
}

.readout-line {
  height: 22px;
  margin-top: 18px;
  display: flex;
  align-items: end;
  gap: 4px;
}

.readout-line span {
  width: 22px;
  background: var(--accent);
  opacity: 0.72;
  animation: signal-bars 1.8s ease-in-out infinite alternate;
}

.readout-line span:nth-child(1) { height: 7px; }
.readout-line span:nth-child(2) { height: 15px; animation-delay: 120ms; }
.readout-line span:nth-child(3) { height: 10px; animation-delay: 240ms; }
.readout-line span:nth-child(4) { height: 22px; animation-delay: 360ms; }
.readout-line span:nth-child(5) { height: 13px; animation-delay: 480ms; }

@keyframes signal-bars {
  from { transform: scaleY(0.45); opacity: 0.35; }
  to { transform: scaleY(1); opacity: 0.9; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  transform: translateX(-50%);
}

.scroll-cue svg {
  color: var(--accent);
  animation: scroll-cue 1.6s ease-in-out infinite;
}

@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.metrics-band {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

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

.metric {
  min-height: 112px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--border);
}

.metric:last-child {
  border-right: 1px solid var(--border);
}

.metric strong {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  line-height: 1;
}

.metric span {
  margin-top: 9px;
  color: var(--text-soft);
  font-size: 13px;
}

.section {
  padding: 116px 0;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-heading h2,
.about-copy h2,
.contact-layout h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.18;
  font-weight: 700;
}

.section-heading > p:last-child,
.contact-layout > div > p:last-child {
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 17px;
}

.article-tools {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.search-field {
  width: 390px;
  height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-faint);
  transition: border-color 180ms ease;
}

.search-field:focus-within {
  border-color: var(--accent);
}

.search-field > svg {
  flex: 0 0 auto;
}

.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.search-field input::placeholder {
  color: var(--text-faint);
}

.search-field button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.filter-tabs,
.project-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.filter-tabs button,
.project-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.filter-tabs button:hover,
.project-tabs button:hover {
  color: var(--text);
}

.filter-tabs button.is-active,
.project-tabs button[aria-selected="true"] {
  background: var(--surface-strong);
  color: var(--accent);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-card {
  position: relative;
  min-height: 326px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.article-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: border-color 220ms ease, background-color 220ms ease;
}

.article-card:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-5px);
}

.article-card:hover::after {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.article-card[hidden] {
  display: none;
}

.article-meta,
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.article-meta span {
  color: var(--accent);
}

.article-card h3 {
  margin: 46px 0 0;
  max-width: 310px;
  font-size: 24px;
  line-height: 1.35;
}

.article-card > p {
  margin: 16px 0 28px;
  color: var(--text-soft);
  font-size: 14px;
}

.article-footer {
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.article-footer svg {
  color: var(--accent);
  transition: transform 180ms ease;
}

.article-card:hover .article-footer svg {
  transform: translate(3px, -3px);
}

.empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-soft);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.project-section {
  background: var(--bg-elevated);
}

.project-heading {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: 64px;
}

.project-media {
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 60px var(--shadow);
  overflow: hidden;
}

.browser-bar {
  height: 42px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: 8px 8px 8px 1fr;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-strong);
}

.browser-bar > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
}

.browser-bar > span:first-child { background: var(--danger); }
.browser-bar > span:nth-child(2) { background: var(--accent-warm); }
.browser-bar > span:nth-child(3) { background: var(--accent); }

.browser-bar div {
  justify-self: center;
  min-width: 190px;
  padding: 3px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-align: center;
}

.project-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.project-media figcaption {
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.project-intro {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-intro img {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  object-fit: cover;
}

.project-intro p {
  margin: 0 0 5px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.project-intro h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.32;
}

.project-description {
  margin: 24px 0;
  color: var(--text-soft);
  font-size: 15px;
}

.project-tabs {
  margin-bottom: 20px;
}

.project-panel {
  min-height: 126px;
  padding: 18px 0 18px 18px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  border-left: 2px solid var(--accent);
}

.project-panel-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
}

.project-panel h4 {
  margin: 0;
  font-size: 16px;
}

.project-panel p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.project-stack {
  margin: 22px 0 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-stack span {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(430px, 1.05fr);
  align-items: start;
  gap: 90px;
}

.about-copy > p:not(.section-kicker) {
  color: var(--text-soft);
  font-size: 16px;
}

.about-copy h2 {
  margin-bottom: 28px;
}

.skill-matrix {
  margin-top: 38px;
  border-bottom: 1px solid var(--border);
}

.skill-matrix div {
  padding: 15px 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  border-top: 1px solid var(--border);
}

.skill-matrix span {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.skill-matrix strong {
  font-size: 13px;
  font-weight: 500;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: var(--border-strong);
}

.timeline-item {
  position: relative;
  padding: 0 0 34px;
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -28px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-item time {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.timeline-item h3 {
  margin: 0;
  font-size: 17px;
}

.timeline-item p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.contact-section {
  padding: 88px 0;
  background: var(--accent-warm);
  color: #101512;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 60px;
}

.contact-layout .section-kicker,
.contact-layout > div > p:last-child {
  color: #3d3a2a;
}

.contact-layout > div > p:last-child {
  max-width: 700px;
}

.contact-actions {
  justify-content: flex-end;
}

.contact-actions .button-primary {
  background: #101512;
  color: #ffffff;
}

.contact-actions .button-primary:hover {
  background: #25312c;
}

.contact-actions .button-secondary,
.contact-actions .icon-link {
  border-color: rgba(16, 21, 18, 0.38);
  background: transparent;
  color: #101512;
}

.contact-actions .button-secondary:hover,
.contact-actions .icon-link:hover {
  border-color: #101512;
  color: #101512;
}

.site-footer {
  padding: 28px 0;
  background: var(--bg);
  color: var(--text-faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.site-footer .page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 180ms ease;
}

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

.article-dialog {
  width: min(840px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
  overflow: hidden;
}

.article-dialog::backdrop {
  background: rgba(3, 5, 5, 0.76);
  backdrop-filter: blur(7px);
}

.article-dialog[open] {
  animation: dialog-in 220ms ease both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reader-progress {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 2px;
  background: var(--border);
}

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

.dialog-toolbar {
  position: sticky;
  top: 2px;
  z-index: 2;
  min-height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(var(--header-bg), 0.96);
  backdrop-filter: blur(14px);
}

.dialog-toolbar > span {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.dialog-toolbar > div {
  display: flex;
  gap: 8px;
}

.reader-body {
  max-height: calc(100svh - 100px);
  padding: 56px 72px 80px;
  overflow-y: auto;
}

.reader-meta {
  margin: 0 0 16px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.reader-body > h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1.2;
}

.reader-deck {
  margin: 20px 0 42px;
  color: var(--text-soft);
  font-size: 17px;
}

.reader-content h3 {
  margin: 42px 0 14px;
  font-size: 22px;
}

.reader-content p,
.reader-content li {
  color: var(--text-soft);
  font-size: 15px;
}

.reader-content ul {
  padding-left: 20px;
}

.reader-content li + li {
  margin-top: 9px;
}

.reader-content strong {
  color: var(--text);
}

.reader-content code {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
}

.reader-content pre {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  overflow-x: auto;
}

.reader-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.reader-content blockquote {
  margin: 26px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  color: var(--text);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  min-width: 190px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 300;
  padding: 12px;
  border: 1px solid var(--danger);
  background: var(--bg-elevated);
  color: var(--text);
  text-align: center;
}

@media (max-width: 1040px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .signal-readout {
    display: none;
  }

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

  .article-card:last-child {
    grid-column: 1 / -1;
    min-height: 280px;
  }

  .project-layout,
  .about-layout {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .project-copy {
    max-width: 760px;
  }

  .about-copy {
    max-width: 780px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 62px;
  }

  .page-shell,
  .nav-shell {
    width: min(100% - 32px, var(--max-width));
  }

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

  .desktop-nav,
  .availability {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
  }

  .mobile-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(var(--header-bg), 0.97);
    backdrop-filter: blur(16px);
  }

  .mobile-menu:not([hidden]) {
    display: grid;
  }

  .mobile-menu a {
    min-height: 46px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 14px;
  }

  .hero {
    min-height: calc(100svh - 86px);
    padding: calc(var(--header-height) + 48px) 0 64px;
  }

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

  .hero-lead {
    font-size: 32px;
  }

  .hero-summary {
    max-width: 620px;
    font-size: 15px;
  }

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

  .metric:nth-child(3) {
    border-top: 1px solid var(--border);
  }

  .metric:nth-child(4) {
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  .section {
    padding: 86px 0;
  }

  .section-heading h2,
  .about-copy h2,
  .contact-layout h2 {
    font-size: 38px;
  }

  .article-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .filter-tabs {
    align-self: flex-start;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .brand-name {
    display: none;
  }

  .hero {
    min-height: calc(100svh - 76px);
    padding-top: calc(var(--header-height) + 38px);
  }

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

  .hero-lead {
    margin-top: 20px;
    font-size: 27px;
  }

  .desktop-break {
    display: none;
  }

  .hero-summary {
    margin-top: 18px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-actions .button {
    flex: 1 1 160px;
  }

  .hero-facts {
    margin-top: 25px;
    gap: 10px 16px;
  }

  .scroll-cue {
    display: none;
  }

  .metric {
    min-height: 94px;
    padding: 18px;
  }

  .metric strong {
    font-size: 22px;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .section-heading h2,
  .about-copy h2,
  .contact-layout h2 {
    font-size: 32px;
  }

  .section-heading > p:last-child,
  .contact-layout > div > p:last-child {
    font-size: 15px;
  }

  .filter-tabs,
  .project-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .filter-tabs button,
  .project-tabs button {
    min-width: max-content;
    flex: 1;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-card,
  .article-card:last-child {
    grid-column: auto;
    min-height: 286px;
  }

  .article-card h3 {
    margin-top: 38px;
    font-size: 22px;
  }

  .project-layout,
  .about-layout {
    gap: 40px;
  }

  .browser-bar div {
    min-width: 130px;
  }

  .project-intro {
    align-items: flex-start;
  }

  .project-intro h3 {
    font-size: 22px;
  }

  .project-panel {
    grid-template-columns: 1fr;
  }

  .project-actions .button {
    flex: 1 1 180px;
  }

  .skill-matrix div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline-item::before {
    left: -24px;
  }

  .contact-section {
    padding: 72px 0;
  }

  .contact-actions .button {
    flex: 1 1 160px;
  }

  .site-footer .page-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .reader-body {
    padding: 38px 22px 60px;
  }

  .reader-body > h2 {
    font-size: 31px;
  }

  .reader-deck {
    font-size: 15px;
  }
}

@media (max-height: 620px) and (min-width: 621px) {
  .hero {
    min-height: 560px;
    padding-top: calc(var(--header-height) + 38px);
  }

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

  .hero-lead {
    font-size: 29px;
  }

  .hero-facts,
  .scroll-cue {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
