/* ═══════════════════════════════════════════════════════════════════
   PORTFOLIO — magazine-style scrolling page
   Overrides global style.css width constraints for a full-bleed feel.
   ═══════════════════════════════════════════════════════════════════ */

:root {

    --pf-theme-1: #c0392b;   /* Tools for Thought — red */
    --pf-theme-2: #1f6f8b;   /* Collaboration — teal */
    --pf-theme-3: #4a6b3a;   /* Foundations — moss */
}
@media (prefers-color-scheme: dark) {
    :root {
        --pf-theme-1: #e8654a;
        --pf-theme-2: #5fb8d6;
        --pf-theme-3: #9bbf85;
    }
}

/* Make body full bleed for the portfolio */
body.portfolio-page {
    max-width: none;
    padding: 0;
    margin: 0;
    background: var(--bg);
}

/* Reusable column container */
.pf-col, .pf-wide {
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}
.pf-col { max-width: 760px; }
.pf-wide { max-width: 1180px; }

.pf-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-light);
    margin-bottom: 16px;
}
.pf-lead {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.45;
    font-weight: 400;
    color: var(--text);
}
.pf-dropcap::first-letter {
    font-weight: 900;
    font-size: 4.5em;
    float: left;
    line-height: 0.9;
    margin: 0.05em 0.12em -0.05em 0;
    color: var(--primary);
}

