/* Motion supports the evidence; the unenhanced page always remains readable. */
.portfolio-showcase-status {
    display: flex; align-items: center; gap: 1rem; margin-top: 1rem;
}
.portfolio-showcase-position {
    flex-shrink: 0; color: var(--portfolio-blue); font-size: .95rem;
    font-weight: 900; font-variant-numeric: tabular-nums;
}
.portfolio-showcase-track {
    display: block; width: min(13rem, 100%); height: 3px;
    overflow: hidden; background: rgba(38, 68, 217, .15);
}
.portfolio-showcase-track > span {
    display: block; width: 100%; height: 100%; background: var(--portfolio-blue);
    transform: scaleX(var(--showcase-progress, .25)); transform-origin: left;
    transition: transform 480ms cubic-bezier(.22, 1, .36, 1);
}
.portfolio-showcase-active {
    min-height: 3.2em; max-width: 29ch; color: var(--portfolio-muted);
    font-size: .9rem; font-weight: 750; line-height: 1.6; overflow-wrap: anywhere;
}
.portfolio-scroll-card {
    position: relative; isolation: isolate;
    box-shadow: 0 8px 24px rgba(17, 17, 17, .035);
    transition: border-color 220ms ease, filter 260ms ease, opacity 260ms ease,
                transform 260ms ease, box-shadow 400ms ease;
}
.portfolio-scroll-card:focus-within { opacity: 1; transform: scale(1); filter: none; }
.portfolio-scroll-card.is-active { box-shadow: 0 24px 64px rgba(38, 68, 217, .1); }
.portfolio-scroll-card::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    opacity: 0; background: radial-gradient(400px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(255, 191, 22, .13), transparent 70%);
    transition: opacity 280ms ease;
}
@media (hover: hover) and (pointer: fine) {
    .portfolio-scroll-card:hover::after { opacity: 1; }
    .portfolio-mega-button:hover { box-shadow: inset 0 -10px 0 var(--portfolio-green); }
    .portfolio-mega-button:hover > span { transform: translateY(-4px); }
    .portfolio-mega-button:hover::after { transform: translate(5px, -5px); }
}
.portfolio-mega-button {
    position: relative; gap: clamp(.6rem, 3vw, 2rem);
    padding: 2rem 1.25rem; text-wrap: balance;
    transition: box-shadow 280ms ease;
}
.portfolio-mega-button > span { min-width: 0; transition: transform 280ms cubic-bezier(.22, 1, .36, 1); }
.portfolio-mega-button::after {
    content: "↗"; flex-shrink: 0; color: var(--portfolio-yellow);
    font-size: clamp(2.2rem, 5vw, 5rem); font-weight: 700;
    transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
}
.portfolio-mega-button:focus-visible { outline: 4px solid var(--portfolio-yellow); outline-offset: -8px; }
.portfolio-motion-ready [data-portfolio-reveal] {
    transition: opacity 650ms ease, translate 650ms cubic-bezier(.22, 1, .36, 1);
}
.portfolio-motion-ready [data-portfolio-reveal]:not(.is-revealed) {
    opacity: 0; translate: 0 20px;
}
html[data-portfolio-motion="reduce"] .portfolio-motion-ready [data-portfolio-reveal] { opacity: 1; translate: none; transition: none; }
html[data-portfolio-motion="reduce"] .portfolio-showcase-track > span,
html[data-portfolio-motion="reduce"] .portfolio-scroll-card,
html[data-portfolio-motion="reduce"] .portfolio-mega-button,
html[data-portfolio-motion="reduce"] .portfolio-mega-button > span,
html[data-portfolio-motion="reduce"] .portfolio-mega-button::after { transition: none; }
html[data-portfolio-motion="reduce"] .portfolio-scroll-card::after { display: none; }
html[data-portfolio-motion="reduce"] .portfolio-mega-button:hover > span,
html[data-portfolio-motion="reduce"] .portfolio-mega-button:hover::after { transform: none; }


@media (max-width: 639px) {
    .portfolio-mega-button::after { display: none; }
}

