:root {
  color-scheme: light;
  --canvas: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #f0f4f2;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --surface-glass-soft: rgba(255, 255, 255, 0.72);
  --tag-surface: #fbfcfc;
  --ink: #18201e;
  --ink-secondary: #4f5c58;
  --nav-ink: #52605b;
  --muted: #66716d;
  --quiet: #68736f;
  --line: #dce3e0;
  --line-strong: #cbd5d1;
  --section-line: rgba(203, 213, 209, 0.72);
  --hover-line: #adc7c0;
  --accent: #167b69;
  --accent-dark: #105f52;
  --accent-fill: #105f52;
  --accent-soft: #e4f1ed;
  --on-accent: #ffffff;
  --dark: #202826;
  --dark-soft: #2a3431;
  --dark-ink: #edf3f1;
  --dark-muted: #aab7b3;
  --dark-quiet: #8fa09b;
  --dark-accent: #7ad2be;
  --dark-line: rgba(255, 255, 255, 0.09);
  --dark-border: #293532;
  --white: #ffffff;
  --brand-bg: #18201e;
  --brand-ink: #ffffff;
  --header-bg: rgba(246, 248, 247, 0.91);
  --tint-bg: rgba(240, 244, 242, 0.72);
  --grid-line: rgba(24, 32, 30, 0.019);
  --focus-ring: rgba(22, 123, 105, 0.24);
  --input-focus-ring: rgba(22, 123, 105, 0.1);
  --placeholder: #9aa5a1;
  --active-label: #bce2d8;
  --award-bg: #fff6dc;
  --award-ink: #865900;
  --award-line: #ead18b;
  --shadow: 0 1px 2px rgba(20, 31, 28, 0.04),
    0 14px 36px rgba(20, 31, 28, 0.045);
  --shadow-soft: 0 2px 12px rgba(20, 31, 28, 0.025);
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas,
    monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shell: 1200px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #111715;
  --surface: #18211e;
  --surface-soft: #202b27;
  --surface-glass: rgba(24, 33, 30, 0.9);
  --surface-glass-soft: rgba(24, 33, 30, 0.78);
  --tag-surface: #1c2623;
  --ink: #edf5f2;
  --ink-secondary: #b4c2bd;
  --nav-ink: #aab9b4;
  --muted: #a7b7b1;
  --quiet: #84968f;
  --line: #2e3d38;
  --line-strong: #41534d;
  --section-line: rgba(65, 83, 77, 0.66);
  --hover-line: #547168;
  --accent: #4ec2a4;
  --accent-dark: #8ad8c3;
  --accent-fill: #267d67;
  --accent-soft: #193a31;
  --on-accent: #f4fffb;
  --dark: #0c1210;
  --dark-soft: #121a17;
  --dark-ink: #edf5f2;
  --dark-muted: #a7b7b1;
  --dark-quiet: #82948e;
  --dark-accent: #68d1b5;
  --dark-line: rgba(237, 245, 242, 0.1);
  --dark-border: #26322e;
  --brand-bg: #267d67;
  --brand-ink: #f4fffb;
  --header-bg: rgba(17, 23, 21, 0.91);
  --tint-bg: rgba(25, 35, 31, 0.72);
  --grid-line: rgba(237, 245, 242, 0.025);
  --focus-ring: rgba(78, 194, 164, 0.32);
  --input-focus-ring: rgba(78, 194, 164, 0.16);
  --placeholder: #71827c;
  --active-label: #d2f5eb;
  --award-bg: rgba(214, 164, 49, 0.14);
  --award-ink: #f2cf78;
  --award-line: rgba(242, 207, 120, 0.32);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.18),
    0 16px 38px rgba(0, 0, 0, 0.16);
  --shadow-soft: 0 2px 14px rgba(0, 0, 0, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  pointer-events: none;
}

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

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ul {
  margin-top: 0;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 9px 13px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--surface);
  transform: translateY(-160%);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--section-line);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  gap: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-bg);
  color: var(--brand-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.brand-name {
  display: grid;
  line-height: 1.15;
}

.brand-name strong {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.01em;
}

.brand-name small {
  margin-top: 4px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  color: var(--nav-ink);
  font-size: 13px;
  font-weight: 620;
  transition: color 160ms ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-current {
  color: var(--accent-dark);
}

.site-nav a:hover::after,
.site-nav a.is-current::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass-soft);
  box-shadow: var(--shadow-soft);
}

.theme-option {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  gap: 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease,
    color 160ms ease;
}

.theme-option:hover {
  color: var(--ink);
}

.theme-option.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.theme-option span {
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 1;
}

