:root {
  --ink: #0b2a4a;
  --ink-soft: #163a63;
  --paper: #f4f8fc;
  --sheet: #ffffff;
  --line: rgba(11, 42, 74, 0.12);
  --line-strong: rgba(11, 42, 74, 0.22);
  --muted: #5a6d82;
  --steel: #1a6fbf;
  --steel-bright: #4eb0e8;
  --accent: #e8a317;
  --brass: #e8a317;
  --good: #1f7a56;
  --danger: #8a3b32;
  --shadow: 0 18px 40px rgba(11, 42, 74, 0.08);
  --radius: 18px;
  --max: 1180px;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(26, 111, 191, 0.14) 1px, transparent 0) 0 0 / 22px 22px,
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 0.9rem;
  z-index: 20;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 68px;
  min-width: 0;
}

.mark {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.mark-id {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
}

.mark-name {
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1.25rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.hero {
  background: var(--ink);
  color: #e8eef4;
  margin: 1rem auto 0;
  width: min(calc(100% - 2rem), var(--max));
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(142, 196, 224, 0.18);
  border-radius: 14px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 0.86fr) minmax(19rem, 1.28fr);
  min-height: min(36rem, 78vh);
  align-items: stretch;
}

.hero-copy {
  padding: clamp(2rem, 5vw, 3.6rem);
  padding-right: clamp(1.1rem, 2.2vw, 1.8rem);
  min-width: 0;
}

.hero-gallery-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 1.15rem 1.15rem 1.15rem 0.55rem;
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-bright);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 8vw, 6.4rem);
  line-height: 0.92;
  font-weight: 400;
  margin: 0;
  color: var(--steel-bright);
  overflow-wrap: anywhere;
}

.hero h1 span {
  display: block;
  color: #f4f7fa;
}

.lede {
  margin: 1.4rem 0 0;
  max-width: 34rem;
  font-size: 1.12rem;
  color: rgba(232, 238, 244, 0.84);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}

.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(142, 196, 224, 0.35);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: var(--steel-bright);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.btn-primary {
  background: var(--steel-bright);
  color: var(--ink);
}

.btn-ghost {
  border: 1px solid rgba(232, 238, 244, 0.28);
  color: #f4f7fa;
}

.btn-secondary {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--sheet);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.hero-gallery {
  --gallery-gap: 0.45rem;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  grid-template-areas:
    "rack echo"
    "horn fea";
  grid-template-rows: 1fr 1fr;
  gap: var(--gallery-gap);
  align-content: stretch;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  scrollbar-width: none;
}

.hero-gallery .photo-mat-rack {
  grid-area: rack;
}

.hero-gallery .photo-mat-horn {
  grid-area: horn;
}

.hero-gallery .photo-mat-echo {
  grid-area: echo;
}

.hero-gallery .photo-mat-fea {
  grid-area: fea;
}

.hero-gallery::-webkit-scrollbar {
  display: none;
}

.thumb {
  background: var(--photo-mat, var(--sheet));
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
  min-height: auto;
  height: auto;
  flex-shrink: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  text-decoration: none;
  color: inherit;
}

