/* Project covers and the homepage career trail. */

/* Open app features sit apart from the smaller project covers. */

.portfolio-grid .embrace-feature,
.portfolio-grid .record-feature {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  isolation: isolate;
}

.portfolio-grid .embrace-feature {
  grid-template-columns: minmax(0,.84fr) minmax(0,1.16fr);
  align-items: center;
  gap: 2%;
  /* The toolbar rule sits directly above this tier, so it borrows that line instead of drawing a second one. */
  margin: 8px 0 24px;
  padding-top: 16px;
}

.embrace-story {
  position: relative;
  z-index: 2;
  padding: 24px 0;
}

.embrace-story .work-meta,.record-story .work-meta {
  width: 100%;
  color: var(--muted);
  font: 12px/1.5 var(--font-mono);
  margin-bottom: 24px;
  gap: 24px;
}

.iris-home .embrace-project,.iris-home .record-project {
  color: var(--ink);
  font: 500 var(--t-h3)/var(--lh-heading) var(--font-display);
  letter-spacing: -.03em;
  margin: 0 0 16px;
}

/* Both feature headlines share one size; the serif accent is 1em of its line. */

.embrace-headline,.record-headline {
  font: 500 clamp(32px,3vw,42px)/var(--lh-heading) var(--font-display);
  letter-spacing: -.04em;
  text-wrap: balance;
  margin: 0 0 24px;
}

.embrace-headline em,.record-headline em {
  font-family: var(--font-serif);
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: var(--track-serif);
  color: var(--accent);
}

.embrace-summary,.record-summary {
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--muted);
  max-width: 460px;
  margin: 0;
}

.embrace-note {
  margin: 32px 0;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--accent);
}

.embrace-note>span {
  font: 12px var(--font-mono);
  color: var(--accent);
}

.embrace-note p {
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0;
  color: var(--muted);
}

.embrace-note p>span {
  opacity: .45;
  margin-inline: 5px;
}

.work-card .feature-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  height: auto;
  width: auto;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
}

.feature-link-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: background-color var(--t-fast) var(--ease-out),color var(--t-fast) var(--ease-out),transform var(--t-slow) var(--ease);
}

.feature-link-arrow svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.feature-link:hover .feature-link-arrow {
  background: var(--accent);
  color: var(--accent-ink);
  transform: rotate(45deg);
}

.embrace-stage {
  position: relative;
  min-width: 0;
  padding-top: 24px;
}

.embrace-stage .device-gallery {
  height: 570px;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--gallery-ink);
}

.embrace-stage .device-gallery::before {
  inset: 10% -3% 2%;
  border-radius: 50%;
  background: radial-gradient(ellipse,var(--gallery-halo),transparent 68%);
}

.embrace-stage .gallery-orbit {
  width: 90%;
  height: auto;
  aspect-ratio: 1;
  border-color: var(--gallery-line);
  transform: translate(-50%,-40%) rotate(-12deg) scaleY(.43);
}

.embrace-stage .gallery-kicker {
  top: 36px;
  right: 5%;
  left: auto;
  font-size: 17px;
}

.embrace-stage .gallery-signature {
  bottom: 5px;
  right: 4%;
}

.embrace-stage .gallery-phone {
  width: 32%;
  max-width: 245px;
}

/* A floating record, a detached control strip, and a small credit note. */

.portfolio-grid .record-feature {
  grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr);
  gap: 5%;
  align-items: center;
  margin: 0 0 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.record-story {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 16px 0;
}

.record-credits {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  width: 100%;
  padding: 24px;
  margin: 24px 0 24px -4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transform: rotate(-1.5deg);
  box-shadow: var(--shadow-sm);
}

.record-credits::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 43%;
  width: 48px;
  height: 13px;
  background: color-mix(in srgb,var(--accent) 13%,var(--paper));
  transform: rotate(5deg);
}

.record-credits dt {
  font: 12px/1.6 var(--font-mono);
  color: var(--muted);
  margin-bottom: 8px;
}

.record-credits dd {
  font-size: 14px;
  margin: 0;
}

.record-press {
  display: flex;
  gap: 4px 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: var(--t-caption);
  color: var(--ink);
}

.record-press>span {
  color: var(--muted);
}

.record-press a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  transition: color var(--t-fast) var(--ease-out);
}

.record-press a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.record-player {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  position: relative;
}

.record-player-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 12px/1.5 var(--font-mono);
  color: var(--muted);
  margin-bottom: 16px;
}

.record-turntable {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.18;
  margin-bottom: 24px;
}

