:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --bg-2: #efece5;
  --card: #ffffff;
  --card-2: #fbfaf7;
  --ink: #15130f;
  --ink-2: #2b2823;
  --muted: #5f5a52;
  --dim: #8d877d;
  --line: rgba(21, 19, 15, 0.09);
  --line-strong: rgba(21, 19, 15, 0.16);
  --accent: #f4623a;
  --accent-deep: #c9431c;
  --accent-soft: #fff0ea;
  --accent-ring: rgba(244, 98, 58, 0.24);
  --shadow-sm: 0 1px 2px rgba(21, 19, 15, 0.04), 0 10px 30px -22px rgba(21, 19, 15, 0.25);
  --shadow-md: 0 2px 4px rgba(21, 19, 15, 0.05), 0 24px 48px -28px rgba(21, 19, 15, 0.3);
  --radius: 22px;
  --radius-sm: 14px;
  --mono:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    "Menlo",
    monospace;
  --sans:
    "Inter",
    "PingFang SC",
    "Hiragino Sans GB",
    "Noto Sans SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(244, 98, 58, 0.22);
  color: var(--ink);
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.backdrop {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 88% -10%, rgba(244, 98, 58, 0.16), transparent 60%),
    radial-gradient(40rem 30rem at -10% 20%, rgba(244, 98, 58, 0.07), transparent 60%),
    radial-gradient(rgba(21, 19, 15, 0.06) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.25) 100%);
}

/* ---------- Shared primitives ---------- */

.tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.85);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(244, 98, 58, 0.7);
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-light {
  background: #fff;
  color: var(--accent-deep);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 600;
}

.chip-row-accent span {
  border-color: rgba(244, 98, 58, 0.22);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 244, 239, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand-dot {
  align-self: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-sub {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  gap: 2px;
  justify-self: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.top-nav a {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.top-nav a:hover {
  color: var(--ink);
}

.top-nav a.is-active {
  background: var(--ink);
  color: #fff;
}

.site-header .btn,
.header-actions {
  justify-self: end;
}

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

main {
  position: relative;
  z-index: 1;
}

/* ---------- Hero bento ---------- */

.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 0;
}

.bento {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-areas:
    "intro intro intro intro intro intro intro photo photo photo"
    "now now now now now now now now now now"
    "s1 s1 s2 s2 s3 s3 s4 s4 s5 s5";
  gap: 14px;
}

.tile-intro {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
}

.tile-intro::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 98, 58, 0.14), transparent 70%);
  content: "";
  pointer-events: none;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(3.2rem, 6.4vw, 5.6rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.roles {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.roles li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.role-org {
  font-size: 1.06rem;
  font-weight: 800;
}

.role-title {
  color: var(--accent-deep);
  font-size: 0.98rem;
  font-weight: 700;
}

.lede {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.06rem;
}

.actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tile-photo {
  grid-area: photo;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 380px;
  padding: 24px 24px 56px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #faf6f0 100%);
}

/* 头像不再铺满整块，缩成一张带圆角的小照片 */
.tile-photo picture {
  display: block;
  width: min(100%, 210px);
}

.tile-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 18px;
  box-shadow: 0 18px 40px -22px rgba(28, 25, 20, 0.45);
}

.tile-photo figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 44px 20px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 60%);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile-now {
  grid-area: now;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 20px 26px;
}

.tile-now-chips {
  max-width: 380px;
  justify-content: flex-end;
}

.tile-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
  animation: livePulse 2.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px var(--accent-ring);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(244, 98, 58, 0.06);
  }
}

.tile-now p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tile-stat {
  display: grid;
  align-content: end;
  gap: 6px;
  min-height: 128px;
  padding: 20px 22px;
}

.tile-stat-1 { grid-area: s1; }
.tile-stat-2 { grid-area: s2; }
.tile-stat-3 { grid-area: s3; }
.tile-stat-4 { grid-area: s4; }
.tile-stat-5 { grid-area: s5; }

.tile-stat strong {
  color: var(--accent);
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.tile-stat span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

/* ---------- Sections ---------- */

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-intro {
  max-width: 700px;
  margin: 14px 0 0;
  color: var(--muted);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.35;
  font-weight: 800;
}

/* ---------- Signal strip ---------- */

.section[aria-label="核心能力"] {
  padding-top: 14px;
}

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

.signal {
  padding: 24px;
  background: var(--card-2);
}

.signal-num {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.signal h3 {
  font-size: 1.08rem;
}

.signal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Selected systems ---------- */

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

.sys-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.sys-card:hover,
.project-card:hover,
.method-card:hover,
.stack-card:hover {
  border-color: rgba(244, 98, 58, 0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.sys-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.sys-index {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.domain-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.sys-card h3 {
  font-size: 1.34rem;
  letter-spacing: -0.01em;
}

.sys-card > p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.97rem;
}

.facts {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--card-2);
  color: var(--ink-2);
  font-size: 0.9rem;
}

.facts li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
}

.facts li span {
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 2;
}

.sys-card .chip-row {
  margin-top: auto;
}

/* ---------- Portfolio ---------- */

.portfolio-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  gap: 24px;
}

.portfolio-head > div {
  max-width: 760px;
}

.count-badge {
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
}

.count-badge strong {
  color: var(--accent);
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.count-badge span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.filter:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 20px 22px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

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

.project-number,
.project-type {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.project-number {
  color: var(--accent-deep);
}

.project-type {
  color: var(--dim);
  text-align: right;
}

.project-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.55;
}

.components {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.components li {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--ink-2);
  font-size: 0.74rem;
  line-height: 1.5;
}

.project-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--dim);
  font-size: 0.76rem;
}

.project-status span:last-child {
  color: var(--accent-deep);
  font-weight: 600;
}

