/* Actual Qt automotive project screenshots: imagery leads, UI recedes. */
.qt-projects {
  padding: clamp(72px, 9vw, 160px) var(--edge) clamp(76px, 9vw, 150px);
  background: radial-gradient(ellipse at 82% 8%, #dce0f1 0%, transparent 42%), #ebf0e9;
  color: #183329;
  overflow: clip;
}
.qt-projects-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
  align-items: end;
  gap: clamp(30px, 5vw, 100px);
  margin: 0 0 clamp(30px, 4vw, 72px);
}
.qt-projects-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: clamp(20px, 2.4vw, 40px);
  font: 550 .82rem/1.6 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: #456458;
}
.qt-projects-kicker-mark {
  width: 8px;
  height: 8px;
  flex: none;
  background: #779e54;
  border-radius: 50%;
}
.qt-projects-heading h2 {
  max-width: 13ch;
  font-size: clamp(3.8rem, 7.15vw, 9.2rem);
  font-weight: 430;
  letter-spacing: -.075em;
  line-height: .97;
}
.qt-projects-heading h2 em { color: #5a7363; }
.qt-projects-description {
  font-size: clamp(1.08rem, 1.35vw, 1.5rem);
  line-height: 1.47;
  color: #53675e;
  max-width: 34ch;
  padding-bottom: .4em;
}
.qt-projects-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(14px, 1.75vw, 32px);
  row-gap: clamp(36px, 4.1vw, 74px);
}
.qt-project { margin: 0; min-width: 0; }
.qt-project--wide { grid-column: 1 / -1; }
.qt-project-visual {
  position: relative;
  display: block;
  background: #0b0b17;
  overflow: hidden;
  isolation: isolate;
  cursor: zoom-in;
}
.qt-project-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: transform 700ms cubic-bezier(.16,.82,.19,1);
  transform-origin: 50% 50%;
}
.qt-project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,#04090b9c 0%,transparent 25%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}
.qt-project-visual-action {
  position: absolute;
  z-index: 1;
  left: clamp(14px, 2vw, 34px);
  bottom: clamp(14px, 2vw, 34px);
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #f1faf7;
  font: 550 .82rem/1.3 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .035em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 250ms ease, transform 300ms cubic-bezier(.16,.82,.19,1);
}
.qt-expand-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #effaf5a8;
  border-radius: 50%;
  font: 400 1.25rem/1 sans-serif;
}
.qt-project-visual:is(:hover,:focus-visible) img { transform: scale(1.012); }
.qt-project-visual:is(:hover,:focus-visible)::after,
.qt-project-visual:is(:hover,:focus-visible) .qt-project-visual-action { opacity: 1; }
.qt-project-visual:is(:hover,:focus-visible) .qt-project-visual-action { transform: translateY(0); }
.qt-project figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: clamp(12px, 1.5vw, 20px);
  color: #29443b;
  font-size: clamp(.85rem, 1vw, 1rem);
  line-height: 1.5;
}
.qt-project figcaption span:first-child { font-weight: 650; }
.qt-project figcaption span:last-child { color: #61756b; font-size: .84rem; }
.qt-projects-closer {
  max-width: 57ch;
  margin: clamp(65px, 7vw, 130px) 0 0 auto;
  padding: 22px 0 0;
  border-top: 1px solid #a8bab0;
  color: #455c51;
  font-size: clamp(1.2rem, 2.1vw, 2rem);
  line-height: 1.43;
  letter-spacing: -.035em;
}
/* Native dialog keeps the full original image reachable without viewport scroll traps. */
.qt-viewer {
  width: min(96vw, 1760px);
  height: min(94svh, 1100px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #48605c;
  background: #080e13;
  color: #eaf5ef;
  overflow: hidden;
  box-shadow: 0 25px 130px #01050688;
}
.qt-viewer[open] { display: flex; flex-direction: column; }
.qt-viewer::backdrop { background: #04090ce8; backdrop-filter: blur(10px); }
.qt-viewer-head,
.qt-viewer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(15px, 2.5vw, 36px);
  font: 500 .85rem/1.35 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .025em;
}
.qt-viewer-head { border-bottom: 1px solid #ffffff26; }
.qt-viewer-foot { border-top: 1px solid #ffffff26; }
.qt-viewer-stage { flex: 1; display: grid; place-items: center; min-height: 0; min-width: 0; padding: 16px; }
.qt-viewer-stage img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.qt-viewer button {
  background: transparent;
  color: #eaf5ef;
  border: 1px solid #71817e;
  border-radius: 100px;
  padding: .58rem 1rem;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.qt-viewer button:hover { background: #ffffff1b; border-color: #d1f7d9; }
.qt-viewer button:active { transform: scale(.96); }
.qt-viewer button:focus-visible { outline: 2px solid #caf8ad; outline-offset: 3px; }
.qt-viewer-close span { font-size: 1.2rem; padding-left: 10px; }
#qt-viewer-caption { text-align: center; }
@media(max-width: 820px) {
  .qt-projects-heading { grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .qt-projects-heading h2 { max-width: 13ch; font-size: clamp(3.7rem, 11vw, 6rem); }
  .qt-projects-description { max-width: 56ch; }
  .qt-projects-gallery { grid-template-columns: 1fr; row-gap: 36px; }
  .qt-project--wide { grid-column: auto; }
  .qt-project-visual-action { opacity: 1; transform: none; font-size: .75rem; }
  .qt-project-visual::after { opacity: .7; }
  .qt-projects-closer { margin-left: 0; }
  .qt-viewer { width: 100vw; height: 100svh; border: 0; }
  .qt-viewer-stage { padding: 8px; }
  #qt-viewer-caption { font-size: .74rem; }
}
@media(prefers-reduced-motion: reduce) {
  .qt-project-visual img,
  .qt-project-visual::after,
  .qt-project-visual-action,
  .qt-viewer button { transition: none !important; }
}