.record-turntable::before {
  content: '';
  position: absolute;
  inset: 3% -3% 0;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(ellipse,color-mix(in srgb,var(--accent-soft) 75%,transparent),transparent 67%);
}

.record-backdrop {
  position: absolute;
  right: 0;
  top: -4%;
  z-index: -1;
  font: italic 400 clamp(85px,10.5vw,155px)/1 var(--font-serif);
  letter-spacing: var(--track-serif);
  color: var(--accent);
  opacity: .12;
}

.vinyl-platter {
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  left: 1%;
  top: 7%;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--line-strong),0 0 0 5px #1b1714,6px 22px 30px #150e0a38;
}

.vinyl-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: repeating-radial-gradient(circle at center,#161311 0 2px,#38322c 2.5px 3px,#1b1815 3.5px 5px);
  animation: vinyl-spin 15s linear infinite;
  animation-play-state: paused;
}

.vinyl-disc::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 15deg,transparent 0 25deg,#fdfbf617 50deg,transparent 76deg 197deg,#fdfbf610 220deg,transparent 251deg);
  pointer-events: none;
}

.vinyl-label {
  position: relative;
  width: 43%;
  aspect-ratio: 1;
  border-radius: 50%;
  /* The label is the one cool note in the portfolio. */
  background: #5fb0a7;
  box-shadow: 0 0 0 1px #9fd3cc80,0 0 0 9px #0c0a0959;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4%;
  gap: 10px;
  rotate: -14deg;
}

.vinyl-label img {
  width: 100%;
  height: auto;
  transform: translateY(-6px);
}

.vinyl-label>span {
  font: 500 8px/1.4 var(--font-mono);
  color: #0f2b27;
  text-align: center;
  white-space: nowrap;
}

.vinyl-spindle {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  translate: -50% -50%;
  border-radius: 50%;
  background: #d9d1c5;
  box-shadow: 0 0 0 2px #1b1714;
}

/* One proportional coordinate system keeps the stylus in the grooves at every size. */

.tonearm {
  position: absolute;
  right: 6%;
  top: 8%;
  width: 5%;
  height: 65%;
  transform-origin: 50% 4%;
  transform: rotate(-6deg);
  transition: transform .72s cubic-bezier(.45,0,.2,1);
  z-index: 4;
}

.tonearm-pivot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,#cfc6b8 0 16%,#3b342e 20% 35%,#8b8176 39% 45%,#231e1a 50%);
  box-shadow: 2px 3px 6px #0f0b0855;
}

.tonearm-shaft {
  position: absolute;
  top: 7%;
  left: 38%;
  width: 24%;
  height: 78%;
  border-radius: 3px;
  background: linear-gradient(90deg,#998c75,#e3d8bb 45%,#78674e);
  box-shadow: 3px 0 4px #0f0b0825;
}

.tonearm-head {
  position: absolute;
  top: 81%;
  left: 22%;
  width: 56%;
  height: 15%;
  border: 1px solid #8b8176;
  border-radius: 3px;
  background: linear-gradient(90deg,#2b2521,#4a413a);
}

.tonearm-stylus {
  position: absolute;
  width: 3px;
  height: 5px;
  left: 50%;
  bottom: -3px;
  translate: -50% 0;
  background: #e8e0d4;
  border-radius: 1px;
}

.record-feature.is-record-engaged .tonearm {
  transform: rotate(32deg);
}

.record-feature.is-record-reset .tonearm {
  transition: none;
}

.turntable-signature {
  position: absolute;
  bottom: 0;
  left: 2%;
  right: 3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 11px var(--font-mono);
  color: var(--muted);
}

.turntable-light {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background-color var(--t-base) var(--ease-out),box-shadow var(--t-base) var(--ease-out);
}

/* The listening panel is a dark plate: same tokens in both themes, apricot focus ring. */

.record-listening {
  --focus-ring: var(--dark-band-accent);
  display: none;
  padding: 16px;
  border-radius: var(--radius);
  color: var(--dark-band-ink);
  background: var(--dark-band);
  box-shadow: var(--shadow-sm);
}

.audio-ready .record-listening {
  display: block;
}

.record-tracklist {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}

.record-sample {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 6px;
  min-width: 0;
  min-height: 80px;
  overflow: hidden;
  padding: 12px 12px 24px;
  border: 1px solid var(--dark-band-line);
  border-radius: var(--radius-sm);
  color: var(--dark-band-ink);
  background: color-mix(in srgb,var(--dark-band-ink) 3%,transparent);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease-out),border-color var(--t-fast) var(--ease-out),color var(--t-fast) var(--ease-out);
}

.record-track-number {
  font: 12px var(--font-mono);
  color: var(--dark-band-muted);
}

.record-sample .yb-clip-label {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  grid-column: 1;
  grid-row: 2;
}

/* yo-b.js swaps the glyph text; the icon is drawn here so it never depends on font coverage. */

.record-sample .sample-play {
  grid-column: 2;
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  font-size: 0;
  color: var(--dark-band-accent);
}

.record-sample .sample-play::before {
  content: '';
  width: 9px;
  height: 11px;
  background: currentColor;
  clip-path: polygon(0 0,100% 50%,0 100%);
}

.record-sample.is-playing .sample-play::before {
  clip-path: none;
  background: linear-gradient(90deg,currentColor 0 3px,transparent 3px 6px,currentColor 6px);
}

.record-sample .yb-clip-wave {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 7px;
  display: flex;
  gap: 2px;
  align-items: end;
  opacity: .4;
}

.record-sample .yb-clip-wave i {
  display: block;
  flex: 1;
  min-width: 0;
  max-width: 5px;
  background: currentColor;
  transform-origin: bottom;
}

.record-sample:hover:not(:disabled) {
  background: color-mix(in srgb,var(--dark-band-accent) 10%,transparent);
  border-color: color-mix(in srgb,var(--dark-band-accent) 55%,var(--dark-band-line));
}

.record-sample:disabled {
  cursor: wait;
}

.record-sample:disabled:not(.is-selected) {
  opacity: .45;
}

.record-sample.is-selected {
  border-color: var(--dark-band-accent);
}

.record-sample.is-playing {
  background: var(--dark-band-accent);
  color: var(--dark-band);
  border-color: var(--dark-band-accent);
}

.record-sample.is-playing .sample-play,.record-sample.is-playing .record-track-number {
  color: var(--dark-band);
}

.record-readout {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin: 12px 2px 0;
  color: var(--dark-band-ink);
  font-size: 12px;
  line-height: 1.6;
}

.record-readout>span:first-child::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dark-band-muted);
  margin: 0 8px 2px 0;
}