/* ─── HERO ───────────────────────────────────────────────────────── */
.pf-hero {
    position: relative;
    min-height: 78vh;
    display: grid;
    grid-template-columns: 1fr;
    background: #14101c;
    color: #f6e9d2;
    overflow: hidden;
}
.pf-hero__bg {
    position: absolute; inset: 0;
    background-image: url('images/portfolio/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    filter: grayscale(0.15) contrast(1.05) brightness(0.55);
    z-index: 0;
}
.pf-hero__bg::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(20,16,28,0.55) 0%,
        rgba(20,16,28,0.35) 30%,
        rgba(20,16,28,0.25) 50%,
        rgba(20,16,28,0.7) 100%);
}
.pf-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 140px 32px 80px;
    width: 100%;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px 72px;
    align-items: start;
    min-height: inherit;
}
.pf-hero__identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
}
.pf-hero__photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(246,233,210,0.45);
    box-shadow: 0 4px 32px rgba(0,0,0,0.45);
}
.pf-hero__name {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pf-hero__name strong {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}
.pf-hero__name span {
    color: rgba(246,233,210,0.7);
    font-size: 0.8rem;
    line-height: 1.4;
}
.pf-hero__contacts {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
}
.pf-hero__contacts a {
    color: rgba(246,233,210,0.6);
    transition: color 0.15s;
    display: flex;
    align-items: center;
}
.pf-hero__contacts a:hover { color: #ffb454; }
.pf-hero__content {
    display: flex;
    flex-direction: column;
}
body.portfolio-page .pf-hero__title {
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.035em;
    color: #f6e9d2;
    text-shadow: 0 2px 24px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.5);
    margin: 0;
}
body.portfolio-page .pf-hero__title em {
    font-style: italic;
    font-weight: 400;
    color: #f6e9d2;
}
body.portfolio-page .pf-hero__title .accent {
    color: #ffb454;
}
body.portfolio-page .pf-hero__sub {
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    line-height: 1.45;
    color: rgba(246,233,210,0.92);
    max-width: 56ch;
    margin-top: 48px;
}


.pf-hero__metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
    border-top: 1px solid rgba(246,233,210,0.25);
    padding-top: 28px;
}
.pf-hero__metric .num {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    color: #fff;
    line-height: 1;
    display: block;
}
.pf-hero__metric .label {
    font-size: 0.78rem;
    color: rgba(246,233,210,0.7);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 6px;
    display: block;
}
@media (max-width: 800px) {
    .pf-hero__inner {
        grid-template-columns: 1fr;
        padding: 48px 22px 40px;
        gap: 32px;
        align-items: start;
    }
    .pf-hero__identity {
        flex-direction: row;
        text-align: left;
        gap: 20px;
        align-items: center;
    }
    .pf-hero__photo { width: 80px; height: 80px; }
    .pf-hero__name { flex: 1; }
    .pf-hero__contacts { justify-content: flex-start; }
    .pf-hero__metrics { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

/* ─── SECTION FRAMEWORK ──────────────────────────────────────────── */
.pf-section {
    padding: 96px 0;
    position: relative;
}
.pf-section--alt { background: var(--bg-alt); }
.pf-section--dark { background: #1a1410; color: #f6e9d2; }
@media (prefers-color-scheme: dark) {
    .pf-section--dark { background: #0a0806; }
}
.pf-section--dark h1, .pf-section--dark h2, .pf-section--dark h3, .pf-section--dark h4 { color: #fff; }
.pf-section--dark .pf-eyebrow { color: rgba(246,233,210,0.7); }
.pf-section--dark a { color: var(--accent); border-bottom-color: color-mix(in srgb, var(--accent) 35%, transparent); }

.pf-section__head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 56px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 28px;
    text-align: left;
}

/* Vision / "Research Vision" two-column */
.pf-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}
.pf-vision .pf-vision__lead { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.pf-vision .pf-vision__body { font-size: 1.05rem; }
@media (max-width: 800px) {
    .pf-vision { grid-template-columns: 1fr; gap: 28px; }
}

/* Pull quote */
.pf-pullquote {
    border-top: 3px solid var(--primary);
    border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    padding: 28px 0;
    margin: 48px 0;
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    line-height: 1.35;
    font-style: italic;
    font-weight: 400;
    color: var(--text);
}
.pf-pullquote cite {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 14px;
}
.pf-section--dark .pf-pullquote { color: #fff; border-bottom-color: rgba(246,233,210,0.2); }
.pf-section--dark .pf-pullquote cite { color: rgba(246,233,210,0.7); }

/* ─── 3 THEMES grid ───────────────────────────────────────────────── */
.pf-themes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.pf-theme-card {
    background: var(--bg-alt);
    border-top: 4px solid var(--pf-theme-c, var(--primary));
    padding: 28px 28px 32px;
    display: flex; flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pf-theme-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.pf-theme-card .yr {
    font-size: 1.05rem; font-weight: 700;
    color: var(--pf-theme-c, var(--primary));
    margin-bottom: 6px;
}
.pf-theme-card h3 { margin-bottom: 12px; }
.pf-theme-card .desc {
    font-size: 0.95rem; color: var(--text-light);
    margin-bottom: 16px; flex: 1;
}
.pf-theme-card ul {
    list-style: none; padding: 0; margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
    padding-top: 14px;
}
.pf-theme-card li { padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
.pf-theme-card li strong { color: var(--text); font-weight: 500; }
.pf-theme-card li span { color: var(--pf-theme-c); font-weight: 600; flex-shrink: 0; }
@media (max-width: 800px) {
    .pf-themes { grid-template-columns: 1fr; gap: 20px; }
}

/* Era timeline */
.pf-eras {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 16px;
    border-top: 2px solid var(--border);
}
.pf-era {
    padding: 24px 24px 0 0;
}
.pf-era:last-child { padding-right: 0; }
.pf-era .yr {
    font-size: 1.15rem; font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}
.pf-era h4 { margin-bottom: 10px; }
.pf-era p { font-size: 0.92rem; color: var(--text-light); }
@media (max-width: 800px) {
    .pf-eras { grid-template-columns: 1fr; }
    .pf-era { padding: 20px 0; }
}

/* Themes appear below eras */
.pf-themes { margin-top: 48px; }

/* Research-map swimlane image */
.pf-research-map {
    margin: 56px 0 0;
    text-align: center;
}
.pf-research-map a { border: none; display: block; }
.pf-research-map img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(42,32,25,0.12);
}
.pf-research-map figcaption {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-top: 14px;
}

/* ─── THEME OPENER (full-bleed banner with overlaid title) ──────── */
.pf-theme-opener {
    position: relative;
    min-height: 56vh;
    display: flex; align-items: end;
    background-size: cover;
    background-position: center;
    color: #fff;
    margin-bottom: 0;
}
.pf-theme-opener::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(20,16,28,0.15) 0%,
        rgba(20,16,28,0.35) 60%,
        rgba(20,16,28,0.85) 100%);
}
.pf-theme-opener__inner {
    position: relative; z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 60px 32px 50px;
    width: 100%;
}
.pf-theme-opener .num {
    font-size: 0.95rem; font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    display: block;
}
.pf-theme-opener h2 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    color: #fff;
    line-height: 1;
    max-width: 16ch;
}
body.portfolio-page .pf-theme-opener--amber h2 { color: #ffb454 !important; }
.pf-theme-opener .pf-tagline {
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    color: rgba(255,255,255,0.92);
    margin-top: 20px;
    max-width: 50ch;
    line-height: 1.4;
}

/* ─── THEME BODY ─────────────────────────────────────────────────── */
.pf-theme-body { padding: 80px 0; }

.pf-magazine {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
    align-items: start;
}
.pf-magazine--rev { direction: rtl; }
.pf-magazine--rev > * { direction: ltr; }
@media (max-width: 800px) {
    .pf-magazine, .pf-magazine--rev { grid-template-columns: 1fr; gap: 28px; direction: ltr; }
}

.pf-figure {
    display: block;
    margin: 0;
}
.pf-figure img {
    width: 100%; height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}
.pf-figure figcaption {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 10px;
    line-height: 1.4;
    font-style: italic;
}
.pf-figure--stack img + img { margin-top: 28px; }

/* Bulleted findings inside magazine prose */
body.portfolio-page .pf-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1em;
}
body.portfolio-page .pf-bullets li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    line-height: 1.5;
}
body.portfolio-page .pf-bullets li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.65em;
    width: 8px; height: 8px;
    background: var(--pf-theme-2);
    border-radius: 50%;
}

/* Finding cards within theme */
.pf-findings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 1180px;
    margin: 56px auto 0;
    padding: 0 28px;
}
.pf-finding {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    padding: 24px 0;
    border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    align-items: start;
}
.pf-finding:last-child { border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }
.pf-finding__img img { width: 100%; height: auto; border-radius: 4px; display: block; }
.pf-finding__body h4 { margin-bottom: 8px; }
.pf-finding__body p { font-size: 0.95rem; margin-bottom: 8px; }
.pf-finding__cite {
    font-size: 0.78rem;
    color: var(--text-light);
    font-style: italic;
}
.pf-finding__cite a { color: var(--text-light); border-bottom-color: transparent; }
.pf-finding__cite a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.pf-finding__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 6px;
    vertical-align: middle;
}
@media (max-width: 700px) {
    .pf-finding { grid-template-columns: 1fr; gap: 14px; }
}

