:root {
  --deep-teal: #12373F;
  --coral: #EB826C;
  --white: #FFFFFF;
  --technical-black: #050606;
  --ink: #142226;
  --muted: #607174;
  --line: #DCE5E4;
  --surface: #F5F7F6;
  --surface-strong: #E9EFEE;
  --max: 1180px;
  --font-body: "Inter", Arial, sans-serif;
  --font-digital: "Orbitron", Arial, sans-serif;
  --font-display: "Stallman Heavy 125", "Orbitron", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  background: var(--technical-black);
  color: var(--white);
  padding: 10px 14px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 55, 63, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  flex: 0 0 auto;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 122px;
  height: 44px;
  display: block;
  overflow: hidden;
  border: 0;
  clip-path: none;
  text-indent: -9999px;
  white-space: nowrap;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: center / contain no-repeat;
  transition: opacity 0.3s ease;
}

.brand-mark::before {
  background-image: url("/images/logo.svg");
}

.brand-mark::after {
  background-image: url("/images/logo_white_inverted.svg");
  opacity: 0;
}

.brand:hover .brand-mark::before,
.brand:focus-visible .brand-mark::before {
  opacity: 0;
}

.brand:hover .brand-mark::after,
.brand:focus-visible .brand-mark::after {
  opacity: 1;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 5px;
}

.nav-links a[aria-current="page"] {
  color: var(--coral);
}

.nav-links .nav-cta[aria-current="page"] {
  color: var(--white);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--coral);
  background: var(--coral);
  color: var(--white);
  font-weight: 700;
  min-height: 44px;
  padding: 9px 16px;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

/* Light-section buttons keep their fill on hover and only shift the
   letters to brand blue. */
.button:hover,
.button:focus-visible {
  color: var(--deep-teal);
}

.button.secondary {
  background: transparent;
  color: var(--white);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  color: var(--deep-teal);
}

.contact .button.secondary {
  color: var(--coral);
  background: rgba(255, 255, 255, 0.64);
}

.contact .button.secondary:hover,
.contact .button.secondary:focus-visible {
  color: var(--deep-teal);
}

/* Buttons over the dark header and hero stay on the filled/outline morph
   so their letters keep a light-on-dark contrast; brand-blue text would
   be illegible there. */
.nav-cta:hover,
.nav-cta:focus-visible {
  background: transparent;
  color: var(--coral);
}

.hero .button:hover,
.hero .button:focus-visible {
  background: transparent;
  color: var(--coral);
}

.hero .button.secondary:hover,
.hero .button.secondary:focus-visible {
  background: var(--coral);
  color: var(--white);
}

.mobile-toggle {
  display: none;
}

.menu-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
}

.menu-icon span {
  position: absolute;
  left: 0;
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 220ms ease,
    opacity 160ms ease,
    top 220ms ease;
}

.menu-icon span:nth-child(1) {
  top: 0;
}

.menu-icon span:nth-child(2) {
  top: 8px;
}

.menu-icon span:nth-child(3) {
  top: 16px;
}

.mobile-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}

.mobile-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(5, 6, 6, 0.94), rgba(18, 55, 63, 0.88) 48%, rgba(18, 55, 63, 0.42)),
    linear-gradient(135deg, rgba(235, 130, 108, 0.18), rgba(18, 55, 63, 0.2)),
    url("images/hero-lab-unsplash.jpg") center / cover;
  min-height: 82svh;
  display: flex;
  align-items: center;
  border-bottom: 8px solid var(--coral);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 6, 6, 0.28), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 9px);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-inner,
.section-inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 72px 22px;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--coral);
  font-family: var(--font-digital);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 7vw, 6.5rem);
  font-weight: 900;
}

h2 {
  margin: 0;
  font-family: var(--font-digital);
  font-size: clamp(2rem, 4vw, 3.6rem);
  color: var(--deep-teal);
}

h3 {
  margin: 0 0 10px;
  font-family: var(--font-digital);
  font-size: 1.05rem;
  color: var(--deep-teal);
}