.record-readout>span:last-child {
  color: var(--dark-band-muted);
  text-align: right;
}

.record-permission {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 16px 0 0;
  text-align: center;
}

.record-feature.is-playing-record .turntable-light {
  background: var(--accent);
  box-shadow: 0 0 9px color-mix(in srgb,var(--accent) 60%,transparent);
}

.record-feature.is-playing-record [data-record-status]::before {
  background: var(--dark-band-accent);
}

.iris-motion-on .record-feature.is-playing-record .vinyl-disc {
  animation-play-state: running;
}

.iris-motion-on .record-sample.is-playing .yb-clip-wave i {
  animation: record-wave .55s ease-in-out infinite alternate;
}

.iris-motion-on .record-feature.is-filtering,.iris-motion-on .embrace-feature.is-filtering {
  animation: iris-fade .6s var(--ease) both;
}

@keyframes vinyl-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes record-wave {
  from {
    transform: scaleY(.3);
  }
  to {
    transform: scaleY(1);
  }
}

@media(max-width:1100px) {
  .record-credits {
    padding: 16px;
    gap: 12px 16px;
  }
  .record-sample {
    padding-inline: 8px;
  }
  .record-sample .yb-clip-label {
    font-size: 12px;
  }
  .embrace-stage .device-gallery {
    height: 540px;
  }
  .embrace-stage .gallery-kicker {
    top: 55px;
  }
  .embrace-note p>span {
    display: block;
    height: 3px;
    visibility: hidden;
  }
}

