/* Gestaltungszentrale: Farben, Grössen und Abstände hier anpassen. */
:root {
  --paper: #ffffed;
  --ink: #1511b8;
  --accent: #ed553e;
  --line: rgba(21, 17, 184, 0.25);
  --font-body: "Trebuchet MS", Arial, sans-serif;
  --font-display: "Arial Black", "Arial Rounded MT Bold", Arial, sans-serif;
  --page-gutter: clamp(24px, 4.3vw, 76px);
  --portrait-height: clamp(470px, 43vw, 635px);
  --title-size: clamp(100px, 16.1vw, 258px);
  --hero-height: 760px;
  --radius: 30px;
  --transition-duration: 900ms;
  --ease: cubic-bezier(0.22, 0.75, 0.18, 1);
  --glass: rgba(255, 255, 255, 0.36);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  transition: background-color var(--transition-duration) ease;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 7px;
}
button {
  border: 0;
  background: none;
}
::selection {
  background: var(--ink);
  color: var(--paper);
}
.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;
}
.filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: var(--ink);
  color: var(--paper);
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  margin: 0 var(--page-gutter);
  min-height: 106px;
  border-bottom: 1px solid var(--ink);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -1.7px;
  white-space: nowrap;
}
.brand-dot {
  font: 12px Arial;
  vertical-align: top;
  display: inline-block;
  margin: 5px 0 0 5px;
  letter-spacing: 0;
}
.category-tabs {
  display: flex;
  gap: 32px;
  align-items: center;
}
.category-tabs button {
  padding: 13px 0;
  font-size: 14px;
  font-weight: 700;
  position: relative;
}
.category-tabs button:after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 260ms;
}
.category-tabs button[aria-selected="true"]:after,
.category-tabs button:hover:after {
  transform: scaleX(1);
}
.cv-link {
  justify-self: end;
  border: 1px solid var(--ink);
  padding: 11px 17px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  gap: 22px;
  align-items: center;
}
.cv-link:hover {
  background: var(--ink);
  color: var(--paper);
}
.cv-link span {
  font-size: 20px;
}
.hero {
  padding: 0 var(--page-gutter);
}
.hero-kicker {
  display: flex;
  justify-content: space-between;
  padding-top: 23px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.6px;
}
.tiny-star {
  font-size: 17px;
  vertical-align: middle;
  margin-left: 12px;
}
.stage {
  position: relative;
  height: var(--hero-height);
  max-height: calc(100svh - 180px);
  min-height: 600px;
  isolation: isolate;
  touch-action: pan-y;
  outline-offset: -4px;
}
.title-track {
  position: absolute;
  left: 50%;
  top: 18%;
  width: calc(100% + 20px);
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  text-align: center;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 950;
  font-size: var(--title-size);
  letter-spacing: -0.065em;
  line-height: 1.1;
  display: block;
  white-space: nowrap;
  transform: scaleX(0.96);
  transform-origin: center;
}
.portrait-stack {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.portrait {
  position: absolute;
  height: var(--portrait-height);
  max-height: 89%;
  width: auto;
  max-width: 76%;
  object-fit: contain;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  filter: url(#portrait-alpha);
  visibility: hidden;
  transition:
    opacity 350ms ease,
    transform 700ms var(--ease);
  object-position: center bottom;
}
.portrait.active {
  opacity: 1;
  visibility: visible;
}
.portrait.leaving {
  opacity: 0;
  visibility: visible;
  transform: translateX(calc(-50% - var(--exit-x, 20px)));
}
.portrait.entering {
  transform: translateX(calc(-50% + var(--exit-x, 20px)));
}
.portrait-ground {
  position: absolute;
  bottom: 39px;
  left: 50%;
  width: 230px;
  height: 25px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(25, 20, 90, 0.17), transparent 70%);
  z-index: 2;
}
.small-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  display: block;
}
.contact-block,
.software-block {
  position: absolute;
  z-index: 15;
  top: 53%;
  width: 230px;
}
.contact-block {
  left: 4%;
}
.contact-title {
  display: block;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.7px;
  margin: 18px 0;
}
.contact-title span {
  display: inline-block;
  margin-left: 10px;
  font-weight: 400;
}
.email {
  font-size: 11px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}