.hero-copy {
  max-width: 700px;
  margin: 22px 0 0;
  font-size: 1.17rem;
  color: rgba(255, 255, 255, 0.88);
}

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

.section-kicker {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.deliverables {
  background: var(--surface);
}

.deliverables-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.deliverables-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.deliverable {
  position: relative;
  overflow: hidden;
  min-height: 235px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: border-color 0.3s ease;
}

.deliverable:hover {
  border-color: rgba(235, 130, 108, 0.6);
}

.deliverable-icon {
  position: absolute;
  right: -12px;
  bottom: -16px;
  width: 158px;
  height: 152px;
  background: rgba(18, 55, 63, 0.11);
  -webkit-mask: var(--deliverable-icon) center / contain no-repeat;
  mask: var(--deliverable-icon) center / contain no-repeat;
  transition: background-color 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.deliverable:hover .deliverable-icon {
  background: rgba(235, 130, 108, 0.55);
  transform: translateY(-6px) scale(1.04);
}

.deliverable:nth-child(1) {
  --deliverable-icon: url("images/icons/fdm.svg");
}

.deliverable:nth-child(2) {
  --deliverable-icon: url("images/icons/cad.svg");
}

.deliverable:nth-child(3) {
  --deliverable-icon: url("images/icons/pcb.svg");
}

.deliverable:nth-child(4) {
  --deliverable-icon: url("images/icons/sla.svg");
}

.deliverable h3,
.deliverable p {
  position: relative;
  z-index: 1;
}

.deliverable p,
.project-card p,
.lab-note p {
  margin: 0;
  color: var(--muted);
}

.flagship,
.markets {
  background: var(--deep-teal);
  color: var(--white);
}

.markets {
  background: var(--technical-black);
}

.flagship h2,
.flagship h3,
.markets h2 {
  color: var(--white);
}

.flagship-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 42px;
}

.flagship-media {
  min-height: 420px;
  background: url("images/portfolio/socket1.jpg") center / cover;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.fact {
  border-left: 3px solid var(--coral);
  padding: 12px 0 12px 14px;
  color: rgba(255, 255, 255, 0.84);
}

.fact strong {
  display: block;
  color: var(--white);
  font-size: 1.35rem;
}

.workbench-page {
  background: var(--white);
}

.workbench-page h1 {
  max-width: 960px;
  font-size: clamp(3rem, 4.8vw, 4.9rem);
}

.workbench-page-hero .section-inner {
  padding-top: 84px;
}

.about-page {
  background: var(--white);
}

.about-page h1 {
  max-width: 960px;
  font-size: clamp(3rem, 4.8vw, 4.9rem);
}

.about-hero .section-inner {
  padding-top: 84px;
}

.about-hero .section-kicker {
  max-width: 780px;
}

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

.market-panel p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.workbench-board {
  margin-top: 42px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(245, 247, 246, 0.98), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top right, rgba(235, 130, 108, 0.13), transparent 34%);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}

.workbench-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.workbench-board-head h2 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

.workbench-board-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.workbench-breadcrumb {
  color: var(--coral) !important;
  font-family: var(--font-digital);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.board-reset {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--deep-teal);
  background: var(--white);
  color: var(--deep-teal);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.board-reset:hover,
.board-reset:focus {
  background: var(--deep-teal);
  color: var(--white);
}

.workbench-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 88px;
  grid-auto-flow: dense;
  gap: 16px;
}

.mosaic-tile {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--deep-teal);
  color: var(--white);
  text-align: left;
  font: inherit;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  box-shadow: 0 1px 0 rgba(18, 55, 63, 0.12);
  transition:
    box-shadow 220ms ease,
    filter 220ms ease;
}

.mosaic-tile:hover,
.mosaic-tile:focus {
  box-shadow: 0 18px 36px rgba(18, 55, 63, 0.18);
  filter: saturate(1.08);
  outline: 3px solid rgba(235, 130, 108, 0.35);
  outline-offset: 4px;
}