.thumb img {
  width: 100%;
  height: auto;
  min-height: 0;
  display: block;
  object-fit: contain;
  background: var(--photo-grade, var(--photo-mat, #e8e8e8));
}

.hero-gallery .thumb {
  height: 100%;
  min-height: 0;
  display: block;
}

.hero-gallery .thumb img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

.hero-gallery .photo-mat-rack img {
  object-position: center 38%;
}

.hero-gallery .photo-mat-fea img {
  object-position: 26% 36%;
}

.thumb span {
  font-family: var(--mono);
  font-size: clamp(0.68rem, 0.9vw, 0.78rem);
  padding: 0.45rem 0.7rem 0.55rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--photo-mat, transparent);
}

.hero-gallery .photo-mat-rack span,
.hero-gallery .photo-mat-horn span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.25;
  padding: 1.1rem 0.65rem 0.5rem;
  background: linear-gradient(180deg, transparent, var(--photo-mat, #e8e8e8) 70%);
}

.hero-gallery .photo-mat-echo span,
.hero-gallery .photo-mat-fea span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.45rem 0.7rem 0.5rem;
  background: linear-gradient(180deg, transparent, var(--photo-mat, #e8e8e8) 70%);
}

.photo-mat-rack {
  --photo-aspect: 885 / 1105;
  --photo-grade: radial-gradient(130% 90% at 38% 30%, #fcfcfc 0%, transparent 58%),
    linear-gradient(
      180deg,
      #ececec 0%,
      #f3f3f3 12%,
      #f8f8f8 25%,
      #fcfcfc 38%,
      #f7f7f7 62%,
      #f2f2f2 75%,
      #ededed 88%,
      #e7e7e7 100%
    );
  --photo-mat: #e7e7e7;
}

.photo-mat-horn {
  --photo-aspect: 958 / 1169;
  --photo-grade: linear-gradient(
    180deg,
    #f4f5f9 0%,
    #f9fafc 12%,
    #eeeff4 25%,
    #e2e5ec 38%,
    #e8eaf0 50%,
    #f6f7f9 62%,
    #fefefe 75%,
    #fcfcfc 100%
  );
  --photo-mat: #f6f7f9;
}

.photo-mat-mug {
  --photo-aspect: 1028 / 780;
  --photo-grade: linear-gradient(
    180deg,
    #dfdfdf 0%,
    #e6e6e6 20%,
    #ececec 45%,
    #f2f2f2 70%,
    #eaeaea 100%
  );
  --photo-mat: #eaeaea;
}

.photo-mat-echo {
  --photo-aspect: 1028 / 780;
  --photo-grade: linear-gradient(
    180deg,
    #cfcfcf 0%,
    #d5d5d5 20%,
    #d9d9d9 45%,
    #d5d5d5 70%,
    #d0d0d0 100%
  );
  --photo-mat: #d5d5d5;
}

.photo-mat-fea {
  --photo-aspect: 1067 / 741;
  --photo-grade: linear-gradient(
    180deg,
    #e0e0e0 0%,
    #e8e8e8 22%,
    #eeeeee 48%,
    #e8e8e8 78%,
    #e5e5e5 100%
  );
  --photo-mat: #e5e5e5;
}

.gallery-dots {
  display: none;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 0 1rem;
  background: linear-gradient(180deg, #123a5c, #0b2a4a);
}

.gallery-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(232, 238, 244, 0.28);
  cursor: pointer;
}

.gallery-dots button[aria-current],
.gallery-dots button[aria-current="true"] {
  background: var(--steel-bright);
  width: 18px;
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.8rem;
  min-width: 0;
}

.section-head h2,
.page-title h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  margin: 0;
  font-weight: 400;
}

.section-head p,
.page-title p {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
}

.profile-grid,
.skills-grid,
.work-grid,
.workflow-grid,
.stats,
.figure-grid,
.compare,
.setup-grid,
.split,
.metrics {
  display: grid;
  gap: 1rem;
}

.split,
.profile-grid,
.figure-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.work-grid {
  grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
  grid-template-areas:
    "rack echo"
    "horn fea";
  gap: 0.85rem;
  align-items: stretch;
}

.work-grid .photo-mat-rack {
  grid-area: rack;
}

.work-grid .photo-mat-horn {
  grid-area: horn;
}

.work-grid .photo-mat-echo {
  grid-area: echo;
}

.work-grid .photo-mat-fea {
  grid-area: fea;
}

.figure-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.skills-grid,
.workflow-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow-wrap: break-word;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
  margin-top: 1rem;
}

.stat {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  min-width: 0;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.4vw, 1.85rem);
  line-height: 1.05;
  color: var(--steel);
  overflow-wrap: anywhere;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
}

.work-card {
  text-decoration: none;
  overflow: hidden;
  padding: 0;
  display: grid;
  grid-template-rows: auto auto;
  height: auto;
}

.work-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  background: var(--photo-grade, var(--photo-mat, #e8e8e8));
}

.work-card.photo-mat-rack img,
.work-card.photo-mat-horn img {
  aspect-ratio: 4 / 5;
}

.work-card.photo-mat-echo img,
.work-card.photo-mat-fea img {
  aspect-ratio: 3 / 2;
}

.work-card.photo-mat-fea img {
  object-position: 62% 42%;
}

.work-card .body {
  padding: 1.15rem 1.25rem 1.3rem;
}

.num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--steel);
  letter-spacing: 0.12em;
}