.header-status > span[aria-hidden="true"] {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Hero */

.hero {
  padding: 72px 0 42px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(330px, 0.66fr);
  align-items: end;
  gap: clamp(38px, 5.5vw, 76px);
}

.hero-copy,
.overview-work,
.experience-main,
.case-heading > div {
  min-width: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-kicker::before {
  width: 28px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.hero h1 {
  margin-bottom: 5px;
  font-size: clamp(46px, 4.6vw, 64px);
  font-weight: 740;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.hero h1 span {
  font-size: 0.84em;
  font-weight: 690;
}

.hero-copy > h2 {
  margin-bottom: 15px;
  color: var(--accent-dark);
  font-size: clamp(26px, 2.35vw, 33px);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.hero-summary {
  max-width: 760px;
  margin-bottom: 21px;
  color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1.8;
}

.hero-summary strong {
  color: var(--ink);
  font-weight: 680;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 680;
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, background 160ms ease,
    color 160ms ease, transform 160ms ease;
}

.button span {
  margin-left: 14px;
  font-size: 16px;
}

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

.button-primary {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
}

.button-primary:hover {
  border-color: var(--accent);
  background: var(--accent-fill);
  color: var(--on-accent);
}

.button-secondary {
  background: var(--surface-glass-soft);
}

.proof-panel {
  padding: 19px 21px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-glass);
  box-shadow: var(--shadow);
}

.proof-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.proof-heading strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.proof-heading code {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.proof-body {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding-top: 13px;
}

.proof-portrait {
  min-width: 0;
  margin: 0;
}

.proof-portrait img {
  display: block;
  width: 76px;
  height: 102px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.82) contrast(0.98);
}

.proof-portrait figcaption {
  margin-top: 6px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-align: center;
}

.proof-list {
  margin-bottom: 0;
}

.proof-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.proof-list > div:first-child {
  padding-top: 0;
}

.proof-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.proof-list dt {
  display: grid;
  gap: 3px;
}

.proof-list dt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.proof-list dt strong {
  font-size: 13px;
  font-weight: 690;
}

.proof-list dd {
  margin: 0;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 730;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.proof-contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  padding-top: 13px;
  margin-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.proof-contact span {
  color: var(--quiet);
}

.proof-contact strong {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 680;
  text-align: right;
  overflow-wrap: anywhere;
}

/* Recent achievements */

.achievement-news {
  padding: 8px 0 58px;
}

.news-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 0 16px;
  border-top: 1px solid var(--section-line);
}

.news-heading .section-index {
  margin-bottom: 4px;
}

.news-heading h2 {
  margin-bottom: 0;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.035em;
}

.news-heading > p {
  max-width: 460px;
  margin-bottom: 2px;
  color: var(--quiet);
  font-size: 11px;
  text-align: right;
}

.news-grid {
  display: grid;
  grid-template-columns: 1.08fr repeat(2, minmax(0, 0.96fr));
  gap: 14px;
}

.news-card {
  display: flex;
  min-height: 218px;
  padding: 20px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.news-card-featured {
  position: relative;
  overflow: hidden;
  border-color: var(--dark-border);
  background: var(--dark);
  color: var(--dark-ink);
}

.news-card-featured::before {
  position: absolute;
  right: 20px;
  bottom: 62px;
  color: var(--dark-accent);
  content: "✦  ✦";
  font-size: 12px;
  letter-spacing: 8px;
  opacity: 0.78;
  transform: rotate(-8deg);
  animation: news-sparkle-in 760ms ease-out 620ms both;
}

.news-card-featured::after {
  position: absolute;
  right: 16px;
  bottom: 13px;
  content: "💐";
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 48px;
  line-height: 1;
  filter: saturate(0.92) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
  transform: rotate(8deg);
  transform-origin: 50% 100%;
  animation: news-bouquet-in 920ms cubic-bezier(0.2, 0.86, 0.3, 1.16) 180ms both;
}

@keyframes news-bouquet-in {
  0% {
    opacity: 0;
    transform: translate(24px, 24px) scale(0.28) rotate(28deg);
  }

  58% {
    opacity: 1;
    transform: translate(-4px, -5px) scale(1.12) rotate(1deg);
  }

  78% {
    transform: translate(1px, 2px) scale(0.97) rotate(11deg);
  }

  100% {
    opacity: 1;
    transform: rotate(8deg);
  }
}

@keyframes news-sparkle-in {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(-18deg);
  }

  55% {
    opacity: 1;
    transform: scale(1.24) rotate(-4deg);
  }

  100% {
    opacity: 0.78;
    transform: scale(1) rotate(-8deg);
  }
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.07em;
}

.news-card-featured .news-meta {
  color: var(--dark-quiet);
}

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

.news-card-featured .news-meta span {
  color: var(--dark-accent);
}

.news-card h3 {
  margin-bottom: 9px;
  font-size: 19px;
  font-weight: 710;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.news-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.78;
}

.news-card-featured p {
  color: var(--dark-muted);
}

.news-card > strong {
  padding-top: 13px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.news-card-featured > strong {
  padding-right: 72px;
  border-top-color: var(--dark-line);
  color: var(--dark-accent);
}

/* First-screen work summary */

.selected-overview {
  padding: 0 0 84px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.72fr);
  align-items: stretch;
  gap: 22px;
}

.compact-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.compact-heading h2 {
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 710;
  letter-spacing: -0.01em;
}

.compact-heading span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.09em;
}

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

.overview-card {
  display: flex;
  min-width: 0;
  min-height: 206px;
  padding: 18px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 170ms ease, box-shadow 170ms ease,
    transform 170ms ease;
}

.overview-card:hover {
  border-color: var(--hover-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.overview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.overview-meta b {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-weight: 700;
  white-space: nowrap;
}

.overview-meta span {
  text-align: right;
}

.overview-card h3 {
  margin-bottom: 7px;
  font-size: 18px;
  font-weight: 710;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.overview-card p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: auto 0 0;
  list-style: none;
}

.mini-tags li {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--tag-surface);
  color: var(--nav-ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 620;
}

.repo-overview {
  display: flex;
  padding: 17px 20px 14px;
  flex-direction: column;
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  background: var(--dark);
  color: var(--dark-ink);
  box-shadow: var(--shadow);
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.repo-overview:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.repo-overview .compact-heading {
  margin-bottom: 7px;
}

.repo-overview .compact-heading h2 {
  color: var(--white);
}

.repo-overview .compact-heading span {
  color: var(--dark-quiet);
}

.repo-overview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 9px 0;
  border-top: 1px solid var(--dark-line);
}

.repo-overview-row strong {
  display: block;
  font-size: 12px;
  font-weight: 680;
}

.repo-overview-row small {
  display: block;
  margin-top: 2px;
  color: var(--dark-quiet);
  font-size: 10px;
}

.repo-overview-row > b {
  min-width: 35px;
  color: var(--dark-accent);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-align: right;
}

.repo-overview footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  margin-top: auto;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-size: 10px;
}

.repo-overview footer strong {
  color: var(--white);
  font-size: 11px;
}

/* Long-form sections */

.section {
  padding: 92px 0;
  border-top: 1px solid var(--section-line);
}

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

.section-heading {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  margin-bottom: 34px;
}

.section-index {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(31px, 3.4vw, 41px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

/* Experience */

.experience-list {
  display: grid;
  gap: 18px;
}

.experience-item {
  position: relative;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 30px;
  padding: 29px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-glass);
  box-shadow: var(--shadow-soft);
}

.experience-item.featured {
  border-color: var(--hover-line);
}

.experience-item.featured::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  content: "";
}

.experience-side {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}

.experience-side time {
  color: var(--ink-secondary);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 660;
}

.experience-side > span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.experience-side .status {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.experience-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.experience-title h3 {
  margin-bottom: 4px;
  font-size: 21px;
  font-weight: 710;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.experience-title p {
  margin-bottom: 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
}

.experience-title > span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.experience-summary {
  margin-bottom: 18px;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.evidence-list,
.case-points {
  display: grid;
  gap: 11px;
  padding: 0;
  margin-bottom: 21px;
  list-style: none;
}

.evidence-list li,
.case-points li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.82;
}

.evidence-list li::before,
.case-points li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

.evidence-list strong,
.case-points strong {
  color: var(--ink);
  font-weight: 690;
}

.evidence-list.compact {
  gap: 8px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin-bottom: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--tag-surface);
  color: var(--nav-ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 640;
}

/* Case studies */

.case-list {
  display: grid;
  gap: 20px;
}

.case-study {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.case-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 17px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.case-kind {
  margin-bottom: 7px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.1em;
}

.case-heading h3 {
  margin-bottom: 5px;
  font-size: 23px;
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.case-heading div > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.case-heading > a {
  min-width: max-content;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 680;
  transition: border-color 160ms ease, background 160ms ease;
}

.case-heading > a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.case-summary {
  max-width: 900px;
  margin-bottom: 22px;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.case-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: stretch;
  gap: 26px;
}

.case-points {
  margin-bottom: 0;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.case-metrics > div {
  display: flex;
  min-width: 0;
  padding: 15px 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.case-metrics > div + div {
  border-left: 1px solid var(--line);
}

.case-metrics dt {
  margin-bottom: 5px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.case-metrics dd {
  margin: 0;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 730;
  letter-spacing: -0.04em;
}

.case-metrics sup {
  margin-left: 2px;
  font-size: 9px;
  letter-spacing: 0;
}

.case-study > .tag-list {
  padding-top: 20px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

/* Technical profile */

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

.skill-matrix article {
  display: flex;
  min-height: 235px;
  padding: 22px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-glass);
  box-shadow: var(--shadow-soft);
}

.skill-matrix article > span {
  margin-bottom: 27px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 720;
}

.skill-matrix h3 {
  margin-bottom: 9px;
  font-size: 18px;
  font-weight: 710;
  letter-spacing: -0.02em;
}

.skill-matrix p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.78;
}

.skill-matrix small {
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.65;
}

/* Repository catalog */

.repo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-glass);
  box-shadow: var(--shadow-soft);
}

.repo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 670;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease,
    color 160ms ease;
}

.filter-button span {
  margin-left: 5px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
}

.filter-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.filter-button.is-active {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
}

.filter-button.is-active span {
  color: var(--active-label);
}

.repo-search {
  position: relative;
  flex: 0 0 250px;
}

.repo-search::before {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--quiet);
  content: "⌕";
  font-family: var(--mono);
  font-size: 15px;
  transform: translateY(-53%);
  pointer-events: none;
}

.repo-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 33px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--tag-surface);
  font-size: 11px;
}

.repo-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.repo-search input::placeholder {
  color: var(--placeholder);
}

.repo-count {
  margin: 12px 0 25px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.repo-groups {
  display: grid;
  gap: 52px;
}

.repo-group[hidden],
.repo-card[hidden] {
  display: none !important;
}

.repo-group-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
  align-items: center;
  gap: 28px;
  padding: 17px 20px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--dark);
  color: var(--white);
}

.repo-group-heading > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.repo-group-heading span {
  color: var(--dark-accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.repo-group-heading h3 {
  margin-bottom: 0;
  font-size: 17px;
  font-weight: 700;
}

.repo-group-heading p {
  margin-bottom: 0;
  color: var(--dark-muted);
  font-size: 11px;
  line-height: 1.65;
  text-align: right;
}

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

.repo-card {
  display: flex;
  min-width: 0;
  min-height: 248px;
  padding: 21px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 170ms ease, box-shadow 170ms ease,
    transform 170ms ease;
}

.repo-card:hover {
  border-color: var(--hover-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.repo-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 23px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.repo-card-top b {
  font-size: 13px;
  font-weight: 500;
  transition: transform 160ms ease;
}

.repo-card:hover .repo-card-top b {
  transform: translate(2px, -2px);
}

.repo-card h4 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.award-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 25px;
  padding: 3px 9px;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  border: 1px solid var(--award-line);
  border-radius: 999px;
  background: var(--award-bg);
  color: var(--award-ink);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.award-badge > span {
  font-size: 12px;
  line-height: 1;
}

.repo-card > p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.76;
}

.repo-card dl {
  display: grid;
  margin: auto 0 0;
}

.repo-card dl > div {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 11px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.repo-card dt {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.repo-card dd {
  margin: 0;
  color: var(--ink-secondary);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

/* Education */

.education-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(330px, 0.86fr);
  gap: 20px;
}

.education-list,
.recognition-list {
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-glass);
  list-style: none;
}

.education-list article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 25px;
}

.education-list article + article {
  border-top: 1px solid var(--line);
}

.education-list time {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
}

.education-list h3 {
  margin-bottom: 4px;
  font-size: 19px;
  font-weight: 710;
}

.education-list p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.education-list span {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 650;
}

.recognition-list {
  display: grid;
}

.recognition-list li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}

.recognition-list li + li {
  border-top: 1px solid var(--line);
}

.recognition-list strong {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 720;
}

.recognition-list span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* Contact and footer */

.contact-section {
  padding: 72px 0;
  background: var(--dark);
  color: var(--white);
}

.contact-section .section-index {
  color: var(--dark-accent);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: end;
  gap: 70px;
}

.contact-inner h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4.1vw, 50px);
  font-weight: 710;
  letter-spacing: -0.05em;
  line-height: 1.18;
}

.contact-copy {
  display: grid;
  gap: 10px;
}

.contact-copy p {
  margin-bottom: 10px;
  color: var(--dark-muted);
  font-size: 13px;
  line-height: 1.75;
}

.contact-copy a {
  padding: 11px 0;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-ink);
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.contact-copy a:hover {
  color: var(--dark-accent);
}

.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--section-line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-inner a {
  color: var(--accent-dark);
  font-weight: 650;
}

@media (max-width: 1040px) {
  .header-inner {
    gap: 22px;
  }

  .site-nav {
    gap: 22px;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
  }

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

  .hero-copy > h2 {
    font-size: 27px;
  }

  .case-body {
    grid-template-columns: 1fr;
  }

  .case-metrics {
    min-height: 94px;
  }

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

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

  .news-card-featured {
    grid-column: 1 / -1;
    min-height: 190px;
  }

  .education-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .proof-panel {
    width: min(100%, 620px);
  }

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

  .repo-overview {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 24px;
  }

  .site-header {
    position: static;
  }

  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 8px 18px;
    padding-top: 10px;
  }

  .brand {
    min-height: 44px;
    justify-self: start;
  }

  .header-status {
    min-height: 44px;
  }

  .header-actions {
    justify-self: end;
  }

  .site-nav {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding: 0 0 4px;
    justify-content: flex-start;
    gap: 26px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    min-height: 44px;
    padding: 7px 0 10px;
    white-space: nowrap;
  }

  .hero {
    padding: 48px 0 34px;
  }

  .hero h1 {
    font-size: clamp(41px, 11vw, 51px);
  }

  .hero-copy > h2 {
    font-size: clamp(24px, 6vw, 29px);
  }

  .proof-panel {
    width: 100%;
  }

  .selected-overview {
    padding-bottom: 68px;
  }

  .achievement-news {
    padding-bottom: 54px;
  }

  .news-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .news-heading > p {
    text-align: left;
  }

  .overview-cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 70px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    margin-bottom: 27px;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .experience-side {
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
  }

  .case-study {
    padding: 22px;
  }

  .case-heading {
    display: block;
  }

  .case-heading > a {
    display: inline-flex;
    margin-top: 14px;
  }

  .repo-toolbar {
    display: block;
  }

  .repo-filters {
    flex-wrap: nowrap;
    padding-bottom: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .repo-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    min-height: 44px;
    flex: 0 0 auto;
  }

  .repo-search {
    display: block;
    width: 100%;
    margin-top: 10px;
  }

  .repo-search input {
    height: 44px;
  }

  .repo-group-heading {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .repo-group-heading p {
    text-align: left;
  }

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

  .repo-card {
    min-height: 230px;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 33px;
    height: 33px;
  }

  .theme-switcher,
  .header-status {
    min-height: 44px;
  }

  .theme-option {
    min-height: 36px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .header-status-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .header-status > span[aria-hidden="true"] {
    margin-right: 0;
  }

  .hero-kicker {
    font-size: 10px;
  }

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

  .hero h1 span {
    display: block;
    margin-top: 4px;
    font-size: 0.62em;
    letter-spacing: -0.035em;
  }

  .hero-copy > h2 {
    margin-top: 12px;
    font-size: 23px;
  }

  .hero-summary {
    font-size: 14px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .proof-list dd {
    font-size: 20px;
  }

  .proof-body {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .proof-portrait img {
    width: 68px;
    height: 92px;
  }

  .proof-contact {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .proof-contact strong {
    text-align: left;
  }

  .compact-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .overview-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .overview-meta span {
    text-align: left;
  }

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

  .news-card-featured {
    grid-column: auto;
  }

  .news-card {
    min-height: 0;
    padding: 18px;
  }

  .news-card-featured::before {
    right: 18px;
    bottom: 59px;
  }

  .news-card-featured::after {
    right: 13px;
    bottom: 12px;
    font-size: 44px;
  }

  .news-meta {
    margin-bottom: 20px;
  }

  .repo-overview footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .section-heading h2 {
    font-size: 31px;
  }

  .experience-item,
  .case-study {
    padding: 18px;
  }

  .experience-title {
    display: block;
  }

  .experience-title > span {
    display: inline-block;
    margin-top: 8px;
  }

  .experience-title h3,
  .case-heading h3 {
    font-size: 19px;
  }

  .evidence-list li,
  .case-points li {
    padding-left: 15px;
    font-size: 12px;
  }

  .case-metrics {
    grid-template-columns: 1fr;
  }

  .case-metrics > div {
    min-height: 78px;
  }

  .case-metrics > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .skill-matrix article {
    min-height: 0;
  }

  .education-list article {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px;
  }

  .recognition-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

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

  .contact-inner h2 {
    font-size: 34px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .news-card-featured::before,
  .news-card-featured::after {
    animation: none !important;
  }
}