.software-block {
  right: 4%;
  width: 205px;
}
.software-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.software-icon {
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 7px;
  width: 35px;
  height: 35px;
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}
.software-name {
  font-size: 13px;
}
.skill-track {
  height: 3px;
  width: 100%;
  background: var(--line);
  margin-top: 8px;
  position: relative;
}
.skill-track i {
  display: block;
  height: 100%;
  background: var(--ink);
  width: var(--skill);
}
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(21, 17, 184, 0.45);
  box-shadow:
    inset 0 1px 2px white,
    0 3px 9px rgba(21, 17, 184, 0.07);
}
.arrow {
  position: absolute;
  top: 37%;
  z-index: 20;
  width: 49px;
  height: 49px;
  border-radius: 50%;
  font-size: 27px;
  display: grid;
  place-items: center;
  transition:
    background 0.2s,
    transform 0.2s;
}
.arrow:hover {
  background: var(--ink);
  color: var(--paper);
  transform: scale(1.07);
}
.arrow-prev {
  left: 0;
}
.arrow-next {
  right: 0;
}
.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.category-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.category-caption #category-number {
  font-size: 18px;
}
.caption-line {
  width: 25px;
  height: 1px;
  background: var(--ink);
}
.dots {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 40px;
}
.dots button {
  padding: 0;
  width: 7px;
  height: 7px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition:
    background 0.2s,
    transform 0.2s;
}
.dots button[aria-pressed="true"] {
  background: var(--ink);
  transform: scale(1.25);
}
.motion-toggle {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  padding: 12px 0;
}
.motion-toggle > span:first-child {
  font-size: 14px;
}
.scroll-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-size: 9px;
  letter-spacing: 1.7px;
  padding: 30px 0 28px;
}
.scroll-link span {
  font-size: 19px;
}
#orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: auto;
}
.orbit-item {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  filter: drop-shadow(0 12px 12px rgba(21, 17, 184, 0.08));
}
.orbit-film {
  width: 110px;
  height: 80px;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 10px 8px;
  display: flex;
  gap: 5px;
  position: relative;
}
.orbit-film:before,
.orbit-film:after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 5px,
    transparent 5px 11px
  );
}
.orbit-film:before {
  top: 3px;
}
.orbit-film:after {
  bottom: 3px;
}
.orbit-film i {
  flex: 1;
  background: var(--ink);
  opacity: 0.85;
}
.orbit-film i:nth-child(2) {
  opacity: 0.45;
}
.orbit-film i:nth-child(3) {
  opacity: 0.2;
}
.orbit-frame {
  width: 110px;
  height: 130px;
  background: white;
  border: 1px solid var(--ink);
  padding: 8px 8px 25px;
  transform: rotate(-8deg);
}
.frame-image {
  height: 100%;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.frame-image:before {
  content: "";
  position: absolute;
  width: 55px;
  height: 55px;
  top: 10px;
  right: -8px;
  border: 1px solid var(--paper);
  border-radius: 50%;
}
.frame-image:after {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -30%;
  width: 120%;
  height: 70%;
  border: 1px solid var(--paper);
  transform: rotate(-28deg);
}
.orbit-disc {
  width: 75px;
  height: 75px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 0 0 8px var(--paper),
    inset 0 0 0 9px var(--ink);
}
.orbit-disc:after {
  content: "";
  width: 25px;
  height: 25px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.orbit-type {
  font: bold 80px/1 var(--font-display);
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--paper);
  letter-spacing: -6px;
}
.orbit-swatch {
  width: 82px;
  height: 110px;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: rotate(13deg);
}
.orbit-swatch i {
  flex: 1;
  background: var(--ink);
}
.orbit-swatch i:nth-child(2) {
  background: var(--accent);
}
.orbit-swatch i:nth-child(3) {
  background: #e4a3be;
}
.orbit-star {
  font: 100px/1 Arial;
  color: var(--accent);
}
.work-section {
  margin: 14px 22px 0;
  padding: 34px calc(var(--page-gutter) - 22px) 50px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.25);
  scroll-margin-top: 20px;
}
.work-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 35px;
  gap: 20px;
}
.work-heading h1 {
  font: 900 clamp(55px, 6vw, 90px)/1 var(--font-display);
  letter-spacing: -5px;
  margin: 0;
}
.outline-period {
  display: inline-block;
  width: 0.11em;
  height: 0.11em;
  margin-left: 0.025em;
  border-radius: 50%;
  background: var(--ink);
  color: transparent;
  -webkit-text-stroke: 0;
  overflow: hidden;
  letter-spacing: 0;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.project-art {
  aspect-ratio: 16/10;
  border: 1px solid var(--ink);
  position: relative;
  overflow: hidden;
  background: rgba(21, 17, 184, 0.025);
  display: grid;
  place-items: center;
}
.project-grid article:nth-child(2) .project-art {
  background: var(--ink);
  color: var(--paper);
}
.project-art .project-symbol {
  font: 900 clamp(85px, 12vw, 170px)/1 var(--font-display);
  letter-spacing: -12px;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  opacity: 0.45;
  transform: rotate(-10deg);
}
.project-meta {
  padding: 17px 0 15px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.project-meta h2 {
  font-size: 16px;
  margin: 0;
}
.placeholder-note {
  font-size: 11px;
  opacity: 0.7;
  margin: 24px 0 0;
}
.about-section {
  position: relative;
  margin: 0 var(--page-gutter);
  padding: 90px 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  overflow: hidden;
}
.about-section h2 {
  font: 900 clamp(34px, 4.2vw, 62px)/1.08 var(--font-display);
  letter-spacing: -2.7px;
  margin: 0 0 25px;
}
.about-section p {
  max-width: 440px;
  font-size: 16px;
  line-height: 1.7;
}
.text-link {
  font-size: 12px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  display: inline-flex;
  gap: 30px;
  margin-top: 12px;
}
.about-star {
  position: absolute;
  right: 0;
  bottom: 90px;
  font-size: 130px;
  line-height: 1;
  color: var(--accent);
  z-index: -1;
}
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 60px var(--page-gutter) 25px;
}
.footer-cta {
  font: 900 clamp(38px, 5.8vw, 82px)/1.08 var(--font-display);
  letter-spacing: -3px;
  display: block;
}
.footer-cta span {
  font-family: Arial;
  font-weight: 400;
  display: inline-block;
  margin-left: 20px;
}
.footer-bottom {
  margin-top: 55px;
  padding-top: 24px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.footer-bottom .wordmark {
  font-size: 22px;
  letter-spacing: -1px;
}
.changing .software-block {
  animation: soft-change 0.75s ease;
}
.changing .hero-title {
  animation: title-out 0.9s var(--ease);
}
@keyframes soft-change {
  0%,
  100% {
    opacity: 1;
  }
  45% {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes title-out {
  0% {
    opacity: 1;
    transform: translateX(0) scaleX(0.96);
  }
  45% {
    opacity: 0;
    transform: translateX(calc(-90px * var(--direction, 1))) scaleX(0.96);
  }
  46% {
    opacity: 0;
    transform: translateX(calc(90px * var(--direction, 1))) scaleX(0.96);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scaleX(0.96);
  }
}
@media (min-width: 1600px) {
  :root {
    --hero-height: 800px;
    --portrait-height: 680px;
  }
  .stage {
    max-height: none;
  }
  .title-track {
    top: 18%;
  }
}
@media (max-width: 1100px) {
  :root {
    --portrait-height: 540px;
    --hero-height: 660px;
    --title-size: 16vw;
  }
  .site-header {
    gap: 18px;
  }
  .category-tabs {
    gap: 22px;
  }
  .wordmark {
    font-size: 27px;
  }
  .contact-block {
    left: 0;
    width: 190px;
  }
  .software-block {
    right: 0;
    width: 165px;
  }
  .contact-title {
    font-size: 21px;
  }
  .software-row {
    gap: 8px;
  }
  .stage {
    min-height: 590px;
  }
  .title-track {
    top: 16%;
  }
  .hero-bottom {
    gap: 12px;
  }
  .motion-label {
    display: none;
  }
}
@media (max-width: 760px) {
  :root {
    --page-gutter: 22px;
    --hero-height: 660px;
    --portrait-height: 470px;
    --title-size: 17vw;
    --radius: 22px;
  }
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 115px;
    gap: 0 15px;
    padding-top: 20px;
  }
  .wordmark {
    font-size: 27px;
  }
  .brand-dot {
    font-size: 9px;
  }
  .cv-link {
    font-size: 10px;
    padding: 7px 11px;
    gap: 10px;
  }
  .category-tabs {
    grid-column: 1/-1;
    grid-row: 2;
    justify-content: space-between;
    gap: 25px;
    padding: 10px 0;
  }
  .category-tabs button {
    font-size: 12px;
  }
  .hero-kicker {
    padding-top: 20px;
    font-size: 8px;
    letter-spacing: 1px;
  }
  .tiny-star {
    font-size: 13px;
  }
  .stage {
    height: 610px;
    min-height: 610px;
    max-height: none;
  }
  .title-track {
    top: 48px;
    width: calc(100% + 18px);
  }
  .hero-title {
    font-size: var(--title-size);
    letter-spacing: -0.075em;
  }
  .portrait {
    height: 445px;
    bottom: 135px;
    max-width: 88%;
    max-height: none;
  }
  .portrait-ground {
    bottom: 126px;
    width: 170px;
  }
  .arrow {
    top: 38%;
    width: 38px;
    height: 38px;
    font-size: 23px;
  }
  .arrow-prev {
    left: -5px;
  }
  .arrow-next {
    right: -5px;
  }
  .contact-block,
  .software-block {
    top: auto;
    bottom: 43px;
    width: 47%;
  }
  .contact-block {
    left: 0;
  }
  .contact-block .small-label {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .contact-title {
    font-size: 15px;
    line-height: 1.15;
    margin: 9px 0;
  }
  .contact-title br {
    display: none;
  }
  .contact-title span {
    margin-left: 5px;
  }
  .email {
    font-size: 8px;
    padding-bottom: 2px;
  }
  .software-block {
    right: 0;
  }
  .software-block > .small-label {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .software-row {
    margin-top: 10px;
    gap: 6px;
  }
  .software-icon {
    width: 23px;
    height: 23px;
    font-size: 11px;
    border-radius: 4px;
  }
  .software-name {
    font-size: 9px;
  }
  .skill-track {
    margin-top: 4px;
    height: 2px;
  }
  .software-block #software {
    display: flex;
    gap: 12px;
  }
  .software-row > div:last-child {
    max-width: 62px;
  }
  .hero-bottom {
    bottom: 0;
  }
  .category-caption {
    font-size: 8px;
    gap: 7px;
  }
  .category-caption #category-number {
    font-size: 14px;
  }
  .caption-line {
    width: 12px;
  }
  #category-description {
    max-width: 85px;
    line-height: 1.4;
  }
  .dots {
    padding: 11px 16px;
    gap: 12px;
  }
  .dots button {
    width: 6px;
    height: 6px;
  }
  .motion-toggle {
    padding: 10px;
  }
  .scroll-link {
    font-size: 8px;
    padding: 25px 0 22px;
    gap: 12px;
  }
  .orbit-film {
    width: 75px;
    height: 54px;
    padding: 8px 6px;
  }
  .orbit-frame {
    width: 70px;
    height: 88px;
    padding: 5px 5px 17px;
  }
  .orbit-disc {
    width: 53px;
    height: 53px;
  }
  .orbit-disc:after {
    width: 18px;
    height: 18px;
  }
  .orbit-type {
    font-size: 55px;
  }
  .orbit-star {
    font-size: 68px;
  }
  .orbit-swatch {
    width: 55px;
    height: 75px;
    padding: 5px;
  }
  .work-section {
    margin: 5px 10px 0;
    padding: 25px 18px 30px;
  }
  .small-label {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .work-heading {
    display: block;
    margin: 25px 0;
  }
  .work-heading h1 {
    font-size: 57px;
    letter-spacing: -3px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .project-art .project-symbol {
    font-size: 110px;
  }
  .project-meta h2 {
    font-size: 14px;
  }
  .placeholder-note {
    font-size: 10px;
    line-height: 1.5;
  }
  .about-section {
    grid-template-columns: 1fr;
    padding: 55px 0;
    gap: 25px;
  }
  .about-section h2 {
    font-size: 37px;
    letter-spacing: -1.8px;
  }
  .about-section p {
    font-size: 14px;
    max-width: 90%;
  }
  .about-star {
    font-size: 85px;
    bottom: 45px;
    opacity: 0.3;
  }
  .footer-cta {
    font-size: 42px;
    letter-spacing: -2px;
  }
  .footer-cta span {
    margin-left: 0;
  }
  footer {
    padding-top: 40px;
  }
  .footer-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 35px;
  }
  .footer-bottom .wordmark {
    margin-bottom: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .orbit-item {
    will-change: auto;
  }
}

.project-grid article:nth-child(2) .project-symbol {
  -webkit-text-stroke-color: var(--paper);
}

/* Simplified header and category navigation. */
.site-header {
  border-bottom: 0;
}
.hero-bottom .dots {
  grid-column: 2;
}
.hero-bottom .motion-toggle {
  grid-column: 3;
}
/* Every tool gets the same track width; only the solid fill varies. */
.software-row > div:last-child {
  flex: 1;
  min-width: 0;
}
@media (max-width: 760px) {
  .title-track {
    width: 100%;
  }
  .hero-title {
    font-size: var(--title-size);
  }
  .software-block #software {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .software-row {
    min-width: 0;
    align-items: start;
  }
  .software-row > div:last-child {
    max-width: none;
  }
  .software-name {
    display: block;
    min-height: 24px;
    line-height: 12px;
  }
}

/* Keep navigation compact and independent of the removed caption. */
.hero-bottom .dots {
  grid-area: 1 / 2;
  justify-self: center;
  width: max-content;
}
.hero-bottom .motion-toggle {
  grid-area: 1 / 3;
  justify-self: end;
}
@media (max-width: 760px) {
  .stage {
    height: 640px;
    min-height: 640px;
  }
  .portrait {
    bottom: 165px;
  }
  .portrait-ground {
    bottom: 156px;
  }
  .contact-block,
  .software-block {
    bottom: 50px;
    height: 90px;
    display: flex;
    flex-direction: column;
  }
  .contact-block .email {
    align-self: start;
    margin-top: auto;
  }
  .software-block #software {
    margin-top: auto;
  }
  .software-row {
    margin-top: 0;
  }
}
@media (max-width: 360px) {
  .site-header {
    column-gap: 10px;
  }
  .wordmark {
    font-size: 24px;
  }
  .cv-link {
    white-space: nowrap;
    font-size: 9px;
    gap: 6px;
  }
  .software-block #software {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .software-name {
    min-height: 0;
  }
}
/* Keep the title's sideways transition inside its own track. */
.title-track {
  overflow: hidden;
}

/* Shared glass surface for the CV button and category controls. */
:root {
  --control-hover: #ed553e;
  --control-glass: rgba(255, 255, 255, 0.36);
  --control-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(21, 17, 184, 0.06), 0 3px 9px rgba(21, 17, 184, 0.07);
}
.cv-link,
.glass {
  background: var(--control-glass);
  border: 1px solid rgba(21, 17, 184, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--control-shadow);
}
.cv-link,
button {
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.arrow {
  padding: 0;
  line-height: 1;
  display: grid;
  place-items: center;
}
.arrow svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) {
  .cv-link:hover,
  .arrow:hover {
    background: var(--control-hover);
    border-color: var(--control-hover);
    color: var(--paper);
    box-shadow: var(--control-shadow);
  }
  .category-tabs button:hover,
  .motion-toggle:hover {
    color: var(--control-hover);
  }
  .category-tabs button:hover:after {
    background: var(--control-hover);
  }
  .dots button:hover {
    background: var(--control-hover);
    border-color: var(--control-hover);
  }
}
/* Text links: matching accent and a subtle lift. */
.contact-title,
.email,
.text-link,
.scroll-link,
.footer-cta,
.footer-bottom a {
  transition:
    color 200ms ease,
    transform 200ms ease,
    border-color 200ms ease;
}
.email {
  display: inline-block;
}
@media (hover: hover) {
  .contact-title:hover,
  .email:hover,
  .text-link:hover,
  .scroll-link:hover,
  .footer-cta:hover,
  .footer-bottom a:hover {
    color: var(--control-hover);
    border-color: var(--control-hover);
    transform: translateY(-3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .contact-title:hover,
  .email:hover,
  .text-link:hover,
  .scroll-link:hover,
  .footer-cta:hover,
  .footer-bottom a:hover {
    transform: none;
  }
}

/* Hover movement lives on an inner layer so the orbit stays independent. */
.orbit-interaction {
  transition:
    transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 350ms ease;
  transform: perspective(500px) translate3d(0, 0, 0);
}
@media (hover: hover) and (pointer: fine) {
  .orbit-item {
    pointer-events: auto;
    cursor: default;
  }
  .orbit-item.is-hovered .orbit-interaction {
    transform: perspective(500px) translate3d(var(--hover-x, 0px), -8px, 0)
      rotateX(var(--hover-tilt-x, 0deg)) rotateY(var(--hover-tilt-y, 0deg))
      scale(1.08);
    filter: drop-shadow(0 8px 8px rgba(21, 17, 184, 0.12));
  }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-item.is-hovered .orbit-interaction {
    transform: none;
    filter: none;
  }
}

/* One accent photo print in the photography orbit. */
.orbit-accent .frame-image {
  background: #ed553e;
}
/* Project thumbnails and detail window. */
html {
  scrollbar-gutter: stable;
}
.project-is-open {
  overflow: hidden;
}
.project-open {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
}
.project-open .project-art {
  display: block;
  background: var(--paper) !important;
  color: var(--ink);
}
.project-open:hover .project-meta {
  color: var(--control-hover);
}
.thumb-single,
.thumb-triptych,
.thumb-collage {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.thumb-single > div {
  height: 100%;
}
.thumb-single img,
.thumb-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-triptych {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.thumb-triptych > div {
  min-width: 0;
  height: 100%;
}
.thumb-triptych img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-triptych .thumb-original img {
  object-fit: contain;
}
.thumb-echo {
  filter: blur(5px) brightness(0.7);
  transform: scale(1.08);
  opacity: 0.65;
}
.thumb-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.thumb-collage > div {
  min-height: 0;
  overflow: hidden;
}
.thumb-collage > div:first-child:nth-last-child(3) {
  grid-row: span 2;
}
.media-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px;
  text-align: center;
}
.media-placeholder span {
  font-size: clamp(12px, 2vw, 24px);
  font-weight: 700;
}
.media-placeholder small {
  font-size: 8px;
  letter-spacing: 1.5px;
  opacity: 0.6;
}
.thumb-collage > div:nth-child(even) .media-placeholder {
  background: #ed553e;
}
.media-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 30px;
  font-size: 11px;
}
.thumbnail-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border: 1px solid var(--paper);
  color: var(--paper);
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 3px;
  background: rgba(21, 17, 184, 0.25);
}
#project-dialog {
  width: min(1080px, calc(100% - 64px));
  max-height: 90svh;
  padding: 40px 60px 25px;
  border: 1px solid var(--ink);
  border-radius: 30px;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#project-dialog::backdrop {
  background: rgba(18, 15, 70, 0.32);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.project-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font: 26px/1 Arial;
  display: grid;
  place-items: center;
  z-index: 2;
}
#project-template-note {
  font-size: 8px;
  min-height: 10px;
  margin: 0 38px 20px 0;
}
.project-gallery {
  display: grid;
  gap: 16px;
  height: clamp(240px, 48svh, 540px);
}
.gallery-cell {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-cell img,
.gallery-cell video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.layout-single {
  grid-template-columns: 1fr;
}
.layout-single .format-portrait {
  width: auto;
  aspect-ratio: 2/3;
  height: 100%;
  justify-self: center;
}
.layout-single .video-cell.format-portrait {
  aspect-ratio: 9/16;
}
.layout-single .video-cell.format-landscape {
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 100%;
  justify-self: center;
}
.layout-duo {
  grid-template-columns: 1fr 1fr;
}
.layout-trio {
  grid-template-columns: 1fr 1.5fr;
  grid-template-rows: 1fr 1fr;
}
.layout-trio .gallery-cell:first-child {
  grid-row: span 2;
}
.layout-grid {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(0, 1fr);
}
.layout-sequence {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.video-cell {
  position: relative;
}
.video-cell iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-radius: 20px;
  padding: 18px 24px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.video-play > span:first-child {
  font-size: 28px;
  padding-left: 3px;
}
.video-play:disabled {
  opacity: 0.8;
  cursor: default;
}
.project-copy {
  margin-top: 25px;
}
.project-copy h2 {
  font: 900 clamp(24px, 3vw, 38px)/1.15 var(--font-display);
  letter-spacing: -1px;
  margin: 0 0 12px;
}
.project-copy p {
  font-size: 14px;
  line-height: 1.65;
  max-width: 760px;
  margin: 0;
  white-space: pre-line;
}
.project-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 25px;
  gap: 20px;
}
.project-nav {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font: 24px/1 Arial;
  display: grid;
  place-items: center;
}
#project-next {
  justify-self: end;
}
#project-counter {
  font-size: 12px;
}
@media (hover: hover) {
  .project-close:hover,
  .project-nav:hover,
  .video-play:not(:disabled):hover {
    background: var(--control-hover);
    color: var(--paper);
    border-color: var(--control-hover);
  }
}
@media (max-width: 760px) {
  #project-dialog {
    width: calc(100% - 24px);
    padding: 48px 18px 20px;
    border-radius: 22px;
    max-height: 92svh;
  }
  .project-gallery {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .gallery-cell {
    max-height: 55svh;
  }
  .gallery-cell img {
    height: auto;
    max-height: 55svh;
  }
  .gallery-cell .media-placeholder {
    min-height: 200px;
  }
  .layout-trio .gallery-cell:first-child {
    grid-row: auto;
  }
  .layout-single {
    height: 45svh;
  }
  .layout-single .gallery-cell {
    height: 100%;
    max-width: 100%;
  }
  .layout-single .video-cell.format-landscape {
    height: auto;
    align-self: center;
  }
  .project-copy h2 {
    font-size: 26px;
  }
  .project-copy p {
    font-size: 13px;
  }
  .thumb-collage .media-placeholder {
    padding: 6px;
    gap: 6px;
  }
  .thumb-collage .media-placeholder small {
    font-size: 6px;
  }
}
/* Keep the close control reachable while a long project is scrolled. */
.project-close {
  position: sticky;
  top: 0;
  float: right;
  margin-top: -26px;
  margin-right: -42px;
}
@media (max-width: 760px) {
  .project-close {
    margin-right: 0;
    margin-top: -34px;
  }
}