@media(max-width:900px) {
  .portfolio-grid .embrace-feature {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .embrace-story {
    max-width: 600px;
  }
  .embrace-headline,.record-headline {
    font-size: clamp(32px,4.8vw,42px);
  }
  .embrace-summary {
    max-width: 540px;
  }
  .embrace-note p>span {
    display: inline;
    height: auto;
    visibility: visible;
  }
  .embrace-stage {
    padding-top: 0;
    margin-top: 25px;
  }
  .embrace-stage .device-gallery {
    height: 560px;
    max-width: 700px;
    margin-inline: auto;
  }
  .embrace-stage .gallery-kicker {
    top: 35px;
  }
  .portfolio-grid .record-feature {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .record-story {
    grid-column: 1;
    grid-row: 1;
    max-width: 600px;
  }
  .record-player {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 620px;
    margin: auto;
  }
  .record-credits {
    max-width: 490px;
    margin-left: 0;
  }
  .record-backdrop {
    font-size: clamp(100px,19vw,160px);
  }
}

@media(max-width:560px) {
  .embrace-story {
    padding: 10px 0;
  }
  .embrace-headline,.record-headline {
    font-size: clamp(28px,7.4vw,36px);
  }
  .embrace-summary,.record-summary {
    font-size: 15px;
  }
  .embrace-note {
    margin: 24px 0;
  }
  .embrace-note p>span {
    display: block;
    height: 3px;
    visibility: hidden;
  }
  .embrace-stage .device-gallery {
    height: 410px;
  }
  .embrace-stage .gallery-kicker {
    top: 17px;
    right: 0;
    font-size: 15px;
  }
  .embrace-stage .gallery-signature {
    right: 0;
    bottom: 0;
  }
  .embrace-stage .gallery-phones {
    inset: 30px 0 45px;
  }
  .embrace-stage .gallery-phone {
    width: 32%;
  }
  .portfolio-grid .record-feature {
    padding-top: 32px;
  }
  .record-credits {
    gap: 12px 16px;
    padding: 16px;
  }
  .record-credits dd {
    font-size: 13px;
  }
  .record-player-heading {
    font-size: 11px;
  }
  .record-backdrop {
    font-size: 25vw;
  }
  .vinyl-label {
    gap: 4px;
  }
  .vinyl-label img {
    transform: translateY(-3px);
  }
  .vinyl-label>span {
    font-size: 6px;
  }
  .turntable-signature {
    font-size: 10px;
  }
  .record-listening {
    padding: 8px;
  }
  .record-tracklist {
    gap: 6px;
  }
  .record-sample {
    padding: 8px 8px 24px;
    gap: 8px 4px;
  }
  .record-sample .yb-clip-wave {
    left: 8px;
    right: 8px;
    gap: 1px;
  }
  .record-readout {
    flex-wrap: wrap;
    gap: 2px 12px;
  }
}

@media(max-width:360px) {
  .embrace-stage .device-gallery {
    height: 370px;
  }
  .record-credits {
    grid-template-columns: 1fr;
  }
  .record-credits div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 12px;
  }
  .record-credits dt {
    margin-bottom: 0;
  }
  .record-sample {
    padding-inline: 6px;
  }
  .vinyl-label>span {
    font-size: 5px;
  }
}

/* The career trail connects roles without implying they were all sequential. */

.experience-section {
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
  gap: 6%;
}

.career-map {
  margin-top: 32px;
  max-width: 400px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.career-map-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 12px var(--font-mono);
  color: var(--muted);
}

.career-map-label {
  font-family: var(--font-body);
  font-style: italic;
}

.career-map-lines {
  height: 110px;
  margin: 16px 0 8px;
}

.career-map-lines svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.career-map-lines path {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
}

.career-map-lines path:nth-child(2) {
  opacity: .45;
}

.career-map-lines path:nth-child(3) {
  opacity: .25;
}

.career-map-lines circle {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 2;
}

.career-map-lines circle:last-child {
  fill: var(--accent);
}

.career-map-key {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

.career-map-key span::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
}

.career-map-key span:nth-child(2)::before {
  opacity: .55;
}

.career-map-key span:nth-child(3)::before {
  opacity: .3;
}

.iris-motion-on .is-visible .career-map-lines path {
  animation: career-draw 1.8s var(--ease) both;
}

@keyframes career-draw {
  from {
    stroke-dashoffset: 600;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.career-trail {
  position: relative;
  padding-left: 27px;
}

.career-trail::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 45px;
  left: 0;
  width: 1px;
  background: linear-gradient(var(--accent),var(--line) 55%,transparent);
}

.career-trail .career-chapter {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 24px;
  margin-bottom: 12px;
}

.chapter-node {
  position: absolute;
  left: -32px;
  top: 30px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 5px var(--bg);
}

.is-current .chapter-node {
  background: var(--accent);
}

.chapter-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.chapter-index {
  font: italic 400 20px/1 var(--font-serif);
  letter-spacing: var(--track-serif);
  color: var(--accent);
}

.chapter-meta .exp-two-when {
  margin: 0;
  font-size: 12px;
}

.chapter-current {
  margin-left: auto;
  color: var(--accent);
  font-size: 12px;
}

.chapter-current::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}

.chapter-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chapter-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: italic 400 21px/1 var(--font-serif);
  letter-spacing: var(--track-serif);
  color: var(--accent);
  background: var(--bg);
}

.iris-home .career-chapter .exp-two-role {
  font-size: var(--t-h3);
  line-height: var(--lh-heading);
  letter-spacing: -.03em;
}

.career-chapter .exp-two-co {
  font-size: var(--t-small);
  margin-top: 4px;
}

