:root {
  color-scheme: dark;
  --background: #121212;
  --surface: #191919;
  --surface-hover: #1c1c1c;
  --border: #2b2b2b;
  --text: #efefed;
  --muted: #a0a0a0;
  --purple: #bc17d8;
  --orange: #f18025;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  background: var(--background);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 280px; }
body { margin: 0; padding: 0 32px 80px; min-height: 100svh; }
::selection { background: #bc17d8; color: #fff; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; border-radius: 3px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 12px 18px; background: var(--text); color: var(--background); }
.skip-link:focus { top: 16px; }

.identity { max-width: 1100px; margin: 0 auto; padding-top: 54px; text-align: center; }
.brand-lockup { position: relative; display: grid; place-items: center; isolation: isolate; min-height: 270px; }
.logo { position: absolute; z-index: 1; display: block; width: clamp(112px, 15vw, 176px); height: auto; }
h1 { position: relative; z-index: 0; margin: 0; padding-right: .08em; color: #282828; font-size: clamp(4rem, 12vw, 10rem); font-weight: 800; font-style: italic; letter-spacing: -.075em; line-height: 1.2; white-space: nowrap; -webkit-text-stroke: 1.5px currentColor; transform: skewX(-7deg); }
.identity-caption { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 6px 0 0; color: var(--muted); font-size: .875rem; letter-spacing: .04em; }
.caption-divider { color: #626262; }

.catalogue { width: 100%; max-width: 1100px; margin: 68px auto 0; outline: none; }
.catalogue-heading { display: flex; align-items: baseline; padding-bottom: 22px; }
.catalogue-heading h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.375rem; font-weight: 600; letter-spacing: -.035em; }
.heading-mark { width: 3px; height: 17px; background: linear-gradient(180deg, var(--purple), var(--orange)); border-radius: 1px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: 12px; padding: 27px; transition: background 180ms ease, transform 180ms ease; }
.project-card:focus-within { background: var(--surface-hover); }
.project-header { display: flex; align-items: center; gap: 14px; min-width: 0; margin-bottom: 18px; }
.project-heading { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; }
.project-category { margin-top: 2px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.project-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.project-logo { display: block; flex: 0 0 auto; width: 48px; height: 48px; object-fit: contain; }
.project-logo--robotcenter { transform: translateY(-5px); }
.card-content { display: flex; flex: 1; flex-direction: column; }
.project-title { flex: 0 1 auto; min-width: 0; margin: 0; font-size: 1.5rem; line-height: 1.25; font-weight: 600; letter-spacing: -.045em; overflow-wrap: anywhere; }
.status-dot { position: relative; display: block; flex: 0 0 9px; width: 9px; height: 9px; margin-left: 2px; border-radius: 50%; cursor: help; }
.status-dot--active { background: #48b56a; }
.status-dot--discontinued { background: #e06464; }
.status-dot--coming-soon { background: #858585; }
.status-dot::after { position: absolute; z-index: 2; left: 50%; bottom: calc(100% + 9px); padding: 6px 9px; border: 1px solid #3b3b3b; border-radius: 5px; background: #222; color: var(--text); content: attr(data-label); font-size: .75rem; font-weight: 500; line-height: 1.2; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 4px); transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease; }
.status-dot:hover::after, .project-card:focus-visible .status-dot::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.project-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; margin: 0; max-width: 34ch; color: var(--muted); font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.technologies { position: relative; display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 0; margin: 18px 0 0; list-style: none; }
.technologies::before { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--purple), var(--orange)); content: ""; }
.technology { padding: 5px 9px; background: #242424; border-radius: 4px; color: #b5b5b5; font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.empty-state { grid-column: 1 / -1; margin: 0; padding: 48px 24px; border: 1px solid var(--border); border-radius: 12px; text-align: center; color: var(--muted); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project-card[href]:hover { transform: translateY(-3px); background: var(--surface-hover); }
}

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity { padding-top: 42px; }
  .brand-lockup { min-height: 238px; }
  .catalogue { margin-top: 54px; }
}

@media (max-width: 580px) {
  body { padding: 0 22px 40px; }
  .identity { padding-top: 34px; }
  .logo { width: 112px; }
  .brand-lockup { min-height: 206px; }
  h1 { font-size: clamp(4rem, 12.7vw, 6rem); }
  .identity-caption { margin-top: 5px; font-size: .8125rem; }
  .catalogue { margin-top: 46px; }
  .catalogue-heading { padding-bottom: 18px; }
  .catalogue-heading h2 { font-size: 1.25rem; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .project-card { padding: 25px; }
  .project-logo { width: 42px; height: 42px; }
}

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