/* Screen composition only. The existing hero remains the print source. */
@media screen {
  .portfolio-preview {
    --premium-paper: #fff;
    --premium-accent: #126548;
    --premium-gutter: clamp(32px, 3.34vw, 64px);
  }

  .portfolio-preview .portfolio-nav {
    background: #fff;
    border-bottom: 1px solid #e5e9e6;
    color: #10221d;
  }

  .portfolio-preview .portfolio-nav .wrap {
    display: flex;
    width: 100%;
    max-width: 1600px;
    height: 64px;
    min-height: 64px;
    margin-inline: auto;
    padding: 0 var(--premium-gutter);
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }

  .portfolio-preview .portfolio-nav .logo {
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.2;
  }

  .portfolio-preview .portfolio-nav .logo span,
  .portfolio-preview .portfolio-nav.premium-nav-ready .links > a[href^="#"]:not(.premium-project-link) {
    display: none;
  }

  .portfolio-preview .portfolio-nav .links {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0;
    overflow: visible;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
  }

  .portfolio-preview .portfolio-nav .links > a,
  .portfolio-preview .portfolio-nav .links > a:last-child {
    margin: 0;
    padding: 21px 0;
    color: #10221d;
    font-weight: 500;
  }

  .portfolio-preview .portfolio-nav .links > a + a::before {
    content: "/";
    position: absolute;
    left: -19px;
    color: #98a59e;
    font-size: 12px;
    font-weight: 400;
  }

  .portfolio-preview .portfolio-nav .links > a::after {
    bottom: 12px;
    height: 1px;
    background: #27664e;
  }

  .portfolio-preview #top {
    background: var(--premium-paper);
  }

  .portfolio-preview .hero {
    --premium-left: 28%;
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    max-width: 1600px;
    height: clamp(880px, calc(35vw + 420px), 1000px);
    min-height: 0;
    margin-inline: auto;
    padding: 0 var(--premium-gutter);
    overflow: clip;
    background: var(--premium-paper);
    color: #172e24;
    opacity: 1;
    transform: none;
  }

  .portfolio-preview .hero::before {
    content: none;
    position: absolute;
    z-index: -1;
    inset: 48% -1px 0;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    clip-path: polygon(0 43%, 100% 0, 100% 100%, 0 100%);
  }

  .portfolio-preview .hero-intro {
    display: contents;
    animation: none;
  }

  .portfolio-preview .hero-title {
    position: absolute;
    z-index: 4;
    top: 116px;
    left: var(--premium-gutter);
    padding: 0;
  }

  .portfolio-preview .hero .eyebrow {
    display: none;
  }

  /* Keep the original heading and introduction untouched for print and AT. */
  .portfolio-preview .hero.premium-hero-ready .hero-title > h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .portfolio-preview .hero.premium-hero-ready .hero-about {
    display: none;
  }

  .portfolio-preview .premium-hero-heading {
    display: grid;
    gap: 0;
    font-size: clamp(72px, 6.67vw, 104px);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1.08;
  }

  .portfolio-preview .premium-hero-heading > span:first-child {
    color: var(--premium-accent);
    white-space: nowrap;
  }

  .portfolio-preview .premium-hero-name {
    margin: 17px 0 0;
    color: var(--premium-accent);
    font-size: 26px;
    font-weight: 650;
    letter-spacing: .025em;
    line-height: 1.5;
  }

  .portfolio-preview .premium-hero-bio {
    position: absolute;
    z-index: 8;
    top: 122px;
    right: var(--premium-gutter);
    width: 336px;
    max-width: 30%;
    margin: 0;
    color: #344a3f;
    font-size: 16px;
    line-height: 1.75;
  }

  .portfolio-preview .premium-hero-bio summary {
    position: relative;
    padding-right: 28px;
    list-style: none;
    cursor: pointer;
  }

  .portfolio-preview .premium-hero-bio summary::-webkit-details-marker {
    display: none;
  }

  .portfolio-preview .premium-hero-bio summary svg {
    position: absolute;
    top: 6px;
    right: 0;
    width: 18px;
    height: 18px;
    color: var(--premium-accent);
    transition: transform 280ms ease;
  }

  .portfolio-preview .premium-hero-bio[open] summary svg {
    transform: rotate(45deg);
  }

  .portfolio-preview .premium-hero-skills {
    display: block;
    margin-top: 12px;
    color: var(--premium-accent);
    font-size: 13px;
    line-height: 1.8;
  }

  .portfolio-preview .premium-bio-body {
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    width: 400px;
    max-width: calc(100vw - 40px);
    padding: 24px;
    border: 1px solid #dce5df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px #163e261f;
    font-size: 14px;
    line-height: 1.85;
  }

  .portfolio-preview .premium-bio-body p + p {
    margin-top: 16px;
  }

  .portfolio-preview .premium-bio-body b {
    color: var(--premium-accent);
    font-weight: 600;
  }

  .portfolio-preview .project-exhibit {
    position: absolute;
    inset: 0;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
    animation: none;
  }

  .portfolio-preview .exhibit-index {
    position: absolute;
    z-index: 5;
    right: var(--premium-gutter);
    bottom: 24px;
    left: var(--premium-gutter);
    pointer-events: auto;
  }

  .portfolio-preview .index-label {
    display: none;
  }

  .portfolio-preview .project-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    align-items: stretch;
  }

  .portfolio-preview .project-tab,
  .portfolio-preview .project-tab:first-child,
  .portfolio-preview .project-tab:nth-child(2) {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    column-gap: 16px;
    width: 100%;
    min-height: 62px;
    margin: 0;
    padding: 14px 0 17px;
    border: 0;
    border-bottom: 1px solid #d7e1da;
    border-radius: 0;
    background: transparent;
    color: #56665d;
    text-align: left;
    line-height: 1.4;
    transition: color 280ms ease, border-color 280ms ease;
  }

  .portfolio-preview .project-tab::before {
    position: static;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    padding-top: 1px;
    color: #839088;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    background: none;
    transform: none;
  }

  .portfolio-preview .project-tab strong {
    grid-column: 2;
    grid-row: 1;
    color: inherit;
    font-size: clamp(15px, 1.35vw, 20px);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.5;
  }

  .portfolio-preview .project-tab[aria-selected="true"] {
    border-bottom: 2px solid var(--premium-accent);
    background: none;
    color: var(--premium-accent);
  }

  .portfolio-preview .project-tab[aria-selected="true"]::before {
    color: var(--premium-accent);
  }

  .portfolio-preview .project-tab:hover {
    color: var(--premium-accent);
    border-bottom-color: var(--premium-accent);
  }

  .portfolio-preview .hero :is(.tab-context, .tab-subtitle, .project-tab svg) {
    display: none;
  }

  .portfolio-preview .exhibit-stage {
    position: absolute;
    top: 225px;
    right: var(--premium-gutter);
    bottom: 105px;
    left: calc(var(--premium-left) + 12px);
    display: grid;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    perspective: 1800px;
    pointer-events: auto;
  }

  .portfolio-preview .preview-panel {
    position: relative;
    display: grid;
    grid-area: 1 / 1;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
    min-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(84px, 14px, -80px) rotateY(-9deg) scale(.94);
    transform-origin: 50% 55%;
    transition: transform 620ms cubic-bezier(.16, 1, .3, 1), opacity 360ms ease, visibility 0s 620ms;
  }

  .portfolio-preview .preview-panel.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0) rotateY(0) scale(1);
    transition: transform 720ms cubic-bezier(.16, 1, .3, 1), opacity 420ms 70ms ease, visibility 0s;
  }

  .portfolio-preview .preview-surface {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
    padding: 0 24px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    perspective: 1600px;
  }

  .portfolio-preview .preview-image,
  .portfolio-preview .preview-image:hover {
    position: relative;
    z-index: 2;
    display: block;
    flex: none;
    width: var(--premium-media-width, 100%);
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid #d5ded8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 26px 64px #173b2424, 0 4px 14px #173b2410;
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(calc(-5deg + var(--tilt-y, 0deg))) rotateZ(1.5deg);
    transform-style: preserve-3d;
    transform-origin: 50% 55%;
    transition: transform 500ms cubic-bezier(.2, .8, .2, 1), box-shadow 400ms ease;
    overflow: hidden;
  }

  .portfolio-preview .preview-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    margin: 0;
    object-fit: contain;
    filter: none;
  }

  .portfolio-preview .premium-frame-back {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: var(--premium-media-width, 100%);
    max-width: 100%;
    border: 1px solid #d9e1dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 44px #173b2418;
    transform: translate(calc(-50% + 36px), calc(-50% - 22px)) rotateY(-7deg) rotateZ(1.5deg) scale(.97);
    pointer-events: none;
    overflow: hidden;
  }

  .portfolio-preview .premium-frame-back img {
    display: block;
    width: 100%;
    height: auto;
    filter: none;
  }

  .portfolio-preview .preview-caption {
    display: block;
    min-height: 0;
    max-width: var(--premium-media-width, 100%);
    margin: 0 auto;
    padding: 17px 14px 0 10px;
  }

  .portfolio-preview .preview-caption p {
    max-width: 720px;
    margin: 0;
    color: #657269;
    font-size: 12px;
    line-height: 1.7;
  }

  .portfolio-preview .hero.premium-hero-ready .preview-caption > a {
    display: none;
  }

  .portfolio-preview .preview-zoom {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    border: 1px solid #dce7df;
    border-radius: 4px;
    background: #fff;
    color: #173128;
    font-size: 11px;
    line-height: 1.5;
  }

  .portfolio-preview .premium-project-feature {
    position: absolute;
    z-index: 4;
    top: 468px;
    left: var(--premium-gutter);
    width: calc(var(--premium-left) - var(--premium-gutter) - 24px);
    color: #172e24;
  }

  .portfolio-preview .premium-project-number {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 120px;
    margin: 0 0 16px;
    color: #76877b;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
  }

  .portfolio-preview .premium-project-number::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #cbd7cf;
  }

  .portfolio-preview .premium-project-title {
    margin: 0 0 26px;
    color: #172e24;
    font-size: clamp(25px, 2.2vw, 34px);
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.45;
    text-wrap: balance;
  }

  .portfolio-preview .premium-project-description {
    display: none;
  }

  .portfolio-preview .premium-project-feature .btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-width: 148px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid var(--premium-accent);
    border-radius: 5px;
    background: var(--premium-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color 240ms ease, transform 320ms cubic-bezier(.2, .8, .2, 1);
  }

  .portfolio-preview .premium-project-feature .btn:hover {
    border-color: #0c5038;
    background: #0c5038;
    color: #fff;
    transform: translateY(-2px);
  }

  .portfolio-preview .premium-project-feature .btn svg {
    width: 18px;
    height: 18px;
    margin: 0;
  }

  .portfolio-preview .hero :is(a, button, summary):focus-visible {
    outline: 2px solid var(--premium-accent);
    outline-offset: 6px;
  }

  @media (min-width: 801px) and (max-width: 1100px) {
    .portfolio-preview { --premium-gutter: 32px; }
    .portfolio-preview .hero { --premium-left: 31%; height: 850px; }
    .portfolio-preview .hero-title { top: 112px; }
    .portfolio-preview .premium-hero-heading { font-size: 72px; }
    .portfolio-preview .premium-hero-name { font-size: 24px; }
    .portfolio-preview .premium-hero-bio { top: 116px; max-width: 34%; font-size: 15px; }
    .portfolio-preview .premium-hero-skills { font-size: 12px; }
    .portfolio-preview .exhibit-stage { top: 290px; left: 29%; bottom: 126px; }
    .portfolio-preview .premium-project-feature { top: 404px; width: 220px; }
    .portfolio-preview .premium-project-title { font-size: 26px; }
    .portfolio-preview .project-tabs { gap: 20px; }
    .portfolio-preview .project-tab { grid-template-columns: 24px minmax(0, 1fr); column-gap: 9px; }
    .portfolio-preview .project-tab strong { font-size: 15px; }
    .portfolio-preview .project-tab::before { font-size: 14px; }
  }

  /* On laptop screens, descriptions move beside the image so the full UI and
     all four project selectors fit inside the first viewport together. */
  @media (min-width: 801px) and (max-height: 860px) {
    .portfolio-preview .hero {
      height: 100svh;
      min-height: 640px;
    }
    .portfolio-preview .hero-title { top: 92px; }
    .portfolio-preview .premium-hero-heading { font-size: clamp(72px, 5.55vw, 84px); }
    .portfolio-preview .premium-hero-name { margin-top: 12px; font-size: 23px; }
    .portfolio-preview .premium-hero-bio {
      top: 98px;
      width: 380px;
      max-width: 33%;
      font-size: 14px;
      line-height: 1.5;
    }
    .portfolio-preview .premium-hero-skills {
      margin-top: 8px;
      font-size: 11px;
      line-height: 1.6;
    }
    .portfolio-preview .exhibit-stage {
      top: clamp(146px, calc(28svh - 56px), 180px);
      bottom: 100px;
    }
    .portfolio-preview .preview-panel { grid-template-rows: minmax(0, 1fr); }
    .portfolio-preview .preview-caption { display: none; }
    .portfolio-preview .premium-frame-back {
      transform: translate(calc(-50% + 30px), calc(-50% - 10px)) rotateY(-7deg) rotateZ(1.5deg) scale(.97);
    }
    .portfolio-preview .premium-project-feature {
      top: calc(50svh - 30px);
    }
    .portfolio-preview .premium-project-number {
      margin-bottom: 12px;
      font-size: 12px;
    }
    .portfolio-preview .premium-project-title {
      margin-bottom: 14px;
      font-size: clamp(24px, 2vw, 29px);
      line-height: 1.4;
    }
    .portfolio-preview .premium-project-description {
      display: block;
      margin: 0 0 20px;
      color: #657269;
      font-size: 12px;
      line-height: 1.8;
    }
    .portfolio-preview .premium-project-feature .btn {
      min-height: 44px;
      padding-block: 10px;
    }
    .portfolio-preview .exhibit-index { bottom: 20px; }
    .portfolio-preview .project-tab,
    .portfolio-preview .project-tab:first-child,
    .portfolio-preview .project-tab:nth-child(2) {
      min-height: 60px;
      padding-block: 12px 15px;
    }
  }

  @media (min-width: 801px) and (max-width: 1100px) and (max-height: 860px) {
    .portfolio-preview .premium-hero-heading { font-size: 64px; }
    .portfolio-preview .premium-hero-name { font-size: 21px; }
    .portfolio-preview .premium-hero-bio { max-width: 39%; font-size: 13px; }
    .portfolio-preview .premium-project-feature { top: calc(50svh - 45px); width: 220px; }
    .portfolio-preview .premium-project-title { font-size: 24px; }
    .portfolio-preview .premium-project-description { font-size: 11px; line-height: 1.75; margin-bottom: 16px; }
  }

  @media (max-width: 800px) {
    .portfolio-preview { --premium-gutter: 28px; }
    .portfolio-preview .portfolio-nav .wrap { height: 60px; min-height: 60px; gap: 20px; }
    .portfolio-preview .portfolio-nav .logo { font-size: 20px; }
    .portfolio-preview .portfolio-nav .links { gap: 24px; font-size: 13px; }
    .portfolio-preview .portfolio-nav .links > a { padding: 20px 0; }
    .portfolio-preview .portfolio-nav .links > a + a::before { left: -14px; }
    .portfolio-preview .hero {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: auto;
      min-height: 0;
      padding: 104px var(--premium-gutter) 30px;
      overflow: clip;
    }
    .portfolio-preview .hero::before { inset-block-start: 48%; }
    .portfolio-preview .hero-title { position: relative; top: auto; left: auto; }
    .portfolio-preview .premium-hero-heading { font-size: clamp(62px, 10vw, 80px); }
    .portfolio-preview .premium-hero-name { margin-top: 14px; font-size: 23px; }
    .portfolio-preview .premium-hero-bio {
      position: relative;
      top: auto;
      right: auto;
      width: 100%;
      max-width: 560px;
      margin: 24px 0 0;
      font-size: 15px;
    }
    .portfolio-preview .premium-hero-bio summary { padding-right: 30px; }
    .portfolio-preview .premium-hero-skills { max-width: 400px; margin-top: 8px; font-size: 12px; }
    .portfolio-preview .premium-bio-body { left: 0; right: auto; width: 100%; }
    .portfolio-preview .premium-project-feature {
      position: relative;
      top: auto;
      left: auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      column-gap: 20px;
      width: 100%;
      margin-top: 34px;
    }
    .portfolio-preview .premium-project-number { grid-column: 1; margin-bottom: 9px; font-size: 12px; }
    .portfolio-preview .premium-project-title { grid-column: 1; margin: 0; font-size: 25px; line-height: 1.5; }
    .portfolio-preview .premium-project-feature .btn { grid-column: 2; grid-row: 1 / 3; min-width: 116px; min-height: 42px; padding: 10px 13px; gap: 13px; font-size: 12px; }
    .portfolio-preview .project-exhibit { position: relative; inset: auto; display: flex; flex-direction: column; margin-top: 26px; }
    .portfolio-preview .exhibit-stage { position: relative; inset: auto; order: 0; width: 100%; height: 390px; perspective: 1600px; }
    .portfolio-preview .preview-panel { grid-template-rows: minmax(0, 1fr) auto; }
    .portfolio-preview .preview-surface { padding: 0 12px 0 0; }
    .portfolio-preview .preview-image,
    .portfolio-preview .preview-image:hover { border-radius: 5px; transform: rotateY(-3deg) rotateZ(1deg); }
    .portfolio-preview .premium-frame-back { border-radius: 5px; transform: translate(calc(-50% + 16px), calc(-50% - 12px)) rotateY(-5deg) rotateZ(1deg) scale(.98); }
    .portfolio-preview .preview-caption { padding: 16px 0 0; }
    .portfolio-preview .preview-caption p { font-size: 12px; line-height: 1.75; }
    .portfolio-preview .exhibit-index { position: relative; inset: auto; order: 1; margin-top: 30px; }
    .portfolio-preview .project-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
    .portfolio-preview .project-tab,
    .portfolio-preview .project-tab:first-child,
    .portfolio-preview .project-tab:nth-child(2) { grid-template-columns: 23px minmax(0, 1fr); column-gap: 10px; min-height: 66px; padding: 13px 0; }
    .portfolio-preview .project-tab strong { font-size: 15px; line-height: 1.5; }
    .portfolio-preview .project-tab::before { font-size: 13px; }
    .portfolio-preview .preview-zoom { opacity: 1; transform: none; padding: 5px 8px; font-size: 10px; }
  }

  @media (max-width: 480px) {
    .portfolio-preview { --premium-gutter: 20px; }
    .portfolio-preview .portfolio-nav .wrap { height: 58px; min-height: 58px; }
    .portfolio-preview .portfolio-nav .logo { font-size: 19px; }
    .portfolio-preview .portfolio-nav .links { gap: 18px; font-size: 11px; }
    .portfolio-preview .portfolio-nav .links > a + a::before { left: -11px; font-size: 10px; }
    .portfolio-preview .hero { padding-top: 98px; }
    .portfolio-preview .premium-hero-heading { font-size: clamp(58px, 15vw, 72px); line-height: 1.06; }
    .portfolio-preview .premium-hero-name { margin-top: 14px; font-size: 21px; }
    .portfolio-preview .premium-hero-bio { margin-top: 22px; font-size: 14px; }
    .portfolio-preview .premium-hero-skills { max-width: 300px; font-size: 12px; }
    .portfolio-preview .premium-project-feature { margin-top: 30px; column-gap: 16px; }
    .portfolio-preview .premium-project-title { font-size: 21px; line-height: 1.5; }
    .portfolio-preview .premium-project-feature .btn { min-width: 100px; gap: 9px; padding: 10px 12px; }
    .portfolio-preview .premium-project-feature .btn svg { width: 15px; height: 15px; }
    .portfolio-preview .project-exhibit { margin-top: 24px; }
    .portfolio-preview .exhibit-stage { height: 306px; }
    .portfolio-preview .preview-caption p { font-size: 11px; }
    .portfolio-preview .exhibit-index { margin-top: 25px; }
    .portfolio-preview .project-tabs { gap: 4px 20px; }
    .portfolio-preview .project-tab strong { font-size: 13px; }
    .portfolio-preview .project-tab,
    .portfolio-preview .project-tab:first-child,
    .portfolio-preview .project-tab:nth-child(2) { column-gap: 6px; grid-template-columns: 21px minmax(0, 1fr); min-height: 64px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .portfolio-preview .hero *,
    .portfolio-preview .hero *::before,
    .portfolio-preview .hero *::after {
      animation: none !important;
      transition: none !important;
    }
    .portfolio-preview .preview-panel,
    .portfolio-preview .preview-panel.is-active { transform: none; }
    .portfolio-preview .preview-image,
    .portfolio-preview .preview-image:hover { transform: rotateY(-3deg) rotateZ(1deg); }
  }
}

@media print {
  [data-premium-screen] { display: none !important; }
}