#project-dialog {
  overflow-x: hidden;
}
.project-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.project-toolbar .project-close {
  position: static;
  float: none;
  margin: 0;
}

/* Centre single media vertically within the gallery, preserving 16:9. */
.layout-single {
  place-items: center;
}
.layout-single .gallery-cell {
  align-self: center;
}
.layout-single .video-cell.format-landscape {
  width: min(100%, calc(clamp(240px, 48svh, 540px) * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  align-self: center;
}
.video-cell > img {
  object-fit: cover;
}
#project-youtube-link {
  margin-top: 12px;
  font-size: 11px;
}
#project-youtube-link[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .layout-single .video-cell.format-landscape {
    width: min(100%, calc(45svh * 16 / 9));
  }
}
/* Circular glass play button, matching the navigation controls. */
.video-play {
  width: 58px;
  height: 58px;
  padding: 0;
  gap: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--control-shadow);
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}
.video-play > span:first-child {
  font-size: 22px;
  line-height: 1;
  padding-left: 3px;
}
/* Keep the accessible label without a visible caption. */
.video-play > span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (hover: hover) {
  .video-play:not(:disabled):hover {
    background: #ed553e;
    border-color: #ed553e;
    color: #fff;
    box-shadow: var(--control-shadow);
  }
}
/* Project text follows the actual image/video edges at every viewport size. */
.project-copy {
  margin-left: var(--project-copy-left, 0px);
  margin-right: var(--project-copy-right, 0px);
  min-width: 0;
  overflow-wrap: anywhere;
}
#project-youtube-link {
  margin-left: var(--project-copy-left, 0px);
  max-width: calc(
    100% - var(--project-copy-left, 0px) - var(--project-copy-right, 0px)
  );
}