.mosaic-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition:
    transform 560ms ease,
    opacity 320ms ease,
    filter 320ms ease;
}

.workbench-mosaic[data-mode="categories"] .category-card .mosaic-image,
.workbench-mosaic[data-mode="category"] .category-card-feature .mosaic-image {
  opacity: 0.56;
  filter: grayscale(1) saturate(0.08) contrast(1.62) brightness(0.64) blur(0.35px);
}

.workbench-mosaic[data-mode="categories"] .category-card::before,
.workbench-mosaic[data-mode="category"] .category-card-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(18, 55, 63, 0.9), rgba(18, 55, 63, 0.7) 48%, rgba(235, 130, 108, 0.52)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 9px);
  mix-blend-mode: normal;
  transition: opacity 320ms ease;
}

.workbench-mosaic[data-mode="categories"] .category-card::after,
.workbench-mosaic[data-mode="category"] .category-card-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(235, 130, 108, 0.22), transparent 28%),
    linear-gradient(180deg, transparent, rgba(5, 6, 6, 0.3));
  mix-blend-mode: screen;
  transition: opacity 320ms ease;
}

.workbench-mosaic[data-mode="categories"] .category-card .mosaic-overlay,
.workbench-mosaic[data-mode="category"] .category-card-feature .mosaic-overlay {
  z-index: 2;
  background: linear-gradient(180deg, rgba(18, 55, 63, 0.02), rgba(5, 6, 6, 0.72));
}

.workbench-mosaic[data-mode="categories"] .category-card:hover .mosaic-image,
.workbench-mosaic[data-mode="categories"] .category-card:focus .mosaic-image,
.workbench-mosaic[data-mode="category"] .category-card-feature:hover .mosaic-image {
  opacity: 1;
  filter: none;
}

.workbench-mosaic[data-mode="categories"] .category-card:hover::before,
.workbench-mosaic[data-mode="categories"] .category-card:focus::before,
.workbench-mosaic[data-mode="categories"] .category-card:hover::after,
.workbench-mosaic[data-mode="categories"] .category-card:focus::after,
.workbench-mosaic[data-mode="category"] .category-card-feature:hover::before,
.workbench-mosaic[data-mode="category"] .category-card-feature:hover::after {
  opacity: 0;
}

.mosaic-tile:hover .mosaic-image,
.mosaic-tile:focus .mosaic-image {
  transform: scale(1.06);
}

.mosaic-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(18, 55, 63, 0.08), rgba(5, 6, 6, 0.84));
}

.mosaic-overlay strong {
  display: block;
  color: inherit;
  font-family: var(--font-digital);
  font-size: clamp(1rem, 1.7vw, 1.75rem);
  line-height: 1.05;
}

.mosaic-overlay em {
  display: block;
  max-width: 38ch;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  line-height: 1.3;
}

.mosaic-label {
  color: var(--coral);
  font-family: var(--font-digital);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.span-standard {
  grid-column: span 3;
  grid-row: span 2;
}

.span-wide {
  grid-column: span 6;
  grid-row: span 2;
}

.span-tall {
  grid-column: span 3;
  grid-row: span 4;
}

.span-feature {
  grid-column: span 5;
  grid-row: span 4;
}

.span-project {
  grid-column: span 4;
  grid-row: span 3;
}

.span-hero {
  grid-column: span 5;
  grid-row: span 5;
}

.span-copy {
  grid-column: span 4;
  grid-row: span 3;
}

.span-gallery {
  grid-column: span 3;
  grid-row: span 2;
}

.span-empty {
  grid-column: span 7;
  grid-row: span 3;
}

.span-small {
  grid-column: span 3;
  grid-row: span 2;
}

.category-card-feature .mosaic-overlay,
.project-detail-hero .mosaic-overlay {
  background: linear-gradient(180deg, rgba(18, 55, 63, 0.04), rgba(5, 6, 6, 0.76));
}

.project-card-mosaic .mosaic-overlay {
  background: linear-gradient(180deg, rgba(18, 55, 63, 0.16), rgba(5, 6, 6, 0.9));
}

@media (min-width: 901px) {
  .workbench-mosaic[data-mode="project"] .gallery-tile .mosaic-overlay {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    gap: 0;
    padding: 7px 9px;
    background: rgba(5, 6, 6, 0.58);
  }

  .workbench-mosaic[data-mode="project"] .gallery-tile .mosaic-label,
  .workbench-mosaic[data-mode="project"] .gallery-tile .mosaic-overlay em {
    display: none;
  }

  .workbench-mosaic[data-mode="project"] .gallery-tile .mosaic-overlay strong {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
  }
}

.project-copy-tile,
.info-tile,
.nav-tile {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.project-copy-tile .mosaic-overlay,
.info-tile .mosaic-overlay,
.nav-tile .mosaic-overlay {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 246, 0.98));
}