.career-chapter .exp-two-sum {
  font-size: 15px;
  line-height: var(--lh-body);
  margin-top: 12px;
}

.chapter-tools {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

.chapter-tools li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  font: 12px/1.5 var(--font-mono);
  color: var(--muted);
  border-radius: var(--radius-sm);
}

@media(max-width:1000px) {
  .experience-section {
    gap: 5%;
  }
}

/* The trail stacks under its intro at the same width as the portfolio features. */

@media(max-width:900px) {
  .experience-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .experience-intro {
    position: static;
  }
  .career-map {
    max-width: none;
  }
  .career-map-lines {
    max-width: 400px;
    margin-inline: auto;
  }
  .career-map-key {
    justify-content: start;
    gap: 24px;
  }
}

@media(max-width:760px) {
  .career-trail {
    padding-left: 20px;
  }
  .chapter-node {
    left: -25px;
  }
}

/* A family of project covers, with one photographic app feature. */

/* Six tracks let the covers rebalance: three per row, and a closing pair spans three tracks each.
   The counts skip filtered cards, so a filtered view rebalances too. */

.portfolio-grid {
  gap: 24px;
  grid-template-columns: repeat(6,minmax(0,1fr));
}

.portfolio-grid .folio-card {
  grid-column: span 2;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

@media(min-width:1101px) {
  .portfolio-grid .folio-card:nth-child(3n+1 of .folio-card:not(.is-hidden)):nth-last-child(2 of .folio-card:not(.is-hidden)),
  .portfolio-grid .folio-card:nth-child(3n+2 of .folio-card:not(.is-hidden)):nth-last-child(1 of .folio-card:not(.is-hidden)) {
    grid-column: span 3;
  }
}

.folio-card .folio-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease-out),box-shadow var(--t-base) var(--ease-out);
}

.folio-copy {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: start;
  flex: 1;
  min-width: 0;
}

.folio-copy .work-meta {
  width: 100%;
  gap: 12px;
  font: 12px/1.5 var(--font-mono);
  margin-bottom: 16px;
}

.folio-copy .work-meta>span:last-child {
  text-align: right;
}

.iris-home .folio-copy .work-title {
  font-size: var(--t-h3);
  letter-spacing: -.03em;
  line-height: var(--lh-heading);
  margin: 0 0 12px;
}

.folio-copy .work-rest-summary {
  font-size: 15px;
  line-height: var(--lh-body);
  margin: 0 0 24px;
  max-width: 490px;
}

.folio-foot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: auto;
  font-size: var(--t-small);
  transition: color var(--t-fast) var(--ease-out);
}

.folio-foot svg,.folio-art-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform var(--t-base) var(--ease);
}

/* A neutral slate fallback so an unknown project never competes with the accent. */

.folio-art {
  --art-bg: #e9edf4;
  --art-ink: #35445b;
  --art-accent: #778da8;
  --art-glow: #fdfbf650;
  --art-emboss: #fdfbf670;
  --art-drop: #2a1b1218;
  position: relative;
  min-width: 0;
  isolation: isolate;
  height: 220px;
  overflow: hidden;
  background: var(--art-bg);
  color: var(--art-ink);
}

.folio-art-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(currentColor 1px,transparent 1px),linear-gradient(90deg,currentColor 1px,transparent 1px);
  background-size: 64px 64px;
  opacity: .055;
  mask-image: linear-gradient(140deg,#000,transparent 70%);
  transition: transform var(--t-slow) var(--ease);
}

.folio-art::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 35%,var(--art-glow),transparent 65%);
  opacity: .65;
}

/* Art text sits on the card's 24px inset so the numeral lines up with the title below.
   Everything uses --art-ink at full strength: each set passes 4.5:1 on its tint. */

.folio-art-no {
  position: absolute;
  top: 20px;
  left: 24px;
  font: italic 400 23px/1 var(--font-serif);
  letter-spacing: var(--track-serif);
}

.folio-art-type {
  position: absolute;
  right: 24px;
  top: 24px;
  font: 12px/1.2 var(--font-mono);
}

.folio-art-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  font-size: 12px;
  max-width: calc(100% - 72px);
  line-height: 1.4;
}

.folio-art-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
}

.folio-orbit {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 340px;
  height: 340px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .15;
  transform: translate(-50%,-50%) rotateX(62deg) rotateZ(-25deg);
  transition: transform var(--t-slow) var(--ease);
}

.folio-orbit::before,.folio-orbit::after {
  content: '';
  position: absolute;
  border: 1px solid currentColor;
  border-radius: 50%;
  inset: 24px;
}

.folio-orbit::after {
  inset: 50px;
}

