/* C030: Design portfolio stylesheet for design/index.html; 3D viewer rules are paired with C031 scripts/assets. */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1120px;
  --radius: 8px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

/* C003: Theme variables are selected by design/theme.js and shared menu theme controls. */
html[data-theme="light"] {
  --bg: #f7f5f2;
  --bg-elevated: #ffffff;
  --bg-muted: #efeeeb;
  --text: #111111;
  --text-muted: #68686d;
  --line: rgba(17, 17, 17, .11);
  --line-strong: rgba(17, 17, 17, .2);
  --accent: #E1192D;
  --accent-strong: #B91224;
  --accent-soft: rgba(225, 25, 45, .1);
}

html[data-theme="dark"] {
  --bg: #101010;
  --bg-elevated: #1b1b1d;
  --bg-muted: #242426;
  --text: #f5f5f7;
  --text-muted: #b8b8bf;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .24);
  --accent: #E1192D;
  --accent-strong: #B91224;
  --accent-soft: rgba(225, 25, 45, .13);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  line-height: 1.5;
  background:
    radial-gradient(circle at 8% 4%, color-mix(in srgb, var(--accent), transparent 80%), transparent 22rem),
    radial-gradient(circle at 92% 7%, color-mix(in srgb, var(--accent-strong), transparent 84%), transparent 24rem),
    var(--bg);
  color: var(--text);
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

::-moz-selection {
  background-color: #E1192D;
  color: #ffffff;
}

::selection {
  background-color: #E1192D;
  color: #ffffff;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  transform: translateY(-150%);
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  padding: .75rem 1rem;
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated), transparent 16%);
  backdrop-filter: blur(22px) saturate(1.35);
}

.nav-shell {
  width: min(100% - 2rem, var(--max-width));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
}

main {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(260px, .32fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.eyebrow,
.project-number {
  margin: 0;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
p,
figure {
  margin-top: 0;
}

h1 {
  max-width: 9ch;
  margin-bottom: 0;
  font-size: clamp(4rem, 13vw, 8rem);
  line-height: .9;
  letter-spacing: 0;
  text-transform: lowercase;
}

h2 {
  max-width: 14ch;
  margin: .35rem 0 0;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: .95;
  letter-spacing: -.045em;
}

.hero-copy {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: clamp(1.04rem, 2vw, 1.22rem);
}

.project-list {
  display: grid;
  gap: clamp(5rem, 11vw, 9rem);
}

/* C030: Project cards, media frames, notes, and reveal states match the design/index.html project-list. */
.project {
  min-width: 0;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

.project-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .5fr);
  gap: 2rem;
  align-items: end;
}

.project-summary {
  max-width: 42ch;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.project-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.project-text {
  max-width: 72ch;
  color: var(--text-muted);
  font-size: 1.04rem;
}

.project-text p {
  margin-bottom: 0;
}

.project-text p + p {
  margin-top: 1rem;
}

.download-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elevated), transparent 10%);
  color: var(--text);
  font-size: .86rem;
  font-weight: 800;
  padding: .62rem .82rem;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.download-link:hover,
.download-link:focus-visible {
  border-color: var(--line-strong);
  background: var(--bg-muted);
  color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated), transparent 12%);
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 760;
  padding: .46rem .7rem;
}

.media-frame,
.round-icon-stage,
.gallery-stage,
.gallery-thumbnail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elevated), transparent 4%);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-pair {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(320px, .48fr);
  gap: 1rem;
}

.round-icon-stage {
  min-height: 34rem;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, #8b76bd, transparent 44%), transparent 37%),
    linear-gradient(145deg, #171719, #09090a 58%, #4e4565);
  padding: clamp(2rem, 8vw, 6rem);
}

.round-icon-image {
  width: min(100%, 30rem);
  height: auto;
  filter: drop-shadow(0 34px 55px rgba(0, 0, 0, .36));
}

.media-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(0, 0, 0, .4);
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  font-weight: 760;
  padding: .42rem .68rem;
  backdrop-filter: blur(12px);
}