.project-copy-tile .mosaic-overlay strong,
.info-tile .mosaic-overlay strong,
.nav-tile .mosaic-overlay strong {
  color: var(--deep-teal);
}

.project-copy-tile .mosaic-overlay em,
.info-tile .mosaic-overlay em,
.nav-tile .mosaic-overlay em {
  color: var(--muted);
}

.nav-tile {
  background: var(--technical-black);
  color: var(--white);
}

.nav-tile .mosaic-overlay {
  background: linear-gradient(145deg, rgba(5, 6, 6, 0.96), rgba(18, 55, 63, 0.96));
}

.nav-tile .mosaic-overlay strong,
.nav-tile .mosaic-overlay em {
  color: var(--white);
}

.workbench-mosaic .tag-row {
  margin: 4px 0 0;
}

.workbench-mosaic .tag {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.project-copy-tile .tag {
  background: var(--surface-strong);
  color: var(--deep-teal);
}

.workbench-stage {
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 38px;
}

.workbench-nav-panel,
.workbench-inspector {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.workbench-nav-panel {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(18, 55, 63, 0.94), rgba(5, 6, 6, 0.96)),
    url("images/portfolio/setup4.jpg") center / cover;
}

.workbench-nav-panel .eyebrow {
  margin-bottom: 14px;
}

.workbench-inspector {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  max-height: 780px;
  overflow: auto;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(245, 247, 246, 0.96), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top right, rgba(235, 130, 108, 0.16), transparent 34%);
  scrollbar-color: var(--coral) transparent;
  scrollbar-width: thin;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(118px, auto);
  grid-auto-flow: dense;
  gap: 12px;
}

.category-tile {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 118px;
  overflow: hidden;
  color: var(--white);
  padding: 0;
  border: 0;
  text-align: left;
  background: var(--deep-teal);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  transition:
    min-height 260ms ease,
    transform 260ms ease,
    filter 260ms ease,
    box-shadow 260ms ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  transform: scale(1);
  transition:
    opacity 260ms ease,
    transform 520ms ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 55, 63, 0.1), rgba(5, 6, 6, 0.76));
}

.category-tile-body {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 16px;
}

.category-tile strong {
  display: block;
  font-family: var(--font-digital);
  font-weight: 800;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.65);
}

.category-tile small,
.category-tile em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.category-tile em {
  font-size: 0.88rem;
}

.category-tile:hover,
.category-tile:focus,
.category-tile.active {
  outline: 3px solid rgba(235, 130, 108, 0.42);
  outline-offset: 4px;
}

.category-tile:hover {
  transform: translateY(-3px);
}

.category-tile.active {
  min-height: 168px;
  box-shadow: 0 18px 34px rgba(5, 6, 6, 0.28);
}

.category-tile.active img {
  opacity: 0.94;
  transform: scale(1.05);
}

.category-tile.active::after {
  background: linear-gradient(180deg, rgba(18, 55, 63, 0.02), rgba(5, 6, 6, 0.86));
}