.portfolio-teaching-section {
    padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3.5rem);
    border-top: 2px solid var(--portfolio-ink, #111); background: #fffdf4;
    scroll-margin-top: calc(var(--main-nav-height, 88px) + 1rem);
}
.portfolio-teaching-header { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.portfolio-teaching-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); align-items: start; }
.portfolio-teaching-grid .portfolio-history-item {
    display: block; padding: 0; border: 0; min-width: 0;
}
.portfolio-teaching-media { aspect-ratio: 3 / 2; min-height: 0; border: 2px solid #111; background: #fff; }
.portfolio-teaching-story--photo .portfolio-teaching-media img { object-fit: cover; }
.portfolio-teaching-media.portfolio-visible-gallery--double .portfolio-visible-gallery-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.portfolio-teaching-body { padding-top: 1.1rem; overflow-wrap: anywhere; word-break: keep-all; }
.portfolio-teaching-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: .85rem; font-weight: 750; }
.portfolio-teaching-client { margin: 1rem 0 .5rem; font-size: clamp(.95rem, 1.35vw, 1.1rem); font-weight: 850; }
.portfolio-teaching-title { margin: 0 0 1rem; font-size: clamp(1.3rem, 2vw, 1.9rem); line-height: 1.3; font-weight: 900; letter-spacing: -.025em; color: var(--portfolio-blue); }
.portfolio-teaching-summary { margin: 1.1rem 0 0; font-size: 1rem; line-height: 1.7; font-weight: 600; }
.portfolio-teaching-program { margin: .9rem 0 0; font-size: .88rem; line-height: 1.6; color: var(--portfolio-muted); }
.portfolio-teaching-syllabus { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--portfolio-line); font-size: .88rem; line-height: 1.7; }
.portfolio-teaching-syllabus h4 { margin: 0 0 .35rem; font-weight: 850; }
.portfolio-teaching-syllabus p { margin: 0; }
.portfolio-history-item { scroll-margin-top: calc(var(--main-nav-height, 88px) + 1.5rem); }
@media (max-width: 899px) {
    .portfolio-teaching-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .portfolio-teaching-grid .portfolio-history-item + .portfolio-history-item { padding-top: 2rem; border-top: 1px solid var(--portfolio-line); }
    .portfolio-teaching-media { aspect-ratio: 3 / 2; }
    .portfolio-teaching-client { font-size: 1rem; }
    .portfolio-teaching-title { font-size: clamp(1.5rem, 4vw, 2rem); }
}

