.portfolio-page { overflow-x: clip; }
.portfolio-page main { max-width: 1800px; margin: auto; }
.portfolio-hero { position: relative; padding: 50px 5% 28px; text-align: center; overflow: hidden; }
.portfolio-hero::before { content: ''; position: absolute; inset: 8% 0 20%; z-index: -1; background: radial-gradient(ellipse at 50% 45%, #ffffff90, transparent 66%); }
.portfolio-kicker { display: flex; justify-content: center; gap: 20px; align-items: center; margin: 0 0 22px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.portfolio-kicker span:first-child::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; background: var(--teal); }
.portfolio-hero h1 { font-size: clamp(62px, 8.8vw, 130px); line-height: .95; letter-spacing: -.055em; margin: 0; }
.portfolio-hero h1 em { color: var(--teal); font-style: normal; }
.portfolio-intro { max-width: 490px; margin: 25px auto 0; font-size: 18px; }
.portfolio-hero-action { display: inline-flex; gap: 18px; align-items: center; margin-top: 22px; text-decoration: none; font-size: 14px; border-bottom: 1px solid #75002750; padding-bottom: 6px; }
.portfolio-hero-action span { transition: transform .25s; }
.portfolio-hero-action:hover span { transform: translateY(3px); }
.portfolio-ribbon-scene { position: relative; height: 380px; margin: 24px auto 0; perspective: 1100px; isolation: isolate; }
.portfolio-ribbon-scene::after { content: ''; position: absolute; width: 65%; height: 34px; left: 17.5%; bottom: 28px; border-radius: 50%; background: #08615c28; filter: blur(22px); z-index: -1; }
.portfolio-ribbon-rotor { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(-175px) rotateX(-7deg) rotateY(var(--ribbon-angle, 0deg)); transition: transform 1.15s cubic-bezier(.22,.8,.2,1); }
.portfolio-ribbon-rotor.is-flat { position: relative; display: flex; gap: 18px; overflow-x: auto; padding: 48px 5% 35px; scroll-snap-type: x mandatory; scroll-padding-inline: 5%; transform: none; transform-style: flat; scrollbar-width: thin; }
.portfolio-ribbon-rotor.is-flat .portfolio-ribbon-card { position: relative; left: auto; top: auto; flex: 0 0 296px; transform: none; scroll-snap-align: center; }
.portfolio-ribbon-card { position: absolute; width: 296px; height: 190px; left: calc(50% - 148px); top: 80px; padding: 0; border: 5px solid var(--wine); border-top-width: 15px; border-bottom-width: 15px; border-radius: 13px; overflow: hidden; background: var(--wine); color: var(--cream); transform: rotateY(calc(var(--ribbon-index) * 60deg)) translateZ(278px); backface-visibility: hidden; box-shadow: 0 14px 27px #18000f30; }
.portfolio-ribbon-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portfolio-ribbon-card::before,.portfolio-ribbon-card::after { content: ''; position: absolute; left: 0; right: 0; height: 7px; background: radial-gradient(ellipse at center, var(--cream) 40%, transparent 45%) 0 0 / 23px 7px; z-index: 1; }
.portfolio-ribbon-card::before { top: -11px; }
.portfolio-ribbon-card::after { bottom: -11px; }
.portfolio-ribbon-label { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border-radius: 99px; background: #750027df; font-size: 11px; line-height: 1.3; backdrop-filter: blur(8px); }
.portfolio-ribbon-card:hover img { filter: brightness(1.07); }
.portfolio-ribbon-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: -10px; position: relative; z-index: 2; }
.portfolio-round-control { border: 1px solid #75002735; background: #ffffff38; border-radius: 100px; min-width: 44px; min-height: 44px; padding: 10px 17px; font-size: 13px; color: var(--wine); backdrop-filter: blur(14px); transition: background .2s, transform .2s; }
.portfolio-round-control:hover { background: var(--wine); color: var(--cream); transform: translateY(-2px); }
.portfolio-ribbon-caption { font-size: 11px; letter-spacing: .11em; text-transform: uppercase; opacity: .75; margin: 15px 0 0; }
.portfolio-work { padding: 72px 5% 65px; scroll-margin-top: 20px; }
.portfolio-section-top { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.portfolio-section-top .eyebrow { font-size: 11px; margin: 0 0 14px; }
.portfolio-section-top h2 { font-size: clamp(40px, 5vw, 72px); letter-spacing: -.035em; line-height: 1.05; margin: 0; }
.portfolio-section-top h2 span { color: var(--teal); }
.portfolio-section-top > p { font-size: 15px; max-width: 330px; margin: 0 0 3px; }
.portfolio-filterbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 27px; border-top: 1px solid #75002725; padding-top: 22px; }
.portfolio-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.portfolio-filters button { border: 1px solid #75002735; border-radius: 100px; background: transparent; color: var(--wine); padding: 10px 20px; min-height: 44px; font-size: 14px; transition: background .2s, color .2s; }
.portfolio-filters button[aria-pressed="true"] { background: var(--wine); color: var(--cream); border-color: var(--wine); }
.portfolio-filters button:hover { background: #75002714; }
.portfolio-filters button[aria-pressed="true"]:hover { background: var(--teal); }
#portfolio-filter-status { margin: 0; font-size: 12px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
.portfolio-project-card { min-width: 0; }
.portfolio-project-card[hidden] { display: none; }
.portfolio-project-open { width: 100%; text-align: left; padding: 0; border: 0; background: transparent; color: var(--wine); display: block; border-radius: 25px; }
.portfolio-project-media { display: block; position: relative; aspect-ratio: 16/9; background: var(--teal); border-radius: 25px; overflow: hidden; box-shadow: 0 16px 28px #32002016; isolation: isolate; }
.portfolio-project-media::after { content: '↗'; display: grid; place-items: center; position: absolute; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%; background: var(--cream); color: var(--wine); font-size: 25px; transition: transform .35s; }
.portfolio-project-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.22,.8,.2,1); }
.portfolio-project-open:hover .portfolio-project-media img { transform: scale(1.04); }
.portfolio-project-open:hover .portfolio-project-media::after { transform: rotate(45deg); }
.portfolio-project-copy { display: flex; flex-direction: column; gap: 7px; padding: 22px 2px 0; }
.portfolio-project-title { display: block; font-size: clamp(23px,2.4vw,34px); line-height: 1.2; letter-spacing: -.025em; }
.portfolio-project-description { font-size: 15px; }
.portfolio-project-placeholder { display: grid; place-items: center; height: 100%; color: var(--cream); font-size: 27px; }
.portfolio-project-meta { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.portfolio-empty { border: 1px dashed #75002755; border-radius: 25px; background: #ffffff20; text-align: center; padding: 60px 20px; }
.portfolio-empty img { width: 120px; height: 95px; object-fit: contain; filter: drop-shadow(0 12px 8px #360e1320); }
.portfolio-empty h3 { font-size: 30px; line-height: 1.1; margin: 18px 0 10px; }
.portfolio-empty p { max-width: 440px; margin: auto; font-size: 16px; }
.portfolio-reel-section { padding: 55px 5% 65px; background: var(--teal); color: var(--cream); border-radius: 40px; margin: 0 3%; }
.portfolio-reel-section .portfolio-section-top h2 span { color: var(--cream); opacity: .7; }
.portfolio-reel-stage { position: relative; border-radius: 26px; overflow: hidden; background: #032e2a; aspect-ratio: 16/9; }
.portfolio-reel-stage video { display: block; width: 100%; height: 100%; object-fit: cover; }
.portfolio-reel-stage::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent,#042622a0); pointer-events: none; }
.portfolio-reel-caption { position: absolute; bottom: 24px; left: 26px; z-index: 1; margin: 0; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.portfolio-reel-toggle { position: absolute; z-index: 2; bottom: 18px; right: 20px; border: 1px solid #f3e2bd70; background: #f3e2bdde; backdrop-filter: blur(18px); color: var(--wine); border-radius: 100px; padding: 13px 22px; min-height: 48px; font-size: 14px; }
.portfolio-studio-previews { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 20px; }
.portfolio-studio-previews button { padding: 0; border: 0; background: #034d49; color: var(--cream); border-radius: 18px; overflow: hidden; text-align: left; }
.portfolio-studio-previews img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; transition: transform .5s; }
.portfolio-studio-previews button:hover img { transform: scale(1.04); }
.portfolio-studio-previews span { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 13px 16px; }
.portfolio-studio-previews span::after { content: '↗'; }
.portfolio-cta { margin: 70px 5%; padding: 40px 5%; border: 1px solid #ffffffa0; border-radius: 32px; background: linear-gradient(135deg,#ffffff58,#ffffff0b),#f3e2bd55; backdrop-filter: blur(20px); box-shadow: var(--bubble-shadow); display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.portfolio-cta h2 { font-size: clamp(35px,4vw,62px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 14px; }
.portfolio-cta h2 span { color: var(--teal); }
.portfolio-cta p { margin: 0; font-size: 16px; }
.portfolio-cta .button { flex-shrink: 0; }
.portfolio-viewer { position: fixed; inset: 0; width: min(1200px,94vw); max-width: none; max-height: calc(100dvh - 36px); margin: auto; padding: 24px; border: 1px solid #f3e2bd60; border-radius: 26px; background: #063f3ceF; color: var(--cream); box-shadow: 0 25px 95px #002b2790; backdrop-filter: blur(24px); }
.portfolio-viewer::backdrop { background: #031f1de0; backdrop-filter: blur(14px); }
.portfolio-viewer[open] { animation: portfolio-viewer-in .3s cubic-bezier(.2,.75,.2,1) both; }
.portfolio-viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.portfolio-viewer-top h2 { font-size: clamp(21px,2.4vw,32px); line-height: 1.2; margin: 0; letter-spacing: -.02em; }
.portfolio-viewer-close { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #f3e2bd60; background: #ffffff0c; color: var(--cream); border-radius: 50%; font-size: 28px; line-height: 1; }
.portfolio-viewer-media { display: grid; place-items: center; position: relative; min-height: 100px; background: #021b19; border-radius: 16px; overflow: hidden; }
.portfolio-viewer-external-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: 85%; padding: 16px 23px; border-radius: 99px; background: var(--cream); color: var(--wine); text-align: center; text-decoration: none; font-size: 16px; box-shadow: 0 8px 40px #04262280; }
.portfolio-viewer-media img { max-width: 100%; max-height: min(68dvh,740px); width: auto; height: auto; object-fit: contain; display: block; }
.portfolio-viewer-media video { width: 100%; max-height: 68dvh; display: block; }
.portfolio-viewer-media iframe { display: block; border: 0; width: 100%; aspect-ratio: 16/9; max-height: 68dvh; }
.portfolio-viewer [hidden] { display: none; }
.portfolio-viewer-bottom { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding: 18px 2px 0; }
.portfolio-viewer-bottom p { margin: 0; font-size: 14px; max-width: 700px; }
.portfolio-viewer-bottom a { font-size: 13px; flex-shrink: 0; text-underline-offset: 4px; }
[data-reveal].reveal-ready { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s cubic-bezier(.22,.8,.2,1); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
@keyframes portfolio-viewer-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 1000px) { .portfolio-hero { padding-top: 32px; } .portfolio-section-top { align-items: start; } .portfolio-cta { padding: 35px; } }
@media (max-width: 760px) {
  .portfolio-hero { padding: 28px 6% 0; }
  .portfolio-hero h1 { font-size: clamp(55px,12vw,82px); }
  .portfolio-kicker { font-size: 10px; gap: 14px; margin-bottom: 20px; }
  .portfolio-intro { font-size: 16px; max-width: 360px; }
  .portfolio-ribbon-scene { height: auto; perspective: none; margin: 30px -6.8% 0; }
  .portfolio-ribbon-scene::after { display: none; }
  .portfolio-ribbon-rotor { position: relative; display: flex; gap: 14px; padding: 10px 6% 25px; overflow-x: auto; scroll-snap-type: x mandatory; transform: none; transform-style: flat; scrollbar-width: none; scroll-padding-inline: 6%; }
  .portfolio-ribbon-rotor.is-flat { gap: 14px; padding: 10px 6% 25px; scrollbar-width: none; scroll-padding-inline: 6%; }
  .portfolio-ribbon-rotor::-webkit-scrollbar { display: none; }
  .portfolio-ribbon-card { position: relative; transform: none; left: auto; top: auto; flex: 0 0 76%; max-width: 390px; height: auto; aspect-ratio: 1.56; scroll-snap-align: center; box-shadow: 0 8px 16px #75002720; }
  .portfolio-ribbon-rotor.is-flat .portfolio-ribbon-card { flex-basis: 76%; }
  .portfolio-ribbon-controls { margin-top: 0; }
  .portfolio-ribbon-caption { font-size: 9px; margin: 16px 0 0; }
  .portfolio-work { padding: 52px 6%; }
  .portfolio-section-top { display: block; margin-bottom: 25px; }
  .portfolio-section-top h2 { font-size: clamp(38px,9vw,56px); }
  .portfolio-section-top > p { max-width: 460px; margin-top: 18px; }
  .portfolio-filterbar { display: block; }
  #portfolio-filter-status { margin-top: 15px; }
  .portfolio-filters button { padding: 10px 16px; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 30px; }
  .portfolio-project-media { border-radius: 20px; }
  .portfolio-project-copy { padding-top: 18px; }
  .portfolio-project-title { font-size: 26px; }
  .portfolio-project-description { font-size: 14px; }
  .portfolio-reel-section { margin: 0 3%; padding: 38px 5% 30px; border-radius: 28px; }
  .portfolio-reel-stage { aspect-ratio: 4/3; border-radius: 19px; }
  .portfolio-reel-caption { top: 16px; bottom: auto; left: 16px; font-size: 10px; }
  .portfolio-reel-toggle { right: 14px; bottom: 14px; font-size: 12px; padding: 11px 16px; }
  .portfolio-studio-previews { grid-template-columns: 1fr; gap: 12px; }
  .portfolio-studio-previews button { display: grid; grid-template-columns: 90px 1fr; align-items: center; border-radius: 13px; }
  .portfolio-studio-previews img { aspect-ratio: 1; height: 90px; }
  .portfolio-cta { margin: 45px 6%; padding: 26px; display: block; border-radius: 25px; }
  .portfolio-cta .button { margin-top: 24px; width: 100%; }
  .portfolio-viewer { width: 95vw; padding: 16px; border-radius: 20px; max-height: calc(100dvh - 24px); }
  .portfolio-viewer-top { margin-bottom: 16px; gap: 12px; }
  .portfolio-viewer-bottom { display: block; }
  .portfolio-viewer-bottom a { display: inline-block; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-ribbon-rotor,.portfolio-project-media img,.portfolio-round-control,.portfolio-studio-previews img,.portfolio-project-media::after { transition: none; }
  .portfolio-viewer[open] { animation: none; }
  [data-reveal].reveal-ready { opacity: 1; transform: none; transition: none; }
}
