/* The complete project collection is the homepage's first section. */
.home-page .site-header { height: 88px; }
.overview { padding-top: 35px; padding-bottom: 30px; }
.overview-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}
.overview-eyebrow { display: flex; align-items: center; gap: 9px; font-size: 8px; }
.overview-heading h1 {
  font-size: clamp(30px, 3.5vw, 52px);
  line-height: 1.4;
  letter-spacing: -.055em;
  margin-top: 14px;
  margin-left: -.04em;
}
.overview-heading-note { padding-bottom: 5px; text-align: right; }
.overview-heading-note > p { font-size: 11px; line-height: 1.8; color: var(--muted); }
.overview-heading-note > .eyebrow { display: block; font-size: 8px; margin-top: 13px; }
.overview-total { font-family: var(--serif); font-style: italic; font-size: 16px; margin-left: 14px; }
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
  align-items: start;
}
.overview-card { min-width: 0; }
.overview-cover-link { display: block; }
.overview-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  line-height: 1.6;
  padding-top: 11px;
  padding-bottom: 11px;
  border-top: 1px solid var(--line);
}
.overview-card-label > span:first-child { font-family: var(--serif); font-size: 13px; font-style: italic; }
.overview-card-label > span:last-child { color: var(--muted); }
.overview-picture {
  height: clamp(270px, 44svh, 460px);
  display: grid;
  place-items: center;
  padding: 14px;
  background: var(--card-surface);
  border-radius: 2px;
}
.overview-picture img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.overview-cover-link:hover .overview-picture img { transform: translateY(-4px); }
.overview-card-info { padding-top: 17px; }
.overview-card-info h2 { font-size: clamp(18px, 1.7vw, 25px); line-height: 1.5; letter-spacing: -.025em; }
.overview-card-info h2 > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.overview-card-arrow { display: inline-flex; transition: transform .25s; }
.overview-card-arrow svg { width: 19px; height: 19px; }
.overview-card-info h2 > a:hover .overview-card-arrow { transform: translate(3px, -3px); }
.overview-card-brand { font-family: var(--serif); font-style: italic; font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 4px; }
.overview-card-summary { font-size: 10px; line-height: 1.9; color: var(--muted); margin-top: 12px; max-width: 330px; }
.overview-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 29px; font-size: 8px; letter-spacing: .08em; color: var(--muted); }
.overview-bottom > a { display: inline-flex; gap: 12px; align-items: center; font-size: 10px; letter-spacing: 0; color: var(--ink); }
.overview-bottom svg { width: 14px; height: 14px; }
.home-page .about { border-bottom: 0; }

@media (max-width: 1100px) {
  .overview-heading h1 { font-size: 35px; }
  .overview-grid { column-gap: 20px; }
  .overview-card-info h2 { font-size: 19px; }
  .overview-picture { padding: 10px; }
}
@media (max-width: 700px) {
  .home-page .site-header { height: 78px; }
  .overview { padding-top: 31px; padding-bottom: 27px; }
  .overview-heading { display: block; margin-bottom: 23px; }
  .overview-eyebrow { font-size: 7px; letter-spacing: .08em; }
  .overview-heading h1 { font-size: clamp(25px, 7.2vw, 38px); margin-top: 14px; line-height: 1.45; }
  .overview-heading-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; text-align: left; margin-top: 13px; }
  .overview-heading-note > p { font-size: 9px; max-width: 210px; }
  .overview-heading-note > .eyebrow { margin: 0; font-size: 6px; letter-spacing: .03em; white-space: nowrap; }
  .overview-total { margin-left: 5px; font-size: 12px; }
  .overview-grid { gap: 28px 10px; }
  .overview-card-label { font-size: 7px; padding-block: 9px; }
  .overview-card-label > span:first-child { font-size: 10px; }
  .overview-picture { height: auto; aspect-ratio: 3890 / 5140; padding: 0; }
  .overview-card-info { padding-top: 12px; }
  .overview-card-info h2 { font-size: clamp(10px, 2.8vw, 16px); letter-spacing: -.03em; line-height: 1.6; }
  .overview-card-info h2 > a { display: block; }
  .overview-card-arrow { display: none; }
  .overview-card-brand { font-size: 9px; line-height: 1.5; overflow-wrap: break-word; margin-top: 5px; }
  .overview-card-summary { display: none; }
  .overview-bottom { font-size: 6px; margin-top: 25px; letter-spacing: .03em; }
  .overview-bottom > a { font-size: 8px; gap: 8px; }
  .overview-bottom svg { width: 12px; height: 12px; }
}