/* Scroll inside the rounded card only when content genuinely exceeds space. */
#project-dialog {
  padding: 0;
  max-height: 94svh;
  overflow: hidden;
}
.project-scroll {
  max-height: calc(94svh - 2px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 24px 60px;
  scrollbar-width: thin;
  /* Deckkraft im Ruhezustand: 40%. */
  --scrollbar-thumb: color-mix(in srgb, var(--ink) 40%, transparent);
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.project-scroll::-webkit-scrollbar {
  width: 3px;
}
.project-scroll::-webkit-scrollbar-track {
  margin-block: 26px;
  background: transparent;
}
.project-scroll::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 0;
  border-radius: 8px;
}
#project-template-note:empty {
  display: none;
}
.project-toolbar {
  margin-bottom: 12px;
}
.layout-single .video-cell.format-landscape {
  width: auto;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
}
@media (max-width: 760px) {
  .project-scroll {
    padding: 18px;
  }
  .layout-single .video-cell.format-landscape {
    width: 100%;
    height: auto;
    max-height: 100%;
  }
}

/* Stable single-media sizing: descriptions must never shrink the video. */
.project-gallery.layout-single {
  height: clamp(280px, 40svh, 540px);
}
.layout-single .video-cell.format-portrait {
  width: auto;
  height: 100%;
  min-width: 0;
  aspect-ratio: 9 / 16;
}
.project-copy h2 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
.project-copy p {
  overflow-wrap: break-word;
  word-break: normal;
}
@media (max-width: 760px) {
  .project-gallery.layout-single {
    height: clamp(240px, 40svh, 400px);
  }
}

