/* Portfolio pages extend Krummium's existing gray glass panels and fonts. */
body.portfolio-layout { display: flow-root; }
.portfolio-layout *, .portfolio-layout *::before, .portfolio-layout *::after { box-sizing: border-box; }
.portfolio-hero {
    position: relative;
    margin-top: 0;
    /* The content panels start while the document-anchored 80vh slideshow
       is still behind the page, rather than waiting near its bottom. */
    min-height: 44vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(7rem, 12vh, 9rem) 1rem clamp(2rem, 5vh, 3rem);
    color: white;
    /* Image shading belongs to #bgSliderContainer::after, so it cannot
       suddenly stop at the hero/content boundary. */
    background: transparent;
}
.portfolio-hero-inner { width: min(850px, 100%); margin-inline: auto; }
.portfolio-eyebrow {
    padding: 0;
    margin: 0 0 .75rem;
    color: #b4ceff;
    text-transform: uppercase;
    letter-spacing: .13em;
    font: .8rem/1.5 monospace;
}
.portfolio-hero h1 {
    margin: .2rem 0 1rem;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.12;
    letter-spacing: -.025em;
    text-wrap: balance;
    text-shadow: 0 3px 20px rgba(0,0,0,.75);
}
.portfolio-hero .portfolio-lead {
    max-width: 740px;
    padding: 0;
    margin: 0 auto;
    color: #f0f0f0;
    font-size: clamp(1.05rem, 1.65vw, 1.3rem);
    line-height: 1.75;
    text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.portfolio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.portfolio-hero .portfolio-actions { justify-content: center; margin-top: 2rem; }
.portfolio-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .8rem 1.25rem;
    border: 1px solid rgba(255,255,255,.37);
    border-radius: 12px;
    background: rgba(38,38,38,.78);
    color: #fff;
    font: .97rem/1.4 monospace;
    text-decoration: none;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.portfolio-button.primary { border-color: rgba(169,199,255,.75); background: rgba(40,68,114,.87); }
.portfolio-button:hover, .portfolio-button:focus-visible { background: #454545; color: #fff; transform: translateY(-2px); }
.portfolio-button:focus-visible, .portfolio-text-link:focus-visible { outline: 2px solid #a8c5ff; outline-offset: 4px; }
.portfolio-scroll-cue {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #f0f0f0;
    text-decoration: none;
    white-space: nowrap;
    font: .88rem monospace;
}
.portfolio-scroll-cue:hover { color: #a8c5ff; }
.portfolio-main {
    position: relative;
    z-index: 1;
    width: min(95vw, 1600px);
    margin: 0 auto 3rem;
    display: flow-root; /* prevent first-child margin collapsing into hero */
}
/* Start the first panel flush with the hero rather than leaving a bright
   strip of unshaded image at their boundary. */
.portfolio-main > .portfolio-panel:first-child {
    margin-top: 0;
}
.portfolio-panel {
    min-width: 0;
    margin: 1.5rem 0;
    padding: clamp(1.3rem, 3.5vw, 2.5rem);
    /* Real charcoal backing, not transparency produced by backdrop blur. */
    background: rgba(32,32,32,.97);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 24px;
    box-shadow: 0 14px 35px rgba(0,0,0,.32);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: white;
}
.portfolio-panel h2 { font-size: clamp(1.45rem, 2.55vw, 2rem); line-height: 1.25; margin: .1rem 0 1rem; }
.portfolio-panel p:not(.portfolio-eyebrow) { padding: 0; margin: 0 0 1.2rem; line-height: 1.75; color: #e2e2e2; font-size: 1.04rem; }
.portfolio-panel p:last-child { margin-bottom: 0; }
.portfolio-section-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.4rem; }
.portfolio-section-heading h2 { margin-bottom: 0; }
.portfolio-section-heading .portfolio-eyebrow { margin-bottom: .45rem; }
.portfolio-text-link { display: inline-block; color: #a8c5ff; font: .95rem monospace; text-decoration: none; white-space: nowrap; }
.portfolio-text-link:hover { color: #d1dfff; text-decoration: underline; }
.portfolio-two-column { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap: 1.5rem; }
.portfolio-two-column .portfolio-panel { margin: 0; }
.portfolio-connect { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem 2rem; }
.portfolio-connect > div:first-child { flex:1 1 360px; }
.portfolio-connect .portfolio-actions { flex: 0 1 auto; }
.portfolio-muted { color: #cfcfcf; }
.portfolio-article { max-width: 100%; }
.portfolio-readable-list { margin: 0; padding-left: 1.3rem; }
.portfolio-readable-list li { font-size: 1.03rem; line-height: 1.75; padding-left: .15rem; margin-bottom: .6rem; }
.portfolio-focus-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.2rem; }
.portfolio-focus-grid .portfolio-panel { margin: 0; }
.portfolio-focus-number { color:#b4ceff; letter-spacing:.08em; font: .77rem/1.5 monospace; }
.portfolio-focus h2 { margin-top: 1rem; font-size: clamp(1.3rem, 2vw, 1.55rem); }
/* Shared project cards are intentionally the same as the Projects catalog. */
.portfolio-panel .project-card-grid { margin-top: .5rem; }
.portfolio-panel .project-card { box-shadow: none; }
@media (max-width: 850px) {
    .portfolio-two-column { grid-template-columns:1fr; }
    .portfolio-focus-grid { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
    .portfolio-main { width: 95vw; }
    .portfolio-panel { border-radius: 17px; margin: 1rem 0; }
    .portfolio-hero { padding-top: 8rem; }
    .portfolio-scroll-cue { bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .portfolio-button { transition: none; }
    .portfolio-button:hover { transform: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .portfolio-panel { background-color: rgba(32,32,32,.97); }
}

/* Firefox/WebRender: use a painted panel rather than a filtered backdrop.
   The support query is intentionally Firefox-specific; a generic
   @supports not (backdrop-filter) cannot detect compositor bugs. */
@supports (-moz-appearance: none) {
    .portfolio-panel {
        background-color: rgba(32, 32, 32, .97);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}