.category-tile.layout-wide {
  grid-column: span 2;
}

.category-tile.layout-tall {
  grid-row: span 2;
}

.workbench-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.filter-chip {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--deep-teal);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover,
.filter-chip:focus {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--white);
}

.workbench-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 0;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.workbench-heading-row h3 {
  margin: 0;
  font-size: 1.45rem;
}

.workbench-status {
  margin: 8px 0 0;
  color: var(--muted);
}

.workbench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
  min-width: 0;
}

.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 16px;
  color: var(--deep-teal);
  font-weight: 800;
  text-decoration-color: var(--coral);
  text-underline-offset: 5px;
}

.text-button {
  display: inline-flex;
  width: fit-content;
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--deep-teal);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 5px;
  cursor: pointer;
}

.project-card {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  min-height: 136px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.project-card.layout-featured {
  grid-column: auto;
}

.project-card:hover,
.project-card:focus {
  transform: translateY(-3px);
  border-color: rgba(235, 130, 108, 0.75);
  box-shadow: 0 14px 28px rgba(18, 55, 63, 0.12);
}

.project-card.active {
  background: var(--deep-teal);
  color: var(--white);
  border-color: var(--coral);
  box-shadow: 0 16px 32px rgba(18, 55, 63, 0.22);
}

.project-card img {
  width: 100%;
  height: 100%;
  min-height: 136px;
  object-fit: cover;
  background: var(--surface-strong);
}

.project-card-content {
  min-width: 0;
  padding: 14px;
}

.project-card h3 {
  margin-bottom: 7px;
  font-size: 0.96rem;
}

.project-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.88rem;
  line-height: 1.35;
}

.project-card.active h3,
.project-card.active .tag,
.project-card.active .text-button {
  color: var(--white);
}

.project-card.active p {
  color: rgba(255, 255, 255, 0.78);
}

.project-card.active .tag {
  background: rgba(255, 255, 255, 0.12);
}

.project-card .text-button {
  pointer-events: none;
  font-size: 0.84rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.empty-state h3 {
  margin: 0 0 8px;
}

.case-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.case-detail[hidden] {
  display: none;
}

.case-media-main img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}

.case-detail.main-wide .case-media-main img {
  aspect-ratio: 16 / 10;
}

.case-detail.main-square .case-media-main img {
  aspect-ratio: 1 / 1;
}

.case-detail.main-portrait .case-media-main img {
  aspect-ratio: 4 / 5;
}

.case-copy h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.case-copy {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.case-copy p {
  margin: 18px 0 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.case-copy .eyebrow {
  margin-top: 0;
  color: var(--coral);
  font-size: 0.72rem;
}

.case-facts {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}

.case-facts div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.case-facts dt {
  color: var(--deep-teal);
  font-weight: 900;
}

.case-facts dd {
  margin: 0;
  color: var(--muted);
}

.case-gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.case-gallery img {
  width: 100%;
  max-height: 150px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.case-gallery img.ratio-square {
  aspect-ratio: 1 / 1;
}

.case-gallery img.ratio-portrait {
  aspect-ratio: 4 / 5;
}

.case-gallery img.ratio-tall {
  aspect-ratio: 3 / 4;
}

.case-detail.gallery-count-1 .case-gallery {
  grid-template-columns: minmax(220px, 0.56fr);
}

.case-detail.gallery-count-2 .case-gallery {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.workbench-stage.is-updating .workbench-inspector > * {
  opacity: 0.16;
  transform: translateY(8px) scale(0.99);
}

.workbench-inspector > * {
  transition:
    opacity 160ms ease,
    transform 220ms ease;
}

.workbench-stage.has-updated .workbench-heading-row,
.workbench-stage.has-updated .project-card,
.workbench-stage.has-updated .case-detail {
  animation: workbench-rise 420ms ease both;
}

@keyframes workbench-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.tag {
  background: var(--surface-strong);
  color: var(--deep-teal);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 9px;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 34px;
}

.market-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.market-panel h3 {
  color: var(--coral);
}

.market-panel ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.84);
}

.next-section {
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(5, 6, 6, 0.94), rgba(18, 55, 63, 0.9)),
    url("images/next/almond-pi-detail.jpg") center / cover;
  border-top: 8px solid var(--coral);
}

.next-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(320px, 1.16fr);
  gap: 42px;
  align-items: center;
}