.project-card .project-status {
  margin-top: auto;
}

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

.project-empty {
  margin: 18px 0 0;
  color: var(--dim);
}

/* ---------- Timeline ---------- */

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding-left: 26px;
}

.timeline-item::before {
  position: absolute;
  top: 26px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  content: "";
}

.timeline-item.is-current::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-ring);
}

.timeline-item::after {
  position: absolute;
  top: 44px;
  bottom: -14px;
  left: 5px;
  width: 2px;
  background: var(--line-strong);
  content: "";
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-item time {
  padding-top: 24px;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.timeline-body {
  padding: 24px 26px;
}

.timeline-body h3 {
  margin-bottom: 8px;
  font-size: 1.16rem;
}

.timeline-body p {
  margin-bottom: 0;
  color: var(--muted);
}

.timeline-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--card-2);
}

.timeline-list li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.timeline-list li::before {
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.timeline-list li strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Method ---------- */

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.method-card {
  padding: 24px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.method-step {
  display: block;
  margin-bottom: 26px;
  color: var(--accent);
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.method-card h3 {
  font-size: 1.06rem;
}

.method-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Toolchain ---------- */

.tool-table {
  display: grid;
  padding: 6px 26px;
}

.tool-group {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.tool-group:last-child {
  border-bottom: 0;
}

.tool-group h3 {
  margin: 3px 0 0;
  font-size: 0.98rem;
}

/* ---------- Stack ---------- */

.stack-card {
  padding: 26px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.stack-card p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ff7a4f 0%, var(--accent) 45%, #d9481f 100%);
  color: #fff;
  box-shadow: 0 30px 60px -30px rgba(217, 72, 31, 0.6);
}

.contact::before {
  position: absolute;
  top: -120px;
  right: -60px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
  content: "";
  pointer-events: none;
}

.contact-copy {
  position: relative;
  max-width: 720px;
}

.contact-copy h2 {
  margin-bottom: 12px;
  color: #fff;
}

.contact-copy p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
}

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

.contact-chip {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
}

/* ---------- Footer / nav ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 40px));
  margin: 40px auto 0;
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.86rem;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  display: none;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 40px -18px rgba(21, 19, 15, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.bottom-nav a.is-active {
  background: var(--ink);
  color: #fff;
}

.not-found {
  display: grid;
  align-content: center;
  justify-items: start;
  width: min(760px, calc(100% - 40px));
  min-height: 100svh;
  margin: 0 auto;
}

.not-found h1 {
  font-size: clamp(2.8rem, 10vw, 5.2rem);
}

.not-found p:not(.eyebrow) {
  color: var(--muted);
}

.not-found .primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* ---------- Reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 620ms ease,
    transform 620ms ease;
}

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

.js .site-header[data-reveal] {
  transform: none;
}

.js .sys-card[data-reveal].is-visible,
.js .project-card[data-reveal].is-visible,
.js .method-card[data-reveal].is-visible,
.js .stack-card[data-reveal].is-visible {
  transition:
    opacity 620ms ease,
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .bottom-nav {
    display: inline-flex;
  }

  body {
    padding-bottom: 84px;
  }

  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "intro intro intro intro intro intro"
      "photo photo photo now now now"
      "s1 s1 s2 s2 s3 s3"
      "s4 s4 s4 s5 s5 s5";
  }

  .tile-photo {
    min-height: 300px;
  }

  .tile-now {
    grid-template-columns: 1fr;
    align-items: start;
    align-content: start;
    gap: 14px;
    padding: 24px;
  }

  .tile-now-chips {
    max-width: none;
    justify-content: flex-start;
  }

  .systems-grid,
  .stack-grid,
  .signal-grid {
    grid-template-columns: 1fr;
  }

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

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

  .timeline-item time {
    padding-top: 0;
  }

  .timeline-item::before {
    top: 4px;
  }

  .timeline-item::after {
    top: 22px;
  }

  .tool-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

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

  .site-header {
    padding: 12px 16px;
  }

  .brand-sub {
    display: none;
  }

  .hero,
  .section,
  .site-footer {
    width: calc(100% - 28px);
  }

  .hero {
    padding-top: 20px;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "intro intro"
      "photo photo"
      "now now"
      "s1 s2"
      "s3 s4"
      "s5 s5";
    gap: 12px;
  }

  .tile-intro {
    padding: 26px 22px;
  }

  h1 {
    font-size: 3rem;
  }

  .role-org {
    font-size: 1rem;
  }

  .role-title {
    font-size: 0.92rem;
  }

  .lede {
    font-size: 1rem;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .tile-photo {
    min-height: 0;
    padding: 20px 20px 52px;
  }

  .tile-photo picture {
    width: min(100%, 170px);
  }

  .tile-now {
    padding: 20px;
  }

  .tile-stat {
    min-height: 108px;
    padding: 18px;
  }

  .tile-stat strong {
    font-size: 1.8rem;
  }

  .section {
    padding-top: 64px;
  }

  .section-head {
    margin-bottom: 22px;
  }

  .portfolio-head {
    flex-direction: column;
    align-items: start;
  }

  .count-badge {
    justify-items: start;
  }

  .filters {
    flex-wrap: nowrap;
    margin-right: -14px;
    padding-right: 14px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .filter {
    flex: 0 0 auto;
  }

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

  .sys-card,
  .timeline-body,
  .stack-card {
    padding: 22px;
  }

  .sys-card h3 {
    font-size: 1.18rem;
  }

  .sys-top {
    align-items: start;
  }

  .domain-chip {
    white-space: normal;
    text-align: right;
  }

  .tool-table {
    padding: 4px 20px;
  }

  .contact-actions .btn,
  .contact-chip {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    display: grid;
    gap: 6px;
    padding-bottom: 32px;
  }
}

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

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

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