/* Authored tools lead; their screenshots and scope are readable on the page. */
.portfolio-work-section {
    padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3.5rem);
    border-top: 2px solid var(--portfolio-ink, #111); background: #fffdf4;
    scroll-margin-top: calc(var(--main-nav-height, 88px) + 1rem);
}
.portfolio-work-header { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.portfolio-work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2.5rem); align-items: start; }
.portfolio-featured-work { min-width: 0; scroll-margin-top: calc(var(--main-nav-height, 88px) + 1rem); }
.portfolio-work-media { aspect-ratio: 16 / 10; min-height: 0; border: 2px solid var(--portfolio-ink); background: #151922; }
.portfolio-work-media .portfolio-visible-gallery-item img { object-fit: contain; }
.portfolio-work-body { padding-top: 1rem; word-break: keep-all; overflow-wrap: anywhere; }
.portfolio-work-capabilities { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: 0 0 .7rem; padding: 0; list-style: none; color: var(--portfolio-blue); font-size: .82rem; line-height: 1.5; font-weight: 850; }
.portfolio-work-capabilities li { border-bottom: 2px solid var(--portfolio-yellow); }
.portfolio-work-title { margin: 0 0 .8rem; font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.25; letter-spacing: -.025em; font-weight: 900; }
.portfolio-work-summary { font-size: .94rem; line-height: 1.7; font-weight: 600; }
.portfolio-work-meta { margin-top: .9rem; color: var(--portfolio-muted); font-size: .78rem; line-height: 1.5; }
.portfolio-work-links { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; }
.portfolio-scroll-summary--full { display: block; overflow: visible; -webkit-line-clamp: unset; }
@media (max-width: 699px) {
    .portfolio-work-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .portfolio-featured-work + .portfolio-featured-work { border-top: 1px solid var(--portfolio-line); padding-top: 1.5rem; }
}

/* Show the existing submission's actual dashboard states, retaining full evidence in zoom. */
.portfolio-work-media--dashboard .portfolio-visible-gallery-item img { object-fit: cover; object-position: center bottom; }

/* Continue the original portfolio's depth, blur and image-led motion language. */
html[data-portfolio-motion="full"] { scroll-behavior: smooth; }
.portfolio-display-settings { padding: .5rem 1.5rem; background: var(--portfolio-paper); }
.portfolio-display-settings > summary { width: fit-content; min-height: 44px; margin-left: auto; padding: .75rem 0; color: #5b5c56; font-size: .75rem; font-weight: 600; cursor: pointer; }
.portfolio-display-settings > summary:hover { color: var(--portfolio-ink); }
.portfolio-display-settings > summary:focus-visible { outline: 3px solid var(--portfolio-blue); outline-offset: 3px; }
.portfolio-display-settings-controls { display: flex; justify-content: flex-end; padding: .25rem 0 .5rem; }
.portfolio-motion-toggle { border: 1px solid var(--portfolio-ink); border-radius: 999px; min-height: 2.75rem; padding: .45rem 1rem; font-size: .78rem; font-weight: 800; background: var(--portfolio-paper); color: var(--portfolio-ink); cursor: pointer; }
.portfolio-motion-toggle[hidden] { display: none; }
.portfolio-motion-toggle:hover { background: var(--portfolio-ink); color: var(--portfolio-paper); }
.portfolio-motion-toggle:focus-visible { outline: 3px solid var(--portfolio-blue); outline-offset: 3px; }
.portfolio-reading-progress { position: fixed; z-index: 150; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--portfolio-green), var(--portfolio-blue)); transform: scaleX(var(--reading-progress, 0)); transform-origin: left; pointer-events: none; }
.portfolio-motion-ready [data-portfolio-reveal] {
    transition: opacity 650ms ease, transform 900ms cubic-bezier(.16, 1, .3, 1), filter 750ms ease;
    transition-delay: var(--reveal-delay, 0ms);
    translate: none;
}
.portfolio-motion-ready [data-portfolio-reveal]:not(.is-revealed) {
    opacity: 0; translate: none;
    transform: perspective(1400px) translate3d(0, 42px, 0) rotateX(3deg) scale(.975);
    filter: blur(6px);
}
.portfolio-motion-ready [data-portfolio-reveal].is-revealed {
    opacity: 1; transform: none; filter: none;
}
.portfolio-motion-ready [data-portfolio-reveal]:focus-within {
    opacity: 1; transform: none; filter: none; transition-delay: 0ms;
}
.portfolio-motion-ready [data-portfolio-reveal-kind="card"] .portfolio-visible-gallery {
    clip-path: inset(0 0 0 0); transition: clip-path 1000ms cubic-bezier(.16, 1, .3, 1), transform 260ms ease-out, box-shadow 350ms ease;
}
.portfolio-motion-ready [data-portfolio-reveal-kind="card"]:not(.is-revealed) .portfolio-visible-gallery { clip-path: inset(0 0 18% 0); }
.portfolio-interactive-media { position: relative; transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transform-origin: center; transition: transform 260ms ease-out, box-shadow 350ms ease; }
.portfolio-interactive-media.is-pointer-active { box-shadow: 0 20px 42px rgba(38,68,217,.14); }
.portfolio-media-light { position: absolute; z-index: 3; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(380px circle at var(--media-spot-x, 50%) var(--media-spot-y, 50%), rgba(255,255,255,.2), rgba(255,191,22,.075) 45%, transparent 75%); transition: opacity 300ms ease; }
.portfolio-interactive-media.is-pointer-active > .portfolio-media-light { opacity: 1; }
html[data-portfolio-motion="full"] .portfolio-teaching-story--photo .portfolio-visible-gallery-item--cover img { transform: translate3d(0, var(--photo-drift, 0px), 0) scale(1.07); }
.portfolio-work-capabilities li { position: relative; }
html[data-portfolio-motion="full"] .portfolio-external-link > span[aria-hidden="true"] { display: inline-block; transition: transform 220ms ease; }
html[data-portfolio-motion="full"] .portfolio-external-link:hover > span[aria-hidden="true"] { transform: translate(3px, -3px); }
html[data-portfolio-motion="reduce"] { scroll-behavior: auto; }
html[data-portfolio-motion="reduce"] .portfolio-reading-progress,
html[data-portfolio-motion="reduce"] .portfolio-media-light { display: none; }
html[data-portfolio-motion="reduce"] .portfolio-interactive-media { transform: none; transition: none; box-shadow: none; }
html[data-portfolio-motion="reduce"] [data-portfolio-reveal] { opacity: 1; transform: none; filter: none; translate: none; transition: none; }

/* Selected projects lead in the owner's order, with image-and-story compositions. */
.portfolio-work-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4rem); }
.portfolio-featured-work + .portfolio-featured-work { border-top: 1px solid var(--portfolio-ink); padding-top: clamp(2rem, 4vw, 3rem); }
@media (min-width: 1000px) {
    .portfolio-work-grid:has(> .portfolio-featured-work:only-child) { grid-template-columns: minmax(0, 1fr); }
    .portfolio-featured-work { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
    .portfolio-featured-work .portfolio-work-body { padding-top: 0; }
    .portfolio-featured-work .portfolio-work-media { position: sticky; top: calc(var(--main-nav-height, 88px) + 1.5rem); }
}
@media (max-width: 999px) {
    .portfolio-work-grid:has(> .portfolio-featured-work:only-child) { grid-template-columns: minmax(0, 1fr); }
}
@media print {
    .portfolio-display-settings, .portfolio-reading-progress, .portfolio-media-light { display: none; }
    [data-portfolio-reveal], .portfolio-interactive-media { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
}