/* Portrait projects use a centred, readable caption block. */
.portrait-project .project-copy {
  text-align: center;
}
.portrait-project .project-copy p {
  margin-left: auto;
  margin-right: auto;
}
/* Project links lift subtly while their thumbnail remains stable. */
.project-open .project-meta h2,
.project-open .project-meta > span {
  transition: transform 200ms ease, color 200ms ease;
}
@media (hover: hover) {
  .project-open:hover .project-meta h2,
  .project-open:hover .project-meta > span {
    transform: translateY(-3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-open:hover .project-meta h2,
  .project-open:hover .project-meta > span {
    transform: none;
  }
}

/* Lowlight: original proportions, read from left to right. */
.project-gallery.layout-lowlight {
  grid-template-columns: 1.351fr .667fr .574fr .667fr;
  align-items: center;
  height: auto;
}
.layout-lowlight .gallery-cell img {
  width: 100%;
  height: auto;
  max-height: none;
}
@media (max-width: 760px) {
  .project-gallery.layout-lowlight {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .layout-lowlight .gallery-cell {
    max-height: none;
  }
  .layout-lowlight .gallery-cell img {
    width: auto;
    max-width: 100%;
    max-height: 65svh;
  }
}

/* Leitbild oben, drei vollständige Porträts darunter. */
.project-gallery.layout-feature-trio {
  width: 100%;
  max-width: none;
  height: auto;
  margin-inline: auto;
  grid-template-columns: .667fr .574fr .667fr;
  gap: 12px;
  align-items: start;
}
.layout-feature-trio .gallery-cell:first-child {
  grid-column: 1 / -1;
}
.layout-feature-trio .gallery-cell {
  max-height: none;
}
.layout-feature-trio .gallery-cell img {
  width: 100%;
  height: auto;
  max-height: none;
}
.layout-feature-trio .media-placeholder {
  width: 100%;
  min-height: 0;
  aspect-ratio: 2 / 3;
}
.layout-feature-trio .gallery-cell:first-child .media-placeholder {
  aspect-ratio: 1.351 / 1;
}
@media (max-width: 760px) {
  .project-gallery.layout-feature-trio {
    width: 100%;
    gap: 8px;
  }
}

#project-dialog:has(.layout-feature-trio) .project-copy {
  width: 100%;
  max-width: none;
  margin-inline: auto;
}
@media (max-width: 760px) {
  #project-dialog:has(.layout-feature-trio) .project-copy {
    width: 100%;
  }
}

/* YouTube supplies landscape posters even for Shorts: fill the portrait centre. */
.thumb-youtube-portrait .thumb-original {
  overflow: hidden;
}
.thumb-youtube-portrait .thumb-original img {
  object-fit: cover;
  object-position: center;
}

/* Vector arrows have a geometric centre independent of font baselines. */
.project-nav {
  padding: 0;
}
.project-nav svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-media-group {
  position: relative;
}
@media (min-width: 761px) {
  .portrait-project #project-youtube-link {
    position: absolute;
    left: 0;
    bottom: 0;
    margin: 0;
    max-width: calc(50% - 170px);
  }
}
@media (max-width: 760px) {
  .portrait-project #project-youtube-link:not([hidden]) {
    display: table;
    margin: 12px auto 0;
    max-width: 100%;
    text-align: center;
  }
}