.folio-mark {
  position: absolute;
  inset: 48px 24px 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-4px);
  transition: transform var(--t-slow) var(--ease);
  filter: drop-shadow(0 18px 16px var(--art-drop));
}

.folio-mark>span {
  font: italic 400 108px/.9 var(--font-serif);
  letter-spacing: var(--track-serif);
  margin-left: -.04em;
  text-shadow: 0 1px 0 var(--art-emboss);
}

.folio-mark img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  max-width: 70%;
}

/* Project tints keep each hue family, on clean tinted surfaces, with a dark set for every cover. */

.folio-card[data-project=ledger] .folio-art {
  --art-bg: #e6edff;
  --art-ink: #294b94;
  --art-accent: #5a82dd;
}

.folio-card[data-project=swift-llm] .folio-art {
  --art-bg: #f0e8ff;
  --art-ink: #613996;
  --art-accent: #a078da;
}

.folio-card[data-project=ophelia] .folio-art {
  --art-bg: #e0f4ee;
  --art-ink: #206653;
  --art-accent: #59a48d;
}

.folio-card[data-project=dossier] .folio-art {
  --art-bg: #ffebe6;
  --art-ink: #963f32;
  --art-accent: #d9806d;
}

.folio-card[data-project=swift-workspace] .folio-art {
  --art-bg: #e4f0fb;
  --art-ink: #31577f;
  --art-accent: #6a9dcc;
}

:root[data-theme=dark] .folio-art {
  --art-bg: #242933;
  --art-ink: #d8dfeb;
  --art-accent: #97a6bc;
  --art-glow: #fdfbf60a;
  --art-emboss: #00000040;
  --art-drop: #00000047;
}

:root[data-theme=dark] .folio-card[data-project=ledger] .folio-art {
  --art-bg: #1e2b48;
  --art-ink: #c4d5ff;
  --art-accent: #87aaff;
}

:root[data-theme=dark] .folio-card[data-project=swift-llm] .folio-art {
  --art-bg: #2c2342;
  --art-ink: #e2d4ff;
  --art-accent: #c3a4ff;
}

:root[data-theme=dark] .folio-card[data-project=ophelia] .folio-art {
  --art-bg: #1b302b;
  --art-ink: #c0eee2;
  --art-accent: #73cbb2;
}

:root[data-theme=dark] .folio-card[data-project=dossier] .folio-art {
  --art-bg: #382522;
  --art-ink: #ffdbd2;
  --art-accent: #ffa18e;
}

:root[data-theme=dark] .folio-card[data-project=swift-workspace] .folio-art {
  --art-bg: #242f3c;
  --art-ink: #d1dbe8;
  --art-accent: #8ea9c6;
}

.portfolio-grid .folio-feature {
  grid-column: 1/-1;
  margin-bottom: 10px;
}

.folio-feature .folio-link {
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
}

.folio-feature .folio-copy {
  padding: 44px clamp(28px,3.8vw,55px);
  justify-content: center;
}

.folio-feature .work-meta {
  margin-bottom: 34px;
}

.iris-home .folio-feature .work-title {
  font-size: 24px;
  margin-bottom: 23px;
}

.folio-deck {
  font: 500 clamp(34px,3.5vw,51px)/1.12 var(--font-display);
  letter-spacing: -.055em;
  margin: 0 0 28px;
}

.folio-feature .folio-foot {
  margin-top: 14px;
}

/* The Embrace gallery (home feature and the Embrace showroom) carries its own lavender tokens.
   The Embrace page sets the same names on .emb-hero-showroom. */

.device-gallery {
  --fan-open: 1;
  --gallery-bg: #efe9f4;
  --gallery-ink: #5f4a7c;
  --gallery-line: #d6cce0;
  --gallery-glow-hi: #fbf9fc;
  --gallery-glow-lo: #e6dfef;
  --gallery-halo: #e6dfefb3;
  --gallery-ring: #8d857b;
  --gallery-ring-soft: #cbc3b6;
  --gallery-shadow: #2b1f3a24;
  position: relative;
  isolation: isolate;
  min-width: 0;
  height: 640px;
  overflow: hidden;
  color: var(--gallery-ink);
  background: var(--gallery-bg);
  border-left: 1px solid var(--gallery-line);
}

:root[data-theme=dark] .device-gallery {
  --gallery-bg: #24202b;
  --gallery-ink: #c9b8e0;
  --gallery-line: #3d3547;
  --gallery-glow-hi: #2e2836;
  --gallery-glow-lo: #1f1b26;
  --gallery-halo: #2e2836cc;
  --gallery-ring: #6a625a;
  --gallery-ring-soft: #3a3330;
  --gallery-shadow: #00000059;
}