.work-card h3 {
  margin: 0.25rem 0 0.4rem;
  font-size: 1.25rem;
  text-wrap: balance;
}

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

.skills-grid h3,
.workflow-grid h3,
.card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.skills-grid ul,
.card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
}

.skills-grid li + li,
.card li + li {
  margin-top: 0.28rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.contact-panel a {
  color: var(--steel);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.host-mark {
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer-quiet {
  color: inherit;
  text-decoration: none;
}

.footer-quiet:hover {
  color: var(--steel);
  text-decoration: underline;
}

.page-title {
  padding: 2.4rem 0 0.4rem;
}

.page-title .num {
  display: block;
  margin-bottom: 0.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
}

.hero-figure {
  margin: 1.4rem auto 0;
  width: min(calc(100% - 2rem), var(--max));
  background: var(--photo-mat, var(--sheet));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  max-height: 620px;
  aspect-ratio: var(--photo-aspect, auto);
  object-fit: contain;
  background: var(--photo-grade, var(--photo-mat, #e8e8e8));
}

.hero-figure figcaption,
.figure figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.85rem 1rem 1rem;
  overflow-wrap: anywhere;
}

.figure {
  margin: 0;
  background: var(--photo-mat, var(--sheet));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--photo-grade, var(--photo-mat, #e8e8e8));
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.8rem;
}

.metrics.three,
.metrics.five {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
}

.takeaway {
  background: var(--ink);
  color: #e8eef4;
  border: 0;
}

.takeaway h2,
.takeaway h3 {
  color: var(--steel-bright);
}

.pager {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 3rem;
}

.pager a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  min-width: 0;
  flex: 1 1 14rem;
}

.pager small {
  display: block;
  font-family: var(--mono);
  color: var(--steel);
  margin-bottom: 0.2rem;
}

.result {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--steel);
  line-height: 0.95;
  margin: 0.2rem 0;
  overflow-wrap: anywhere;
}

.takeaway a {
  color: var(--steel-bright);
}

.takeaway .good,
.good {
  color: #8fd0b0;
}

.skill-board,
.process {
  display: grid;
  gap: 1rem;
}

.skill-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.25rem;
}

.skill-board div {
  min-width: 0;
  padding: 1.05rem 1.15rem;
}

.skill-board div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.skill-board div:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.skill-board h3 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--steel);
}

.skill-board p {
  margin: 0;
  color: var(--muted);
}

.process {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.process li {
  min-width: 0;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}

.process li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--steel);
  margin-bottom: 0.45rem;
}

.process strong {
  display: block;
  margin-bottom: 0.35rem;
}

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