/* Mobile portrait posters fill their 9:16 frame, just like desktop. */
@media (max-width: 760px) {
  .project-gallery.layout-single:has(.video-cell.format-portrait) {
    height: clamp(300px, 52svh, 520px);
  }
  .layout-single .video-cell.format-portrait {
    height: 100%;
    max-height: none;
    max-width: 100%;
    width: auto;
    aspect-ratio: 9 / 16;
  }
  .layout-single .video-cell.format-portrait > img,
  .layout-single .video-cell.format-portrait > video,
  .layout-single .video-cell.format-portrait > iframe {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }
}

/* Centre the YouTube link only for portrait videos, on every screen size. */
.portrait-project #project-youtube-link:not([hidden]) {
  position: static;
  display: table;
  margin: 12px auto 0;
  max-width: 100%;
  text-align: center;
}

/* Compact footer after removing the large contact headline. */
footer {
  padding-top: 24px;
}
.footer-bottom {
  margin-top: 0;
}

/* The scroll viewport ends inside the corners; navigation is a separate row. */
#project-dialog[open] {
  display: flex;
  flex-direction: column;
  max-height: 94svh;
}
#project-dialog .project-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(94svh - 112px);
  margin: 24px 10px 0;
  padding: 0 50px 20px;
}
#project-dialog .project-navigation {
  flex: 0 0 auto;
  margin: 0;
  padding: 16px 60px 22px;
  background: var(--paper);
  position: relative;
  z-index: 4;
}
#project-dialog .project-toolbar {
  background: var(--paper);
}
@media (max-width: 760px) {
  #project-dialog .project-scroll {
    margin: 20px 8px 0;
    padding: 0 10px 16px;
    max-height: calc(94svh - 106px);
  }
  #project-dialog .project-navigation {
    padding: 14px 18px 20px;
  }
}