.next-section h2 {
  color: var(--white);
}

.next-section .section-kicker {
  color: rgba(255, 255, 255, 0.78);
}

.next-section .text-link {
  color: var(--white);
}

.next-media {
  position: relative;
  margin: 0;
  min-height: 430px;
  overflow: hidden;
  background: var(--technical-black);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.next-media img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.next-media figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  color: var(--white);
  background: rgba(5, 6, 6, 0.78);
  border-left: 4px solid var(--coral);
}

.next-media figcaption strong {
  flex: 0 0 auto;
  color: var(--coral);
  font-family: var(--font-digital);
  text-transform: uppercase;
  font-size: 0.78rem;
}

.next-media figcaption span {
  color: rgba(255, 255, 255, 0.82);
}

.lab-note {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background: var(--surface);
  border-left: 4px solid var(--coral);
}

.lab-note::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--note-image) center / cover;
  opacity: 0.13;
}

.lab-note:nth-child(1) {
  --note-image: url("images/portfolio/friso-vw-comparison.jpg");
}

.lab-note:nth-child(2) {
  --note-image: url("images/portfolio/cad-prototype-paper-towel-1.jpg");
}

.lab-note:nth-child(3) {
  --note-image: url("images/portfolio/pcb2.jpg");
}

.lab-note > * {
  position: relative;
  z-index: 1;
}

.note-label {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--coral);
  font-family: var(--font-digital);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact {
  background: var(--surface);
}

.contact-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
  margin-top: 34px;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.contact-list a {
  color: var(--deep-teal);
  font-weight: 700;
  word-break: break-word;
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.contact-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.contact-card:hover,
.contact-card:focus {
  transform: translateY(-3px);
  border-color: rgba(235, 130, 108, 0.8);
  box-shadow: 0 14px 28px rgba(18, 55, 63, 0.12);
  outline: none;
}

.contact-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: var(--deep-teal);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.contact-card strong,
.contact-card small {
  display: block;
  min-width: 0;
}

.contact-card strong {
  color: var(--deep-teal);
  font-family: var(--font-digital);
}

.contact-card small {
  margin-top: 4px;
  color: var(--muted);
  word-break: break-word;
}

.contact-panel {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.contact-panel h3 {
  font-size: 1.4rem;
}

.contact-panel p {
  margin: 12px 0 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
}

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

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--deep-teal);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #B9C7C5;
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border-radius: 0;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(235, 130, 108, 0.35);
  border-color: var(--coral);
}