.resume-sheet {
  margin-top: 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.resume-page-wrap {
  position: relative;
}

.resume-page {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  vertical-align: top;
}

.resume-page + .resume-page,
.resume-page-wrap + .resume-page-wrap {
  border-top: 1px solid var(--line);
}

.resume-link-layer {
  position: absolute;
  inset: 0;
}

.resume-hotspot {
  position: absolute;
  z-index: 1;
  border-radius: 2px;
  cursor: pointer;
}

.resume-hotspot:hover,
.resume-hotspot:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 1px;
  background: rgba(61, 126, 166, 0.08);
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.page-title h1 {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

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

@media (max-width: 980px) {
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .skill-board,
  .process {
    grid-template-columns: 1fr;
  }

  .skill-board div,
  .skill-board div:nth-child(odd),
  .skill-board div:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .skill-board div:last-child {
    border-bottom: 0;
  }

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

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero::after {
    display: none;
  }

  .hero-gallery-wrap {
    min-height: 0;
    height: auto;
    padding: clamp(1rem, 2.4vw, 1.6rem);
    padding-bottom: 0;
    overflow: hidden;
    overflow-anchor: none;
    background: linear-gradient(180deg, #123a5c, #0b2a4a);
  }

  .hero-gallery {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    height: auto;
    padding: 0;
    border-radius: 14px;
    grid-template-columns: none;
    grid-template-rows: none;
    grid-template-areas: none;
    align-items: stretch;
    flex: 0 0 auto;
  }

  .hero-gallery .photo-mat-rack,
  .hero-gallery .photo-mat-horn,
  .hero-gallery .photo-mat-echo,
  .hero-gallery .photo-mat-fea {
    grid-area: auto;
  }

  .hero-gallery .thumb {
    box-sizing: border-box;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    border-radius: 14px;
  }

  .hero-gallery .thumb img {
    width: 100%;
    height: auto;
    max-height: 100%;
    flex: 0 0 auto;
    aspect-ratio: var(--photo-aspect, auto);
    object-fit: cover;
    object-position: center;
    background: var(--photo-grade, var(--photo-mat, #e8e8e8));
  }

  .hero-gallery .photo-mat-fea img {
    object-position: 26% 36%;
  }

  .work-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .work-grid .photo-mat-rack,
  .work-grid .photo-mat-horn,
  .work-grid .photo-mat-echo,
  .work-grid .photo-mat-fea {
    grid-area: auto;
  }

  .gallery-dots {
    display: flex;
    background: transparent;
    padding: 0.85rem 0 1rem;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 68px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem;
    min-width: min(12rem, calc(100vw - 2rem));
    z-index: 12;
  }

  .nav.open {
    display: flex;
  }

  .contact-panel,
  .skills-grid,
  .workflow-grid,
  .work-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .pager {
    flex-direction: column;
  }

  .pager a {
    flex-basis: auto;
  }

  .hero {
    width: min(calc(100% - 1rem), var(--max));
    margin-top: 0.65rem;
    border-radius: 16px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.35rem;
  }
}

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

  .hero-gallery {
    scroll-snap-type: none;
  }

  .echo-objective,
  .echo-roadmap li,
  .echo-hotspot-title,
  .echo-info-card {
    transition: none;
  }
}

/* —— Project ECHO case study —— */
.echo-feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

.echo-feature-card img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
}

.echo-feature-card .body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 720px) {
  .echo-feature-card {
    grid-template-columns: 1fr;
  }
}

.echo-subtitle {
  margin: 0.15rem 0 0.85rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.15;
  color: var(--ink-soft);
  font-weight: 400;
}

.echo-role {
  margin: 0.85rem 0 0;
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: var(--steel);
  max-width: 46rem;
}

.echo-lede {
  margin: -0.4rem 0 1.4rem;
  max-width: 46rem;
  color: var(--muted);
}

.echo-objectives {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.echo-objective h2 {
  margin: 0.35rem 0 0.55rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 400;
  line-height: 1.1;
}

.echo-objective p {
  margin: 0;
  color: var(--muted);
}

.echo-objective:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.echo-flow {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.echo-flow li {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
}

.echo-flow li:not(:last-child)::after {
  content: "→";
  margin-left: 0.55rem;
  color: var(--steel);
}

.echo-req-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.echo-req-wide {
  grid-column: 1 / -1;
}

.echo-arch {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.echo-arch-svg {
  display: block;
  width: 100%;
  height: auto;
}

.echo-arch-frame {
  fill: #f8fbfe;
  stroke: rgba(11, 42, 74, 0.12);
  stroke-width: 1.5;
}

.echo-arch-title {
  text-anchor: middle;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  fill: var(--steel);
}

.echo-arch-node rect {
  fill: #ffffff;
  stroke: rgba(11, 42, 74, 0.18);
  stroke-width: 1.5;
}

.echo-arch-node text {
  text-anchor: middle;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  fill: var(--ink);
}

.echo-arch-node .echo-arch-sub {
  font-size: 11px;
  font-weight: 400;
  fill: var(--muted);
}

.echo-arch-focus rect {
  fill: rgba(26, 111, 191, 0.08);
  stroke: rgba(26, 111, 191, 0.35);
}

.echo-arch-list {
  display: none;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.echo-arch-list li {
  font-family: var(--mono);
  font-size: 0.72rem;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--ink-soft);
}

.echo-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.echo-vars span {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
}

.echo-slot-note {
  margin-top: 1rem;
}

.echo-slot-note p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.echo-hero-viewer {
  padding-top: 0.6rem;
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.echo-hero-viewer-lede {
  margin: 0 0 0.85rem;
  max-width: 46rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.echo-model-hero {
  height: min(78vh, 40rem);
}

@media (max-width: 720px) {
  .echo-model-hero {
    height: min(62vh, 28rem);
  }
}

.echo-gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1.1rem;
}

.echo-gallery .figure {
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.echo-gallery .figure img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: transparent;
  display: block;
}

.echo-gallery .figure figcaption {
  padding: 0.55rem 0 0;
}

.echo-viewer-intro {
  margin-bottom: 1rem;
}

.echo-viewer-shell {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.echo-viewer-toolbar {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: #f8fbfe;
}

.echo-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.echo-chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: var(--sheet);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
}

.echo-chip[aria-pressed="true"] {
  border-color: rgba(26, 111, 191, 0.45);
  background: rgba(26, 111, 191, 0.1);
  color: var(--steel);
}

.echo-viewer-stage {
  position: relative;
}

.echo-model {
  display: block;
  width: 100%;
  height: min(70vh, 34rem);
  background:
    radial-gradient(circle at 1px 1px, rgba(26, 111, 191, 0.12) 1px, transparent 0) 0 0 / 18px 18px,
    #f4f8fc;
  --poster-color: transparent;
}

.echo-viewer-fallback {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.echo-viewer-fallback img {
  width: min(100%, 28rem);
  height: auto;
  border-radius: 12px;
}

.echo-viewer-note,
.echo-more-note {
  margin: 0;
  padding: 0.75rem 1.1rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.echo-more-note {
  background: #f8fbfe;
  padding-bottom: 0.75rem;
}

.echo-hotspot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  transform: translate(-50%, -50%);
}

.echo-hotspot-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--steel-bright);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(11, 42, 74, 0.25);
  flex: 0 0 auto;
}

.echo-hotspot-title {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  white-space: nowrap;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow);
}

.echo-hotspot.is-selected .echo-hotspot-title,
.echo-hotspot:focus-visible .echo-hotspot-title {
  border-color: rgba(26, 111, 191, 0.5);
  color: var(--steel);
}

.echo-hotspot.accent-blue .echo-hotspot-dot { background: #1a6fbf; }
.echo-hotspot.accent-orange .echo-hotspot-dot { background: #d97706; }
.echo-hotspot.accent-yellow .echo-hotspot-dot { background: #ca8a04; }
.echo-hotspot.accent-green .echo-hotspot-dot { background: #1f7a56; }
.echo-hotspot.accent-purple .echo-hotspot-dot { background: #6d28d9; }
.echo-hotspot.accent-cyan .echo-hotspot-dot { background: #0e7490; }

.echo-info-card {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  width: min(22rem, calc(100% - 1.7rem));
  max-height: min(70%, 28rem);
  overflow: auto;
  background: rgba(11, 42, 74, 0.94);
  color: #e8eef4;
  border-radius: 14px;
  padding: 0.95rem 1rem 1rem;
  box-shadow: var(--shadow);
  z-index: 2;
}

.echo-info-card h3 {
  margin: 0.15rem 0 0.55rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  color: #fff;
}

.echo-info-card p {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.echo-info-summary {
  color: rgba(232, 238, 244, 0.92);
}

.echo-info-description {
  margin-top: 0.75rem !important;
}

.echo-component-list {
  display: grid;
  gap: 0.4rem;
  margin: 0.55rem 0 0.35rem;
}

.echo-component {
  border: 1px solid rgba(232, 238, 244, 0.18);
  border-radius: 10px;
  padding: 0.35rem 0.55rem 0.45rem;
  background: rgba(255, 255, 255, 0.04);
}

.echo-component summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  gap: 0.15rem;
}

.echo-component summary::-webkit-details-marker {
  display: none;
}

.echo-component-type {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-bright);
}

.echo-component-product {
  font-size: 0.9rem;
  color: #fff;
}

.echo-component-meta {
  font-size: 0.78rem;
  color: rgba(232, 238, 244, 0.7);
}

.echo-component p {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  color: rgba(232, 238, 244, 0.88);
}

.echo-spec-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: rgba(232, 238, 244, 0.75);
}

.echo-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  background: transparent;
  padding: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.echo-highlight-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--steel-bright);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(11, 42, 74, 0.2);
}

.echo-highlight-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  white-space: nowrap;
}

.echo-highlight.accent-orange .echo-highlight-dot { background: #d97706; }
.echo-highlight.accent-green .echo-highlight-dot { background: #1f7a56; }
.echo-highlight.accent-purple .echo-highlight-dot { background: #6d28d9; }
.echo-highlight.accent-cyan .echo-highlight-dot { background: #0e7490; }
.echo-highlight.accent-blue .echo-highlight-dot { background: #1a6fbf; }
.echo-highlight.accent-yellow .echo-highlight-dot { background: #ca8a04; }

.echo-info-kicker,
.echo-info-status span,
.echo-info-component span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-bright);
}

.echo-info-status,
.echo-info-component {
  margin-bottom: 0.35rem;
}

.echo-info-note {
  color: rgba(232, 238, 244, 0.78);
  font-size: 0.84rem !important;
}

.echo-info-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  border: 0;
  background: transparent;
  color: #e8eef4;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.echo-drawer {
  display: none;
  border-top: 1px solid var(--line);
  background: #f8fbfe;
}

.echo-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem 0.35rem;
}

.echo-drawer-list {
  display: grid;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem 0.85rem;
}

.echo-drawer-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}

.echo-drawer-item strong {
  display: block;
  font-size: 0.92rem;
}

.echo-drawer-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.echo-drawer-item.is-selected {
  border-color: rgba(26, 111, 191, 0.45);
}

.echo-drawer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--steel);
}

.echo-drawer-item.accent-orange .echo-drawer-dot { background: #d97706; }
.echo-drawer-item.accent-yellow .echo-drawer-dot { background: #ca8a04; }
.echo-drawer-item.accent-green .echo-drawer-dot { background: #1f7a56; }
.echo-drawer-item.accent-purple .echo-drawer-dot { background: #6d28d9; }
.echo-drawer-item.accent-cyan .echo-drawer-dot { background: #0e7490; }
.echo-drawer-item.accent-blue .echo-drawer-dot { background: #1a6fbf; }

.echo-drawer-detail {
  margin: 0 0.85rem 0.95rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(11, 42, 74, 0.94);
  color: #e8eef4;
}

.echo-drawer-detail h3 {
  margin: 0.2rem 0 0.5rem;
  font-family: var(--serif);
  font-weight: 400;
}

@media (max-width: 720px) {
  .echo-model {
    height: min(58vh, 24rem);
  }

  .echo-info-card {
    display: none;
  }

  .echo-hotspot-title {
    display: none;
  }

  .echo-drawer {
    display: block;
  }

  .echo-more-note {
    display: none;
  }
}

.echo-status {
  margin-bottom: 1rem;
}

.echo-status h3 {
  margin-top: 0.55rem;
}

.echo-analysis-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.85rem;
}

.echo-analysis-slots h3 {
  margin: 0.35rem 0 0.4rem;
}

.echo-analysis-slots p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.echo-disciplines {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.echo-discipline-bridge {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--steel);
}

.echo-roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.echo-roadmap li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1.05rem;
  box-shadow: var(--shadow);
}

.echo-roadmap li[data-state="done"] {
  border-color: rgba(31, 122, 86, 0.35);
}

.echo-roadmap li[data-state="active"] {
  border-color: rgba(26, 111, 191, 0.45);
  box-shadow: 0 0 0 1px rgba(26, 111, 191, 0.12), var(--shadow);
}

.echo-roadmap li[data-state="next"] {
  opacity: 0.78;
}

.echo-roadmap strong {
  display: block;
  margin-bottom: 0.2rem;
}

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

.echo-roadmap .num {
  margin-top: 0.15rem;
}

.pager {
  gap: 0.75rem;
}

@media (max-width: 980px) {
  .echo-objectives,
  .echo-req-grid,
  .echo-disciplines {
    grid-template-columns: 1fr;
  }

  .echo-discipline-bridge {
    transform: rotate(90deg);
    padding: 0.1rem 0;
  }

  .echo-arch-svg {
    display: none;
  }

  .echo-arch-list {
    display: flex;
  }

  .echo-arch {
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 720px) {
  .echo-flow li:not(:last-child)::after {
    content: "";
    margin: 0;
  }
}

.blank-sheet {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.blank-mark {
  font-family: var(--mono);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.8rem;
}

/* —— Traffic dashboard —— */
.traffic-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.traffic-status {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.traffic-status[data-state="warn"] {
  color: var(--ink-soft);
}

.traffic-status[data-state="error"] {
  color: #8b2942;
}

.traffic-status[data-state="ok"] {
  color: var(--steel);
}

.traffic-status code {
  font-family: var(--mono);
  font-size: 0.8em;
}

.traffic-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}

.traffic-stat strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

.traffic-panel {
  margin-bottom: 1rem;
}

.traffic-panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
}

.traffic-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0.6rem, 1fr));
  gap: 0.28rem;
  align-items: end;
  min-height: 11rem;
  padding-top: 0.4rem;
}

.traffic-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.35rem;
  min-width: 0;
  height: 11rem;
}

.traffic-bar-stack {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-items: stretch;
  gap: 2px;
  height: 100%;
}

.traffic-bar-views,
.traffic-bar-actions {
  display: block;
  width: 100%;
  min-height: 0;
  border-radius: 4px 4px 0 0;
}

.traffic-bar-views {
  background: var(--steel-bright, #4f8fbf);
}

.traffic-bar-actions {
  background: var(--ink);
  opacity: 0.72;
}

.traffic-bar small {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.traffic-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.traffic-row + .traffic-row {
  margin-top: 0.7rem;
}

.traffic-row-label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
  margin-bottom: 0.28rem;
}

.traffic-row-label span {
  overflow-wrap: anywhere;
}

.traffic-row-label strong {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--steel);
}

.traffic-row-track {
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(11, 42, 74, 0.08);
  overflow: hidden;
}

.traffic-row-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--steel), var(--ink));
}

.traffic-empty {
  margin: 0;
  color: var(--muted);
}

.traffic-note ul {
  margin: 0.4rem 0 0.9rem;
  padding-left: 1.1rem;
}

.traffic-note li + li {
  margin-top: 0.28rem;
}

@media (max-width: 860px) {
  .traffic-totals,
  .traffic-split {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .traffic-totals,
  .traffic-split {
    grid-template-columns: 1fr;
  }

  .traffic-bar small {
    display: none;
  }
}