/* Beim Scrollen volle Deckkraft. */
.project-scroll.is-scrolling {
  --scrollbar-thumb: var(--ink);
}
@supports selector(::-webkit-scrollbar) {
  .project-scroll {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
}

/* Register the colour so the scrollbar can fade smoothly between states. */
@property --scrollbar-thumb {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(21, 17, 184, 0.4);
}
.project-scroll {
  transition: --scrollbar-thumb 450ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .project-scroll {
    transition: none;
  }
}

/* Portrait series: three, two, then one column, in source order. */
.project-gallery.layout-portrait-series {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  height: auto;
  gap: 20px;
}
.layout-portrait-series .gallery-cell {
  flex: 0 0 calc((100% - 40px) / 3);
  height: auto;
  max-height: none;
  aspect-ratio: 2 / 3;
}
.layout-portrait-series .gallery-cell img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: top center;
}
@media (max-width: 1000px) {
  .layout-portrait-series .gallery-cell {
    flex-basis: calc((100% - 20px) / 2);
  }
}
@media (max-width: 600px) {
  .layout-portrait-series .gallery-cell {
    flex-basis: 100%;
  }
}

/* Studio Food: three portraits, then two landscapes beside one portrait. */
.project-gallery.layout-studio-food {
  height: auto;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 16px;
  align-items: start;
}
.layout-studio-food .gallery-cell {
  grid-column: span 2;
  max-height: none;
}
.layout-studio-food .gallery-cell img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}
.layout-studio-food .gallery-cell:nth-child(4) {
  grid-column: 1 / 4;
  grid-row: 2;
}
.layout-studio-food .gallery-cell:nth-child(5) {
  grid-column: 4 / 7;
  grid-row: 2 / 4;
}
.layout-studio-food .gallery-cell:nth-child(6) {
  grid-column: 1 / 4;
  grid-row: 3;
}
@media (max-width: 600px) {
  .project-gallery.layout-studio-food {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .layout-studio-food .gallery-cell:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Opening the dialog must not draw Safari's automatic focus ring. */
#project-dialog:focus {
  outline: none;
}
#project-close:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ink);
}