.phone-frame {
  min-height: 34rem;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.phone-frame::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 0;
  width: min(76%, 300px);
  height: 82%;
  border-radius: 38px;
  background: rgba(0, 0, 0, .18);
  filter: blur(24px);
  opacity: .72;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.phone-frame img {
  position: relative;
  z-index: 1;
  width: min(100%, 27rem);
  height: auto;
  max-width: 100%;
  max-height: 44rem;
  object-fit: contain;
}

.project-split {
  grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 6.5rem);
}

.project-copy {
  max-width: 40rem;
}

.project-copy .project-summary {
  margin: 1.4rem 0;
}

.project-copy > p:not(.project-number):not(.project-summary) {
  color: var(--text-muted);
}

.project-copy .tool-list {
  margin-top: 1.6rem;
}

.phone-art {
  min-height: 42rem;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.phone-art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 0;
  width: min(78%, 330px);
  height: 82%;
  border-radius: 38px;
  background: rgba(0, 0, 0, .2);
  filter: blur(26px);
  opacity: .74;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.phone-art img {
  position: relative;
  z-index: 1;
  width: auto;
  max-height: 45rem;
  object-fit: contain;
}

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

.logo-card {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(18rem, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(1rem, 4vw, 3rem);
}

.logo-card-light {
  background: #ffffff;
}

.logo-card-dark {
  background: #030303;
}

.logo-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 740;
  padding: .85rem 1rem;
}

.logo-card figcaption span {
  color: var(--accent);
}

.logo-source-elements {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, .55fr);
  gap: 1rem;
  margin-top: 1rem;
}

.logo-source-item {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(14rem, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 12%, color-mix(in srgb, #173f88, transparent 42%), transparent 18rem),
    linear-gradient(145deg, #071020, #030303 64%);
}

.logo-source-item img {
  align-self: center;
  justify-self: center;
  width: min(100% - 2rem, 32rem);
  height: auto;
  max-height: 16rem;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .38));
}

.logo-source-sparkle img {
  width: auto;
  max-width: min(100% - 2rem, 11rem);
  max-height: 18rem;
}

.logo-source-item figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .42);
  color: rgba(255, 255, 255, .72);
  font-size: .82rem;
  font-weight: 740;
  padding: .85rem 1rem;
}

.logo-source-item figcaption span {
  color: #ffffff;
}

/* C032: Website comparison slides use native horizontal scrolling so each complete pair stays synchronized. */
.website-comparison {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.website-comparison-nav,
.website-slide-heading,
.website-state-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.website-comparison-choices,
.website-comparison-arrows {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.website-comparison-choices {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.website-comparison-choices::-webkit-scrollbar,
.website-comparison-viewport::-webkit-scrollbar {
  display: none;
}

.website-comparison-choices button,
.website-comparison-arrows button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated), transparent 8%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 800;
  padding: .62rem .86rem;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.website-comparison-choices button:hover,
.website-comparison-choices button:focus-visible,
.website-comparison-arrows button:hover,
.website-comparison-arrows button:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
  outline: none;
  transform: translateY(-1px);
}

.website-comparison-choices button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.website-comparison-arrows button {
  width: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.1rem;
}

.website-comparison-viewport {
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
}

.website-comparison-viewport:focus-visible {
  border-radius: calc(var(--radius) + 2px);
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 42%);
  outline-offset: 5px;
}

.website-comparison-track {
  display: flex;
  align-items: stretch;
}

.website-comparison-slide {
  min-width: 0;
  flex: 0 0 100%;
  display: grid;
  gap: 1rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.website-slide-heading {
  align-items: end;
}

.website-slide-heading h3 {
  margin: .2rem 0 0;
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -.03em;
}

.website-slide-kicker {
  margin: 0;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.website-slide-heading > a {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: .2em;
}

.website-slide-heading > a:hover,
.website-slide-heading > a:focus-visible {
  color: var(--accent);
  outline: none;
}

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

.website-state-card {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elevated), transparent 4%);
}

.website-state-card figcaption {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: .78rem;
  font-weight: 820;
  padding: .72rem .85rem;
}