/* Design Implications callout */
.pf-implications {
    background: var(--bg-alt);
    border-left: 4px solid var(--primary);
    padding: 32px 36px;
    margin: 56px auto 0;
    max-width: 1180px;
}
.pf-section--dark .pf-implications { background: rgba(255,255,255,0.05); border-left-color: var(--accent); }
.pf-implications h4 {
    font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--primary);
    margin-bottom: 14px;
}
.pf-section--dark .pf-implications h4 { color: var(--accent); }
.pf-implications ol {
    margin: 0; padding: 0; counter-reset: imp;
    list-style: none;
    font-size: 1.1rem;
}
.pf-implications li {
    counter-increment: imp;
    padding: 12px 0 12px 60px;
    position: relative;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
}
.pf-section--dark .pf-implications li { border-bottom-color: rgba(255,255,255,0.12); }
.pf-implications li:last-child { border-bottom: none; }
.pf-implications li::before {
    content: counter(imp, decimal-leading-zero);
    position: absolute; left: 0; top: 14px;
    font-size: 1.5rem; font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.pf-section--dark .pf-implications li::before { color: var(--accent); }

/* ─── INNOVATION grid (Patents + Hackathons) ─────────────────────── */
.pf-innovation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}
@media (max-width: 800px) { .pf-innovation { grid-template-columns: 1fr; } }
.pf-innovation h3 { margin-bottom: 24px; }

.pf-patents { display: grid; gap: 12px; }
.pf-patent-group {
    border-top: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    padding-top: 12px;
}
.pf-patent-group h4 {
    font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--text-light);
    margin-bottom: 8px;
}
.pf-patent-group ul { list-style: none; padding: 0; margin: 0; }
.pf-patent-group li {
    padding: 6px 0;
    font-size: 0.9rem;
}
.pf-patent-group li em { font-style: italic; color: var(--text); }
.pf-patent-group li .meta {
    color: var(--text-light);
    font-size: 0.78rem;
    margin-left: 6px;
}

.pf-hacks { display: grid; gap: 18px; }
.pf-hack {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    align-items: start;
}
.pf-hack__img img { width: 100%; height: auto; display: block; border-radius: 3px; }
.pf-hack__year {
    font-size: 1.15rem; font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}
