#about-us.portfolio { scroll-margin-top: .5rem; }
.portfolio {
  --ink: #101820;
  --cream: #f4f0e8;
  --muted: #c3c9cd;
  --accent: #eac581;
  --pad: clamp(1.25rem, 4vw, 4rem);
  padding-bottom: clamp(3rem, 8vw, 7rem);
}
.portfolio figure, .portfolio h3, .portfolio h4 { margin: 0; }
.portfolio img { display: block; width: 100%; }
.portfolio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  background: linear-gradient(120deg, #101c24, #182c33);
  border-top: 2px solid var(--accent);
}
.portfolio-intro { padding: clamp(1.6rem, 4vw, 4.2rem) var(--pad); align-self: center; }
.portfolio .portfolio-kicker {
  display: flex;
  align-items: center;
  gap: .8rem;
  font: 600 .96rem/1.65 var(--font);
  color: var(--accent);
}
.portfolio-kicker::before { content: ""; width: 2rem; height: 1px; background: currentColor; flex: none; }
.portfolio .portfolio-name {
  margin: .75rem 0 .15rem;
  font: 400 clamp(3.45rem, 6.9vw, 6.5rem)/1.06 Georgia, "Times New Roman", serif;
  letter-spacing: -.065em;
  color: var(--cream);
}
.portfolio-name em { font-weight: 400; color: var(--accent); }
.portfolio .portfolio-role { color: #ebd5aa; font-weight: 600; margin: .75rem 0 1.35rem; }
.portfolio-intro p, .portfolio-event-copy > p:last-child { color: var(--muted); font-size: 1.02rem; line-height: 1.85; max-width: 55ch; margin: .75rem 0 0; }
.portfolio .portfolio-watch {
  display: inline-flex; align-items: center; gap: .75rem; margin-top: 1.35rem;
  padding: .65rem 1rem; min-height: 46px; border-radius: .28rem; background: var(--accent); color: #172125; font-weight: 700;
}
.portfolio-watch small { padding-left: .7rem; border-left: 1px solid #8e7853; font: 600 .85rem/1.1 var(--font); }
.portfolio-watch:hover { background: #ffe1a5; }
.participant-jump {
  display: inline-flex; align-items: center; min-height: 44px; margin-inline: .9rem;
  color: var(--accent); text-decoration: underline; text-underline-offset: .25em;
}
.portfolio-play, .film-play::after {
  width: 0; height: 0; display: block;
  border-top: .34rem solid transparent; border-bottom: .34rem solid transparent; border-left: .55rem solid currentColor;
}
.portfolio-portrait, .portfolio-stills a, .portfolio-event-photo { display: block; position: relative; overflow: hidden; }
.portfolio-portrait { min-height: 27rem; background: #384e59; }
.portfolio-portrait img { height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 50% 33%; }
.portfolio-enlarge {
  position: absolute; right: .65rem; bottom: .65rem; width: 2.15rem; height: 2.15rem;
  background: #0f161dd4; border: 1px solid #ffffff85; border-radius: 50%; pointer-events: none;
}
.portfolio-enlarge::before, .portfolio-enlarge::after {
  position: absolute; content: ""; width: .37rem; height: .37rem; border-color: white; border-style: solid;
}
.portfolio-enlarge::before { top: .6rem; right: .6rem; border-width: 1.5px 1.5px 0 0; }
.portfolio-enlarge::after { bottom: .6rem; left: .6rem; border-width: 0 0 1.5px 1.5px; }
.portfolio-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem 3rem; margin-bottom: clamp(1.25rem, 2.4vw, 2rem); }
.portfolio-section-head h3 { font-size: clamp(1.5rem, 3.5vw, 3rem); line-height: 1.42; letter-spacing: -.045em; }
html[lang=km] .portfolio-section-head h3 { letter-spacing: 0; line-height: 1.55; }
.portfolio-section-head p { max-width: 44ch; font-size: 1rem; line-height: 1.8; }
.portfolio-workshop { padding: clamp(2rem, 4vw, 3.8rem) var(--pad); background: var(--cream); color: var(--ink); }
.portfolio-workshop .portfolio-section-head p { color: #465155; }
.portfolio-stills { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.15rem 1.4rem; }
.portfolio-stills figure { min-width: 0; display: flex; flex-direction: column; }
.portfolio-stills .portfolio-lead-photo { grid-row: span 2; }
.portfolio-stills a { background: #d6cdbd; }
.portfolio-stills img { height: auto; aspect-ratio: 16/9; object-fit: cover; }
.portfolio-stills .portfolio-lead-photo a { flex: 1; min-height: 0; }
.portfolio-stills .portfolio-lead-photo img { position: absolute; inset: 0; height: 100%; object-position: 50% 52%; }
.portfolio-stills figcaption { margin-top: .45rem; font-weight: 600; line-height: 1.55; }
.portfolio-study { border-top: 1px solid #c1baaa; margin-top: 1.6rem; padding-top: .55rem; }
.portfolio-study summary { padding: .65rem 0; cursor: pointer; font-weight: 600; }
.portfolio-study p { max-width: 70ch; line-height: 1.85; }
.portfolio-resources { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.portfolio-resources a { display: inline-flex; align-items: center; min-height: 44px; color: #53401c; text-decoration: underline; text-underline-offset: .25em; }
.portfolio .portfolio-workshop :focus-visible { outline-color: #70531f; }
.portfolio-participants { padding: clamp(2rem, 4vw, 3.8rem) var(--pad); background: #17282e; scroll-margin-top: .5rem; }
.participant-photos { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.4rem 1.1rem; }
.participant-photos figure:first-child { grid-column: 1/-1; }
.participant-photos a { position: relative; display: block; background: #101b20; }
.participant-photos img { aspect-ratio: 16/9; object-fit: cover; height: auto; }
.participant-photos figure:first-child img { aspect-ratio: 2.9; object-position: 50% 61%; }
.participant-photos figcaption { color: var(--cream); font-weight: 600; margin-top: .5rem; }
@media(max-width:760px) {
  .participant-photos { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem .75rem; }
  .participant-photos figure:first-child img { aspect-ratio: 16/9; }
  .participant-photos figcaption { font-size: .95rem; }
}
.portfolio-films { padding: clamp(2rem, 4vw, 3.8rem) var(--pad); background: #101d25; }
.portfolio-film-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.3rem; }
.portfolio-film { display: grid; grid-template-columns: minmax(6.2rem, .72fr) minmax(0, 1fr); align-items: center; background: #192b34; border: 1px solid #425158; }
.film-frame { position: relative; }
.film-frame img { height: clamp(11rem,17.5vw,15rem); object-fit: cover; object-position: center 51%; }
.film-play {
  display: grid; place-items: center; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 2.75rem; height: 2.75rem; border-radius: 50%; color: white; border: 1px solid white; background: #101a22a6;
}
.film-play::after { content: ""; margin-left: .16rem; }
.film-info { padding: clamp(.85rem,2vw,1.75rem); }
.film-info h4 { font-size: clamp(1.06rem,1.6vw,1.45rem); line-height: 1.65; }
.film-info p { color: var(--accent); margin-top: .4rem; font-variant-numeric: tabular-nums; }
.portfolio-film:hover { border-color: var(--accent); background: #1e323d; }
.portfolio-event { display: grid; grid-template-columns: 1fr 1.05fr; align-items: stretch; background: #19262a; }
.portfolio-event-photo { align-self: center; }
.portfolio-event-photo img { height: auto; }
.portfolio-event-copy { padding: var(--pad); align-self: center; }
.portfolio-event-copy h3 { font: 400 clamp(2.65rem,5.6vw,5.3rem)/1.02 Georgia, "Times New Roman", serif; letter-spacing: -.055em; margin-top: 1.2rem; }
.portfolio-year { display: block; color: var(--accent); font: italic 400 clamp(1.9rem,3.8vw,3.4rem)/1.25 Georgia,serif; margin: .6rem 0 1.25rem; }
#portfolio-viewer {
  width: min(64rem,calc(100% - 1.5rem)); max-width: none; padding: 0; box-sizing: border-box;
  max-height: calc(100dvh - 1rem); border: 1px solid #56616a; border-radius: .5rem; background: #0b1219; color: #f6f2e9; overflow: auto;
}
#portfolio-viewer::backdrop { background: #04080de8; }
.viewer-bar, .viewer-controls { display: flex; align-items: center; gap: 1rem; padding: .5rem 1rem; justify-content: space-between; }
.viewer-bar strong { font-size: 1rem; }
#portfolio-viewer button { border: 1px solid #607079; background: #182630; color: #f5f1e9; min-height: 44px; min-width: 44px; border-radius: .3rem; }
#portfolio-viewer .viewer-close { font: 400 1.8rem/1 var(--font); }
.viewer-stage { background: #05090b; display: grid; place-items: center; }
.viewer-stage img, .viewer-stage video { display: block; width: 100%; height: min(68vh,40rem); height: min(68dvh,40rem); object-fit: contain; }
.viewer-controls button { padding: .3rem 1rem; }
.viewer-count { color: var(--muted); font-variant-numeric: tabular-nums; }
html.portfolio-viewing { overflow: hidden; }
@media(prefers-reduced-motion:no-preference) and (hover:hover) {
  .portfolio-stills img, .portfolio-event-photo img { transition: transform .38s ease; }
  .portfolio-stills a:hover img, .portfolio-event-photo:hover img { transform: scale(1.025); }
}
@media(max-width:760px) {
  .portfolio-hero { grid-template-columns: 1fr; }
  .portfolio-portrait { grid-row: 1; min-height: 0; aspect-ratio: 5/4; }
  .portfolio-portrait img { object-position: 50% 27%; }
  .portfolio-section-head { display: block; }
  .portfolio-section-head p { margin-top: .65rem; max-width: 60ch; }
  .portfolio-stills { gap: 1rem .75rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portfolio-stills .portfolio-lead-photo { grid-column: 1/-1; grid-row: auto; }
  .portfolio-stills .portfolio-lead-photo img { position: static; height: auto; }
  .portfolio-film-list { grid-template-columns: 1fr; gap: .85rem; }
  .portfolio-film { grid-template-columns: minmax(6.2rem, .6fr) 1.2fr; }
  .film-frame img { height: 10rem; }
  .portfolio-event-copy h3 { font-size: clamp(2rem,7vw,3.4rem); }
}
@media(max-width:520px) {
  .portfolio { width: calc(100% - 1.25rem); }
  .portfolio-portrait { aspect-ratio: 1.2; }
  .portfolio-stills figcaption { font-size: .9rem; }
  .portfolio-event { grid-template-columns: 1fr; }
  .portfolio-event-copy { grid-row: 1; padding-block: 1.75rem; }
  .portfolio-event-copy h3 br { display: none; }
  .portfolio-event-photo { margin: 0 var(--pad) var(--pad); }
  .portfolio-year { margin: .4rem 0 .75rem; }
}