input[type="checkbox"] {
  width: auto;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bot-field {
  display: none;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  background: var(--deep-teal);
  color: var(--white);
  padding: 34px 22px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 20px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner strong,
.footer-inner a {
  color: var(--white);
}

.footer-inner p {
  margin: 8px 0 0;
}

.footer-inner a {
  display: block;
  margin-top: 8px;
  text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus {
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 5px;
}

@media (max-width: 900px) {
  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    min-height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(5, 6, 6, 0.16);
    color: var(--white);
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
    transition:
      background 180ms ease,
      border-color 180ms ease,
      color 180ms ease;
  }

  .mobile-toggle:hover,
  .mobile-toggle:focus {
    border-color: var(--coral);
    background: rgba(235, 130, 108, 0.18);
    outline: 3px solid rgba(235, 130, 108, 0.28);
    outline-offset: 3px;
  }

  .mobile-toggle[aria-expanded="true"] {
    border-color: var(--coral);
    background: var(--coral);
  }

  .nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-cta {
    width: 100%;
  }

  .deliverables-grid,
  .workbench-grid,
  .news-grid,
  .market-grid,
  .ecosystem-grid,
  .next-grid,
  .flagship-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .workbench-stage {
    grid-template-columns: 1fr;
  }

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

  .workbench-mosaic {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 82px;
  }

  .span-standard,
  .span-small {
    grid-column: span 3;
    grid-row: span 2;
  }

  .span-wide,
  .span-empty {
    grid-column: span 6;
    grid-row: span 2;
  }

  .span-tall,
  .span-project,
  .span-gallery {
    grid-column: span 3;
    grid-row: span 3;
  }

  .span-feature,
  .span-hero,
  .span-copy {
    grid-column: span 6;
    grid-row: span 3;
  }

  .workbench-inspector {
    max-height: none;
    overflow: visible;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(138px, auto);
  }

  .project-card.layout-featured {
    grid-column: auto;
  }

  .category-grid {
    grid-auto-rows: minmax(150px, auto);
  }

  .category-tile.layout-wide,
  .category-tile.layout-tall {
    grid-column: auto;
    grid-row: auto;
  }

  .workbench-heading-row,
  .case-detail,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .workbench-heading-row {
    align-items: start;
  }

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

  .case-detail.gallery-count-1 .case-gallery,
  .case-detail.gallery-count-2 .case-gallery {
    grid-template-columns: 1fr;
  }

  .flagship-media {
    min-height: 300px;
  }

  .next-media,
  .next-media img {
    min-height: 340px;
  }

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

@media (max-width: 620px) {
  .hero-inner,
  .section-inner {
    padding: 54px 18px;
  }

  .hero {
    min-height: 78svh;
  }

  .brand-mark {
    width: 108px;
    height: 40px;
  }

  .facts,
  .form-row {
    grid-template-columns: 1fr;
  }

  .workbench-stage {
    gap: 16px;
  }

  .workbench-page h1 {
    font-size: clamp(2.4rem, 14vw, 4.1rem);
  }

  .workbench-page-hero .section-inner {
    padding-top: 54px;
  }

  .workbench-board {
    margin-top: 30px;
    padding: 14px;
  }

  .workbench-board-head h2 {
    font-size: 1.55rem;
  }

  .board-reset {
    width: 100%;
  }

  .workbench-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 124px;
    gap: 12px;
  }

  .span-standard,
  .span-small,
  .span-gallery {
    grid-column: span 1;
    grid-row: span 2;
  }

  .span-wide,
  .span-feature,
  .span-project,
  .span-hero,
  .span-copy,
  .span-empty {
    grid-column: span 2;
    grid-row: span 2;
  }

  .span-tall {
    grid-column: span 1;
    grid-row: span 3;
  }

  .project-detail-hero {
    grid-row: span 3;
  }

  .project-copy-tile {
    grid-row: span 3;
  }

  .mosaic-overlay {
    padding: 14px;
  }

  .mosaic-overlay strong {
    font-size: 1rem;
  }

  .project-detail-hero .mosaic-overlay strong,
  .project-copy-tile .mosaic-overlay strong {
    font-size: 1.55rem;
  }

  .workbench-nav-panel,
  .workbench-inspector {
    padding: 16px;
  }

  .category-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 4px 14px;
    scroll-snap-type: x mandatory;
  }

  .category-tile {
    flex: 0 0 78%;
    min-height: 158px;
    scroll-snap-align: start;
  }

  .category-tile.active {
    min-height: 176px;
  }

  .workbench-heading-row {
    padding: 16px;
  }

  .workbench-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
  }

  .project-card {
    flex: 0 0 88%;
    grid-template-columns: 96px minmax(0, 1fr);
    scroll-snap-align: start;
  }

  .case-media-main img {
    min-height: 260px;
  }

  .button,
  .button.secondary {
    width: 100%;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .next-media,
  .next-media img {
    min-height: 280px;
  }

  .next-media figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

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