.home-page .overview .entrance-line-content { animation: none; }

/* Keep normal document flow as the no-JavaScript fallback. */
.stack-deck { position: relative; }
.stack-controls[hidden] { display: none; }
.stack-carousel-controls { display: none; }
.stack-carousel-controls[hidden] { display: none; }
.stack-controls { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 12px 0 20px; }
.stack-hint { color: var(--muted); font-size: 11px; }
.stack-toggle { display: inline-flex; align-items: center; gap: 28px; padding: 15px 22px; border: 1px solid var(--ink); border-radius: 40px; background: var(--ink); color: var(--paper, #f5f3ee); font: inherit; font-size: 12px; cursor: pointer; }
.stack-toggle-icon { font-size: 20px; line-height: 1; transition: transform .7s; }
.stack-toggle[aria-expanded="true"] .stack-toggle-icon { transform: rotate(180deg); }
.stack-toggle:focus-visible, .overview-card a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.entry-replay { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 9px 0; background: transparent; color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.entry-replay[hidden] { display: none; }
.entry-replay:hover { color: var(--ink); }
.entry-replay:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; }
.entry-replay svg { width: 14px; height: 14px; }
.stack-enabled.is-entry-pending .overview-card { visibility: hidden; }
.stack-enabled.is-entry-pending .overview-heading,
.stack-enabled.is-entry-pending .stack-controls,
.stack-enabled.is-entry-pending .overview-bottom { visibility: hidden; }
.stack-enabled.is-opening .overview-card { transition: none; pointer-events: none; will-change: transform, opacity, filter; }
.stack-enabled .stack-deck { overflow: clip; overflow-clip-margin: 20px; transition: height .8s cubic-bezier(.22,1,.36,1); }
.stack-enabled .stack-deck::before {
  content: ''; position: absolute; inset: 12% 10% 4%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%,#d9d1bf85,transparent 68%);
  transform: translate(var(--light-x,0px),var(--light-y,0px));
  transition: transform .6s cubic-bezier(.22,1,.36,1),opacity .5s;
}
.stack-enabled.is-expanded .stack-deck::before { opacity: 0; }
@media (prefers-reduced-motion:no-preference) {
  @keyframes portfolio-entry-glow {
    0% { opacity: 0; transform: translateY(30px) scale(.88); }
    65% { opacity: .85; transform: translateY(-4px) scale(1.035); }
    100% { opacity: 1; transform: translate(0,0) scale(1); }
  }
  .stack-enabled.is-opening .stack-deck::before { animation: portfolio-entry-glow 1.55s cubic-bezier(.22,1,.36,1) both; }
}
.stack-enabled .overview-grid { position: relative; padding: 30px 0; pointer-events: none; }
.stack-enabled .overview-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.stack-enabled .overview-card { grid-column: span 2; }
.stack-enabled .overview-card:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
.stack-enabled .overview-card:last-child:nth-child(3n+2) { grid-column: 4 / span 2; }
.stack-enabled .overview-card { position: relative; pointer-events: auto; background: #fffefa; padding: 8px 8px 14px; border-radius: 5px; box-shadow: 0 8px 30px #29231b09; transform-origin: center; transition: transform .55s cubic-bezier(.2,.75,.25,1), box-shadow .55s; }
.stack-enabled .stack-controls { position: relative; z-index: 30; }
.stack-enabled .overview-card-label { border: 0; padding: 5px 4px 9px; }
.stack-enabled .overview-card-info { padding: 12px 5px 0; }
.stack-enabled .overview-picture { height: clamp(245px, 36svh, 380px); padding: 5px; }
.stack-enabled .overview-card-info h2 { font-size: clamp(16px,1.6vw,22px); }
.stack-enabled .overview-card-summary { display: none; }
.stack-enabled .overview-card { transform: translate(var(--stack-x,0px),var(--stack-y,0px)) perspective(1200px) translateZ(var(--stack-depth,0px)) rotateY(var(--stack-turn,0deg)) rotateZ(var(--stack-angle,0deg)) scale(var(--stack-scale,1)); z-index: var(--stack-z,1); }
.stack-enabled.is-expanded .overview-card { transform: translate(0,0) rotate(0) scale(1); z-index: 1; }
.stack-enabled:not(.is-expanded) .overview-card { box-shadow: 0 15px 35px #29231b18; }
.stack-enabled:not(.is-mobile-carousel):not(.is-expanded):not(.is-opening) .overview-card:focus-within { z-index: 20; }
.stack-enabled:not(.is-expanded) .overview-grid {
  transform: perspective(1200px) rotateX(var(--deck-rx,0deg)) rotateY(var(--deck-ry,0deg));
  transform-origin: 50% var(--deck-center,190px);
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.stack-enabled:not(.is-mobile-carousel):not(.is-expanded):not(.is-opening) .overview-card:focus-within {
  transform: translate(calc(var(--stack-x) + var(--stack-lift-x)),calc(var(--stack-y) + var(--stack-lift-y))) perspective(1200px) translateZ(calc(var(--stack-depth) + 38px)) rotateY(calc(var(--stack-turn) * .5)) rotateZ(calc(var(--stack-angle) * .88)) scale(calc(var(--stack-scale) * 1.025));
}
@media (hover:hover) and (pointer:fine) {
  .stack-enabled:not(.is-mobile-carousel):not(.is-expanded):not(.is-opening) .overview-card:hover { z-index: 20; transform: translate(calc(var(--stack-x) + var(--stack-lift-x)),calc(var(--stack-y) + var(--stack-lift-y))) perspective(1200px) translateZ(calc(var(--stack-depth) + 38px)) rotateY(calc(var(--stack-turn) * .5)) rotateZ(calc(var(--stack-angle) * .88)) scale(calc(var(--stack-scale) * 1.025)); box-shadow: 0 26px 44px #29231b25; }
}
.stack-enabled:not(.is-expanded) .overview-cover-link:hover .overview-picture img { transform: none; }
.stack-enabled.is-measuring .overview-card, .stack-enabled.is-measuring .stack-deck { transition: none; }
@media (max-width:700px) {
  .stack-controls { flex-direction: column; gap: 13px; padding-top: 6px; }
  .stack-toggle { padding: 14px 22px; }
  .stack-hint { font-size: 10px; }
  .stack-enabled .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 14px; }
  .stack-enabled .overview-card, .stack-enabled .overview-card:nth-last-child(2):nth-child(3n+1), .stack-enabled .overview-card:last-child:nth-child(3n+2) { grid-column: auto; padding: 5px 5px 12px; }
  .stack-enabled .overview-card:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc((100% - 14px) / 2); justify-self: center; }
  .stack-enabled .overview-picture { height: auto; padding: 0; }
  .stack-enabled .overview-card-info h2 { font-size: 14px; }
  .stack-enabled .overview-card-brand { font-size: 10px; }
  .stack-enabled .overview-card-label { font-size: 9px; }
  .is-mobile-carousel .stack-deck { touch-action: pan-y pinch-zoom; }
  .is-mobile-carousel .overview-card { user-select: none; -webkit-user-select: none; }
  .is-mobile-carousel .overview-card img { -webkit-user-drag: none; }
  .stack-enabled.is-mobile-carousel:not(.is-expanded) .overview-grid {
    transform: translateX(var(--carousel-drag, 0px));
    transition: transform .45s cubic-bezier(.22,1,.36,1);
  }
  .is-mobile-carousel.is-deck-dragging .overview-grid { transition: none; }
  .stack-enabled.is-mobile-carousel .stack-carousel-controls:not([hidden]) {
    display: flex; align-items: center; justify-content: center; gap: 28px;
    position: relative; z-index: 30; padding: 0 0 18px;
  }
  .stack-carousel-controls button {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 50%;
    background: transparent; color: var(--ink); font-size: 21px; line-height: 1;
  }
  .stack-carousel-controls button:active { background: #e9e6df; }
  .stack-carousel-count {
    min-width: 65px; color: var(--muted); text-align: center;
    font-family: var(--serif); font-style: italic; font-size: 15px;
    font-variant-numeric: tabular-nums;
  }
}
@media (prefers-reduced-motion:reduce) {
  .stack-enabled .stack-deck, .stack-enabled .overview-grid, .stack-toggle-icon { transition: none; }
  .stack-enabled .overview-card { transition-duration:.3s; }
  .stack-enabled.is-mobile-carousel .overview-grid,
  .stack-enabled.is-mobile-carousel .overview-card { transition: none; }
  .stack-enabled .stack-deck::before { display: none; }
}