.website-state-card figcaption span {
  color: var(--accent);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.website-state-card figcaption small {
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 680;
  text-align: right;
}

.website-browser-frame,
.website-placeholder {
  aspect-ratio: 1440 / 1000;
}

.website-browser-frame {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr);
  background: #d9d9dc;
}

.website-browser-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #e8e8ea;
  color: #68686d;
  padding: 0 .65rem;
}

.website-browser-bar i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a6a6aa;
}

.website-browser-bar span {
  min-width: 0;
  margin-left: .3rem;
  overflow: hidden;
  font-size: .58rem;
  font-style: normal;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.website-browser-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
}

.website-browser-scroll {
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: var(--accent) rgba(17, 17, 17, .12);
  scrollbar-width: thin;
  touch-action: pan-y;
}

.website-browser-scroll:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 36%);
  outline-offset: -3px;
}

.website-browser-scroll img {
  height: auto;
  min-height: 100%;
  object-fit: initial;
}

.website-state-card.is-expandable {
  cursor: zoom-in;
}

.website-preview-open {
  position: absolute;
  right: .65rem;
  top: 38px;
  z-index: 3;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(9, 13, 20, .76);
  color: #ffffff;
  cursor: zoom-in;
  font-size: .68rem;
  font-weight: 820;
  padding: .45rem .7rem;
  backdrop-filter: blur(12px);
}

.website-preview-open:hover,
.website-preview-open:focus-visible {
  background: var(--accent);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

html.website-preview-open,
html.website-preview-open body {
  overflow: hidden;
}

.website-preview-modal[hidden] {
  display: none;
}

.website-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(.5rem, 2vw, 1.5rem);
}

.website-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 8, .82);
  backdrop-filter: blur(14px);
}

.website-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1500px);
  height: min(94dvh, 1000px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elevated);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .46);
}

.website-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: .8rem 1rem;
}

.website-preview-heading p {
  margin: 0 0 .15rem;
  color: var(--accent);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.website-preview-heading h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.8rem);
  line-height: 1;
  letter-spacing: -.025em;
}

.website-preview-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text);
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
}

.website-preview-close:hover,
.website-preview-close:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  outline: none;
}

.website-preview-browser {
  min-height: 0;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  overflow: hidden;
  background: #d9d9dc;
}

.website-preview-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--accent) rgba(17, 17, 17, .16);
  scrollbar-width: thin;
  background: #ffffff;
}

.website-preview-scroll:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 30%);
  outline-offset: -3px;
}

.website-preview-scroll img {
  width: max(100%, 900px);
  height: auto;
  max-width: none;
}

.website-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .65rem;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, transparent 0 48%, color-mix(in srgb, var(--accent), transparent 90%) 48% 52%, transparent 52% 100%),
    radial-gradient(circle at 20% 16%, color-mix(in srgb, var(--accent), transparent 76%), transparent 44%),
    var(--bg-muted);
  color: var(--text);
  padding: clamp(1.25rem, 4vw, 3rem);
  text-align: center;
}