.device-gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse at 50% 45%,var(--gallery-glow-hi),var(--gallery-bg) 58%,var(--gallery-glow-lo));
}

.gallery-kicker {
  position: absolute;
  left: 30px;
  top: 27px;
  font: italic 400 18px var(--font-serif);
  letter-spacing: var(--track-serif);
  z-index: 4;
}

.gallery-orbit {
  position: absolute;
  width: 620px;
  height: 620px;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-45%) rotateX(63deg) rotateZ(-20deg);
  border: 1px solid var(--gallery-line);
  border-radius: 50%;
  z-index: -1;
}

.gallery-orbit::after {
  content: '';
  position: absolute;
  inset: 28px;
  border: 1px solid var(--gallery-line);
  border-radius: 50%;
}

.gallery-phones {
  position: absolute;
  inset: 65px 0 60px;
  perspective: 1100px;
}

.gallery-phone {
  position: absolute;
  width: 31%;
  max-width: 240px;
  left: 50%;
  top: 48%;
  margin: 0;
  will-change: auto;
}

.phone-hardware {
  position: relative;
  padding: 6px;
  background: #1d1a18;
  border-radius: 35px;
  box-shadow: 0 0 0 1px var(--gallery-ring),0 0 0 3px var(--gallery-ring-soft),6px 24px 33px var(--gallery-shadow),0 1px 1px #fdfbf699 inset;
}

.phone-hardware::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 21%;
  width: 3px;
  height: 38px;
  background: var(--gallery-ring);
  border-radius: 2px;
}

.phone-hardware::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 28%;
  width: 3px;
  height: 51px;
  background: var(--gallery-ring);
  border-radius: 2px;
}

.phone-hardware img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720/1566;
  border-radius: 29px;
  background: #faf9f6;
}

.gallery-phone figcaption {
  text-align: center;
  font: 12px var(--font-mono);
  padding-top: 16px;
  color: var(--gallery-ink);
}

.phone--left {
  z-index: 1;
  transform: translate(calc(-50% - 63% * var(--fan-open)),calc(-50% + 30px * var(--fan-open))) rotate(calc(-12deg * var(--fan-open))) scale(.88);
}

.phone--right {
  z-index: 2;
  transform: translate(calc(-50% + 63% * var(--fan-open)),calc(-50% + 30px * var(--fan-open))) rotate(calc(12deg * var(--fan-open))) scale(.88);
}

.phone--center {
  z-index: 3;
  transform: translate(-50%,calc(-50% - 8px * var(--fan-open)));
}