.pf-hack__title { font-weight: 600; font-size: 0.98rem; margin-bottom: 4px; }
.pf-hack__title .place {
    display: inline-block;
    font-size: 0.7rem; font-weight: 700;
    background: var(--primary);
    color: #fff;
    padding: 2px 7px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 6px;
    vertical-align: middle;
}
.pf-hack__title .place--gp { background: var(--accent); }
.pf-hack p {
    font-size: 0.85rem; color: var(--text-light);
    margin: 0; line-height: 1.45;
}

/* ─── PROMPTIONS feature row ─────────────────────────────────────── */
.pf-feature-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    max-width: 1180px;
    margin: 56px auto 0;
    padding: 0 28px;
    align-items: center;
}
@media (max-width: 800px) { .pf-feature-row { grid-template-columns: 1fr; } }
.pf-feature-row img {
    width: 100%; height: auto; display: block;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* ─── CLOSING / What's Next ──────────────────────────────────────── */
.pf-next-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1180px;
    margin: 56px auto 0;
    padding: 0 28px;
}
@media (max-width: 640px) { .pf-next-list { grid-template-columns: 1fr; gap: 24px; } }
.pf-next-item {
    border-top: 3px solid var(--accent);
    padding-top: 18px;
}
.pf-section--dark .pf-next-item { border-top-color: var(--accent); }
.pf-next-item h4 {
    font-size: 1.3rem; font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}
.pf-section--dark .pf-next-item p { color: rgba(246,233,210,0.85); }

/* ─── COLOPHON ───────────────────────────────────────────────────── */
#next { padding-bottom: 0; }
.pf-colophon {
    padding: 64px 28px;
    text-align: center;
    border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    background: var(--bg-alt);
}
.pf-colophon h3 {
    font-size: 2rem;
    margin-bottom: 14px;
}
.pf-colophon .links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
    margin-top: 24px;
}
.pf-colophon .links a {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--text);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}
.pf-colophon .links a:hover { background: var(--text); color: var(--bg); }

/* ─── PROGRESS BAR & SECTION SHIFT ───────────────────────────────── */
.pf-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
    transform-origin: 0 50%;
    transform: scaleX(0);
    z-index: 200;
    pointer-events: none;
    transition: transform 0.05s linear;
}

/* Anchor offset for sticky nav */
.pf-anchor { display: block; height: 60px; margin-top: -60px; visibility: hidden; pointer-events: none; }

/* ─── ALL PUBLICATIONS LIST (per theme) ──────────────────────────── */
.pf-pub-list {
    margin-top: 56px;
    padding: 28px 36px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.pf-pub-list > summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin: 0 0 18px;
    user-select: none;
}
.pf-pub-list > summary::-webkit-details-marker { display: none; }
.pf-pub-list > summary::marker { display: none; }
.pf-pub-list > summary::after { content: " ↓"; font-size: 0.9em; }
.pf-pub-list[open] > summary::after { content: " ↑"; }
.pf-pub-list > summary:hover { color: var(--primary); }
.pf-pub-list h5 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--primary);
    margin: 20px 0 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.pf-pub-list h5:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }
.pf-pub-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 32px;
}
.pf-pub-list li {
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 9px;
    break-inside: avoid;
}
.pf-pub-list a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: color 0.15s, border-color 0.15s;
}
.pf-pub-list a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.pf-pub-list .venue { color: var(--text-light); font-size: 0.76rem; }
@media (max-width: 700px) {
    .pf-pub-list ul { columns: 1; }
    .pf-pub-list { padding: 20px 18px; }
}


/* ─── FINDING CITE LINKS ──────────────────────────────────────────── */
.pf-finding__cite a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    transition: color 0.15s;
}
.pf-finding__cite a:hover { color: var(--primary); }

/* Print: simplify */
@media print {
    .pf-progress, .site-nav { display: none !important; }
    .pf-hero { min-height: auto; }
    .pf-hero__bg { display: none; }
    body.portfolio-page { background: #fff; color: #000; }
    .pf-section { padding: 32px 0; break-inside: avoid; }
    .pf-section--dark { background: #fff; color: #000; }
    .pf-section--dark h2, .pf-section--dark h3, .pf-section--dark h4, .pf-section--dark p { color: #000; }
}