.website-placeholder::before {
  content: "";
  position: absolute;
  inset: 10%;
  z-index: -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.website-placeholder > span {
  color: var(--accent);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.website-placeholder strong {
  max-width: 14ch;
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  line-height: 1;
  letter-spacing: -.035em;
}

.website-placeholder small {
  max-width: 34ch;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 680;
}

.website-placeholder-secure {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(48, 151, 191, .1) 48% 52%, transparent 52% 100%),
    radial-gradient(circle at 20% 16%, rgba(48, 151, 191, .24), transparent 44%),
    var(--bg-muted);
}

.website-placeholder-secure > span {
  color: #3097bf;
}

.mirrorsex-media {
  min-height: clamp(14rem, 28vw, 22rem);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(204, 195, 177, .14), transparent 44%),
    linear-gradient(145deg, #343230, #151515 62%, #050505);
  padding: clamp(1.5rem, 5vw, 4rem);
}

.mirrorsex-media img {
  width: min(100%, 62rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 42px rgba(0, 0, 0, .34));
}

.wide-media {
  position: relative;
  aspect-ratio: 16 / 9;
}

/* C030: Gallery active/change classes are controlled by design/script.js. */
.visualizer-gallery {
  min-width: 0;
}

.gallery-stage {
  aspect-ratio: 16 / 9;
  background: #07121c;
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-stage img.is-changing {
  animation: gallery-change .32s var(--ease-out) both;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  padding: .55rem 0;
}

.gallery-dot {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.gallery-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: .58rem;
  height: .58rem;
  border-radius: inherit;
  background: color-mix(in srgb, var(--text-muted), transparent 45%);
  transform: translate(-50%, -50%);
  transition: background .2s ease, transform .2s ease;
}

.gallery-dot:hover,
.gallery-dot:focus-visible {
  outline: 2px solid transparent;
}

.gallery-dot:hover::after,
.gallery-dot:focus-visible::after {
  transform: translate(-50%, -50%) scale(1.25);
}

.gallery-dot.is-active::after {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.18);
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.gallery-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  border-color: transparent;
  padding: 0;
  cursor: pointer;
  opacity: .58;
  transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbnail:hover,
.gallery-thumbnail:focus-visible,
.gallery-thumbnail.is-active {
  border-color: var(--accent);
  opacity: 1;
  outline: none;
  transform: translateY(-2px);
}

.trailer-project {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}

.trailer-media {
  aspect-ratio: 4 / 3;
}

.vision-keyboard-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 1rem;
  align-items: stretch;
}

.model-showcase-single {
  min-width: 0;
  display: grid;
}

.model-showcase-single .model-viewer {
  aspect-ratio: 16 / 8;
}

.work-light-showcase .model-viewer {
  aspect-ratio: 16 / 7;
}

.storage-container-layout {
  display: grid;
  grid-template-columns: minmax(300px, .86fr) minmax(280px, .64fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.storage-container-layout .project-notes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.storage-container-layout .project-text {
  max-width: 46ch;
}

.storage-container-showcase .model-viewer {
  aspect-ratio: 4 / 3;
}

/* C031: 3D viewer surfaces are initialized by design/vision-model.js from data-model-* attributes. */
.model-viewer {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 28% 20%, color-mix(in srgb, var(--accent), transparent 82%), transparent 24rem),
    linear-gradient(145deg, color-mix(in srgb, var(--bg-muted), #000000 6%), color-mix(in srgb, var(--bg-elevated), #000000 9%));
  aspect-ratio: 16 / 10;
}

.model-viewer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.model-viewer canvas {
  display: block;
  cursor: grab;
  touch-action: none;
}

.model-viewer canvas:active {
  cursor: grabbing;
}

.model-status,
.model-reset,
.model-motion {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(0, 0, 0, .48);
  color: rgba(255, 255, 255, .84);
  font-size: .72rem;
  font-weight: 760;
  backdrop-filter: blur(12px);
}

.model-status {
  left: 50%;
  top: 50%;
  margin: 0;
  padding: .42rem .68rem;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.model-viewer.is-loaded .model-status {
  opacity: 0;
  pointer-events: none;
}

.model-viewer.has-error .model-status {
  opacity: 1;
}

.model-reset,
.model-motion {
  right: 1rem;
  bottom: 1rem;
  padding: .42rem .72rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: background .2s ease, opacity .2s ease, transform .2s ease;
}

.model-motion {
  left: 1rem;
  right: auto;
}

.model-viewer.is-loaded .model-reset,
.model-viewer.is-loaded .model-motion {
  opacity: 1;
  pointer-events: auto;
}

.model-reset:hover,
.model-reset:focus-visible,
.model-motion:hover,
.model-motion:focus-visible {
  background: rgba(0, 0, 0, .64);
  outline: 2px solid rgba(255, 255, 255, .78);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.model-viewer:focus-within {
  border-color: color-mix(in srgb, var(--accent), #ffffff 20%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 40%);
}

.model-viewer canvas:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: -4px;
}

.vision-keyboard-photo {
  margin: 0;
  min-height: 0;
  height: 100%;
}

.youtube-media {
  display: block;
  transition: transform .22s var(--ease-out), border-color .2s ease, box-shadow .2s ease;
}

.youtube-media::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #ff0033;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .42);
  opacity: .98;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.youtube-media::before {
  content: "";
  position: absolute;
  left: calc(50% + .12rem);
  top: 50%;
  z-index: 1;
  width: 0;
  height: 0;
  border-top: .62rem solid transparent;
  border-bottom: .62rem solid transparent;
  border-left: .92rem solid #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.youtube-media img {
  transition: transform .4s var(--ease-out);
}

.youtube-media:hover,
.youtube-media:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .2);
  outline: none;
  transform: translateY(-3px);
}

.youtube-media:hover img,
.youtube-media:focus-visible img {
  transform: scale(1.018);
}

.site-footer {
  width: min(100% - 2rem, var(--max-width));
  margin: clamp(5rem, 12vw, 9rem) auto 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--text-muted);
  font-size: .9rem;
}

@keyframes gallery-change {
  from {
    opacity: .25;
    transform: scale(.992);
  }

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

@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    opacity: 0;
    transform: translateY(20px);
    animation: design-rise .72s var(--ease-out) both;
  }

  .hero > *:nth-child(2) {
    animation-delay: .12s;
  }

  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .72s var(--ease-out), transform .72s var(--ease-out);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes design-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

@media (max-width: 900px) {
  .hero,
  .project-heading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-pair {
    grid-template-columns: minmax(0, .82fr) minmax(280px, .48fr);
  }

  .round-icon-stage,
  .phone-frame {
    min-height: 28rem;
  }

  .project-split,
  .trailer-project {
    grid-template-columns: minmax(220px, .65fr) minmax(0, 1fr);
    gap: 2.5rem;
  }

  .phone-art {
    min-height: 34rem;
  }
}

@media (max-width: 700px) {
  .project-heading,
  .project-notes,
  .project-split,
  .trailer-project,
  .storage-container-layout,
  .vision-keyboard-showcase {
    grid-template-columns: 1fr;
  }

  .project-split > figure {
    order: 2;
  }

  .project-split .project-copy {
    order: 1;
  }

  .media-pair {
    grid-template-columns: 1fr;
  }

  .round-icon-stage {
    min-height: auto;
    aspect-ratio: 1;
  }

  .phone-frame {
    min-height: 30rem;
  }

  .logo-comparison {
    grid-template-columns: 1fr;
  }

  .logo-source-elements {
    grid-template-columns: 1fr;
  }

  .website-state-pair {
    grid-template-columns: 1fr;
  }

  .logo-card {
    grid-template-rows: minmax(15rem, 1fr) auto;
  }

  .model-viewer,
  .vision-keyboard-photo {
    min-height: auto;
  }

  .work-light-showcase .model-viewer {
    aspect-ratio: 16 / 10;
  }

  .storage-container-showcase .model-viewer {
    aspect-ratio: 16 / 10;
  }

  .vision-keyboard-photo {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  main,
  .site-footer {
    width: min(100% - 1.25rem, var(--max-width));
  }

  .nav-shell {
    min-height: auto;
    flex-wrap: wrap;
    padding: .75rem 0;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3.6rem, 20vw, 6rem);
  }

  .project-list {
    gap: 5rem;
  }

  .phone-art {
    min-height: 31rem;
  }

  .gallery-thumbnails {
    gap: .35rem;
  }

  .website-comparison-nav,
  .website-slide-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .website-comparison-choices {
    width: 100%;
    padding-bottom: .15rem;
  }

  .website-comparison-arrows {
    align-self: flex-end;
  }

  .website-slide-heading > a {
    overflow-wrap: anywhere;
  }

  .website-preview-modal {
    padding: .35rem;
  }

  .website-preview-dialog {
    width: calc(100vw - .7rem);
    height: calc(100dvh - .7rem);
  }

  .website-preview-heading {
    padding: .65rem .75rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }

  .gallery-stage img.is-changing {
    animation: none;
  }

  .website-comparison-viewport {
    scroll-behavior: auto;
  }
}