/* Full-width images stacked on all screen sizes. */
.project-gallery.layout-stack {
  display: flex;
  flex-direction: column;
  height: auto;
  gap: 16px;
}
.layout-stack .gallery-cell {
  width: 100%;
  height: auto;
  max-height: none;
  flex: none;
}
.layout-stack .gallery-cell img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

/* One full-width lead image above two equally wide images. */
.project-gallery.layout-feature-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  width: 100%;
  height: auto;
  gap: 16px;
  align-items: start;
}
.layout-feature-duo .gallery-cell:first-child {
  grid-column: 1 / -1;
}
.layout-feature-duo .gallery-cell {
  width: 100%;
  height: auto;
  max-height: none;
}
.layout-feature-duo .gallery-cell img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}
#project-dialog:has(.layout-feature-duo) .project-copy {
  width: 100%;
  margin-inline: 0;
}

/* Give desktop/laptop project views breathing room on both sides. */
@media (min-width: 1001px) {
  .work-section {
    width: min(1120px, 80%);
    margin: 14px auto 0;
    padding-inline: clamp(24px, 3vw, 44px);
  }
  #project-dialog {
    width: min(1040px, 80vw);
  }
  .about-section {
    width: min(1120px, 80%);
    margin-inline: auto;
  }
}

/* Whillie: equal portrait frames, ordered left to right and top to bottom. */
.project-gallery.layout-fashion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: auto;
  gap: clamp(12px, 1.5vw, 20px);
  align-items: start;
}
.layout-fashion-grid .gallery-cell {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}
.layout-fashion-grid .gallery-cell img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 600px) {
  .project-gallery.layout-fashion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Vector icons retain the same appearance on Apple and other platforms. */
.inline-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  flex-shrink: 0;
}
.orbit-star {
  display: block;
  width: 1em;
  height: 1em;
}
@media (pointer: coarse) {
  .orbit-item { filter: none; }
}

/* Explicit geometry prevents Apple from substituting a play emoji. */
.play-icon { display: block; width: 24px; height: 24px; }
/* Touch feedback uses the same accent as desktop hover. */
@media (hover: none), (pointer: coarse) {
  .arrow:hover, .cv-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--ink);
    transform: none;
  }
  .category-tabs button[aria-selected="true"] {
    color: var(--control-hover);
  }
  .category-tabs button[aria-selected="true"]:after {
    background: var(--control-hover);
  }
  .dots button[aria-pressed="true"] {
    background: var(--control-hover);
    border-color: var(--control-hover);
  }
  :is(.arrow, .cv-link, .project-close, .project-nav, .video-play:not(:disabled)):is(:active, .touch-pressed) {
    background: var(--control-hover);
    border-color: var(--control-hover);
    color: var(--paper);
  }
  :is(.category-tabs button, .motion-toggle, .contact-title, .email, .text-link, .scroll-link):is(:active, .touch-pressed),
  .project-open:is(:active, .touch-pressed) .project-meta {
    color: var(--control-hover);
  }
  .dots button:is(:active, .touch-pressed) {
    background: var(--control-hover);
    border-color: var(--control-hover);
  }
}