.gallery-signature {
  position: absolute;
  bottom: 26px;
  left: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.gallery-signature>span {
  font: 12px var(--font-mono);
}

.emb .emb-hero-showroom {
  padding: 0;
  min-height: 0;
  background: transparent;
}

.emb-hero-showroom .device-gallery {
  height: 100%;
  min-height: 590px;
}

.emb-hero-showroom .gallery-phone {
  width: 31%;
  max-width: 228px;
}

.iris-motion-on .gallery-phone {
  transition: transform var(--t-slow) var(--ease);
}

.iris-motion-on .folio-card.is-filtering {
  animation: iris-fade .6s var(--ease) both;
}

/* Basic hover feedback works with motion off; only the cover choreography waits for motion. */

.folio-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.folio-link:hover .folio-foot {
  color: var(--accent);
}

.folio-link:hover .folio-art-arrow svg,.folio-link:hover .folio-foot svg {
  transform: translate(3px,-3px);
}

@media(hover:hover) and (prefers-reduced-motion:no-preference) {
  .iris-motion-on .folio-link:hover .folio-mark {
    transform: translateY(-13px) rotate(-4deg) scale(1.06);
  }
  .iris-motion-on .folio-link:hover .folio-orbit {
    transform: translate(-50%,-46%) rotateX(58deg) rotateZ(-12deg);
  }
  .iris-motion-on .folio-link:hover .folio-art-grid {
    transform: scale(1.04) translate(3px,-3px);
  }
  .iris-motion-on .folio-link:hover .phone--center {
    transform: translate(-50%,calc(-50% - 16px * var(--fan-open)));
  }
}

@media(max-width:1100px) {
  .portfolio-grid .folio-card {
    grid-column: span 3;
  }
  .folio-feature .folio-copy {
    padding: 34px 30px;
  }
  .folio-deck {
    font-size: 37px;
  }
  .device-gallery {
    height: 590px;
  }
  .phone-hardware {
    border-radius: 29px;
    padding: 5px;
  }
  .phone-hardware img {
    border-radius: 24px;
  }
  .folio-art {
    height: 230px;
  }
  .emb-hero-showroom .device-gallery {
    min-height: 540px;
  }
}

/* In two columns an odd cover out spans the row and sets its art beside the copy,
   the art matching the column width above it. */

@media(min-width:681px) and (max-width:1100px) {
  .portfolio-grid .folio-card:nth-child(odd of .folio-card:not(.is-hidden)):nth-last-child(1 of .folio-card:not(.is-hidden)) {
    grid-column: 1 / -1;
  }
  .portfolio-grid .folio-card:nth-child(odd of .folio-card:not(.is-hidden)):nth-last-child(1 of .folio-card:not(.is-hidden)) .folio-link {
    flex-direction: row;
  }
  .portfolio-grid .folio-card:nth-child(odd of .folio-card:not(.is-hidden)):nth-last-child(1 of .folio-card:not(.is-hidden)) .folio-art {
    flex: 0 0 calc(50% - 12px);
    height: auto;
    min-height: 230px;
  }
}

@media(max-width:760px) {
  .folio-feature .folio-link {
    grid-template-columns: 1fr;
  }
  .folio-feature .folio-copy {
    padding: 31px 27px;
  }
  .folio-feature .work-meta {
    margin-bottom: 27px;
  }
  .folio-deck {
    font-size: 40px;
    max-width: 450px;
  }
  .folio-feature .folio-foot {
    margin-top: 0;
  }
  .device-gallery {
    height: 540px;
    border-left: 0;
    border-top: 1px solid var(--gallery-line);
  }
  .gallery-phone {
    width: 33%;
    max-width: 230px;
  }
  .gallery-kicker {
    left: 25px;
    top: 24px;
  }
  .gallery-signature {
    left: 25px;
    right: 25px;
    bottom: 23px;
  }
  .gallery-phones {
    inset: 65px 0 60px;
  }
  .folio-art {
    height: 215px;
  }
  .emb-hero-showroom .device-gallery {
    min-height: 480px;
  }
  .emb-hero-showroom .gallery-phone {
    width: 33%;
  }
}

@media(max-width:480px) {
  .device-gallery {
    height: 410px;
  }
  .gallery-phones {
    inset: 57px 0 48px;
  }
  .gallery-phone {
    width: 39%;
    top: 54%;
  }
  .phone--left {
    transform: translate(calc(-50% - 58% * var(--fan-open)),calc(-50% + 20px * var(--fan-open))) rotate(calc(-12deg * var(--fan-open))) scale(.88);
  }
  .phone--right {
    transform: translate(calc(-50% + 58% * var(--fan-open)),calc(-50% + 20px * var(--fan-open))) rotate(calc(12deg * var(--fan-open))) scale(.88);
  }
  .phone-hardware {
    padding: 4px;
    border-radius: 22px;
    box-shadow: 0 0 0 1px var(--gallery-ring),0 0 0 2px var(--gallery-ring-soft),5px 18px 25px var(--gallery-shadow);
  }
  .phone-hardware img {
    border-radius: 18px;
  }
  .phone-hardware::before {
    height: 24px;
    left: -3px;
    width: 2px;
  }
  .phone-hardware::after {
    height: 32px;
    right: -3px;
    width: 2px;
  }
  .gallery-phone figcaption {
    font-size: 12px;
    padding-top: 12px;
    visibility: hidden;
  }
  .gallery-kicker {
    font-size: 17px;
  }
  .gallery-signature {
    font-size: 12px;
    bottom: 20px;
  }
  .gallery-signature>span {
    font-size: 12px;
  }
  .folio-art-arrow svg {
    width: 19px;
    height: 19px;
  }
  .folio-feature .folio-copy {
    padding: 27px 24px;
  }
  .folio-deck {
    font-size: 36px;
  }
  .emb-hero-showroom .device-gallery {
    min-height: 425px;
  }
  .emb-hero-showroom .gallery-phone {
    width: 37%;
    max-width: 170px;
  }
}

@media(max-width:680px) {
  .portfolio-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .portfolio-grid .folio-card {
    grid-column: 1 / -1;
  }
}

@media(max-width:360px) {
  .device-gallery {
    height: 370px;
  }
  .folio-deck {
    font-size: 32px;
  }
  .folio-copy .work-meta {
    gap: 10px;
  }
  .folio-art-type {
    max-width: 65%;
    text-align: right;
  }
}

/* Featured products carry distinct accents without recoloring their screenshots. */
.embrace-headline em { color: var(--violet); }
.record-headline em { color: var(--teal); }
