/* A short primary portfolio, with optional interactive depth. */
.portfolio-home > main > .section{padding-block:clamp(48px,6vw,78px)}
.portfolio-home .hero{padding-block:50px 52px}
.portfolio-home .hero-description{margin-bottom:22px}
.hero-direct-contact{font-size:13px;margin:15px 0 0}
.hero-direct-contact a,.contact-resume-formats a{text-decoration:underline;text-underline-offset:4px}
.selected-work-heading{max-width:760px;margin-bottom:26px}
.selected-work-heading .eyebrow{margin-bottom:10px}
.selected-work-heading h2{font-size:clamp(30px,3.7vw,45px);margin-bottom:12px}
.selected-work-heading>p:last-child{font-size:15px;line-height:1.7;margin:0}
.selected-work .featured-project-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.selected-work .featured-project-card{padding:25px;gap:0;min-width:0;overflow-wrap:anywhere;min-height:0}
.selected-work .featured-project-card h3{font:500 29px/1.17 var(--serif);margin:14px 0 12px;color:var(--ink)}
.selected-work .featured-project-card h3 a:hover{text-decoration:underline;text-underline-offset:4px}
.selected-work .selected-project-tools{font-size:12px;line-height:1.6;color:var(--secondary);margin:0 0 18px}
.selected-work .selected-project-role{font-size:14px;line-height:1.75;margin:0 0 20px;color:var(--ink)}
.selected-project-result{padding:16px 0;border-top:1px solid var(--border)}
.selected-project-label{font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--rose-dark)}
.selected-project-result p{font-size:14px;line-height:1.75;margin:7px 0 0;color:var(--ink)}
.selected-work .selected-project-scope{font-size:12px;line-height:1.65;margin:0 0 22px;color:var(--secondary)}
.selected-work .featured-more{display:block;font-size:13px;line-height:1.5;padding-top:15px;border-top:1px solid var(--border);text-decoration:underline;text-underline-offset:4px;margin-top:auto}
.portfolio-home #experience .section-heading{margin-bottom:28px}
.portfolio-home #about .portfolio-awards-photo{margin-top:20px}
.portfolio-explore-wrap{margin-block:12px 42px}
.portfolio-extras{border:1px solid var(--border);border-radius:16px;background:var(--paper,#fff)}
.portfolio-extras>.extras-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:25px 28px;border-radius:16px;min-height:90px}
.extras-summary-copy{display:grid;gap:5px;min-width:0}
.extras-summary-copy>h2{font:500 25px/1.25 var(--serif);color:var(--ink);margin:0}
.extras-summary-copy>p{font-size:13px;line-height:1.65;color:var(--secondary);margin:0}
.portfolio-extras>.extras-heading{border-bottom:1px solid var(--border);border-radius:16px 16px 0 0}
.portfolio-extras .section{padding-block:48px}
.portfolio-extras>.work-section .feature-visual{width:min(230px,100%);margin:0 auto 24px;min-height:0;padding:0;background:none}
.portfolio-extras>.work-section .feature-visual img{width:100%;height:auto;max-height:none}
.portfolio-extras>.work-section .feature-visual figcaption{position:static;max-width:100%;width:auto;transform:none;margin-top:10px}
.extras-jump{display:flex;flex-wrap:wrap;gap:10px 22px;padding:20px 28px;border-bottom:1px solid var(--border)}
.extras-jump a{font-size:13px;font-weight:700;color:var(--rose-dark);text-decoration:underline;text-underline-offset:4px}
.contact-actions,.case-contact-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px}
.contact-resume-formats{font-size:12px;margin-top:16px}
/* Featured case studies use one concise brief, followed by decisions and evidence. */
.featured-case .project-evidence-first{margin-bottom:22px}
.featured-case .project-evidence-first__grid{gap:12px}
.featured-case .project-evidence-first__item{min-width:0}
.featured-case .detail-card{margin-block:26px}
.featured-case .project-details-title{font:500 clamp(26px,3vw,34px)/1.2 var(--serif);text-transform:none;letter-spacing:-.025em;margin-bottom:18px}
.featured-case .detail-panel h3{font:600 19px/1.35 var(--serif);margin:0 0 10px;color:var(--ink)}
.featured-case .detail-panel p,.featured-case .detail-results p{font-size:14px;line-height:1.8}
.featured-case .detail-results h2{font:600 22px/1.3 var(--serif);text-transform:none;letter-spacing:0}
.case-next-step{margin-top:22px;border-top:1px solid var(--border);padding-top:18px}
.case-next-step h3{font-size:18px;margin:0 0 8px;color:var(--ink)}
.case-next-step p{font-size:14px;line-height:1.8;margin:0}
.case-contact{margin:35px 0 0;padding:25px;border:1px solid var(--border);border-radius:14px;background:var(--soft);display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:22px}
.case-contact>div{min-width:0}
.case-contact h2{font:500 26px/1.25 var(--serif);margin:0 0 8px;color:var(--ink)}
.case-contact p{font-size:14px;margin:0}
.case-contact-actions{justify-content:flex-start}
:root[data-theme="dark"] .portfolio-extras{background:var(--dark-surface,#26222e)}
:root[data-theme="dark"] .selected-work :is(.selected-project-tools,.selected-project-scope){color:var(--dark-body,#e6ddea)}
:root[data-theme="dark"] .selected-work :is(h3,.selected-project-role,.selected-project-result p){color:var(--dark-text,#f8f5fc)}
@media(max-width:960px){.selected-work .featured-project-grid{grid-template-columns:minmax(0,1fr)}.selected-work .featured-project-card{padding:25px}.selected-work .featured-project-card h3{font-size:29px}}
@media(max-width:660px){
 .portfolio-home .hero{padding-block:38px 35px}
 .portfolio-home > main > .section{padding-block:42px}
 .selected-work .featured-project-card{padding:21px}
 .selected-work .featured-project-card h3{font-size:26px}
 .portfolio-extras>.extras-heading{padding:20px;align-items:flex-start;flex-direction:column;gap:12px}
 .extras-summary-copy>h2{font-size:22px}
 .portfolio-extras :is(.container,.technical-dossiers){width:calc(100% - 24px)}
 .portfolio-extras .bookshelf-cabinet{padding-inline:10px}
 .portfolio-extras .robot-section .robot-layout{width:calc(100% - 16px)}
 .extras-jump{padding:18px 20px;gap:14px 20px}
 .case-contact{padding:20px}
 .case-contact-actions{width:100%;flex-direction:column}
 .case-contact-actions .btn{width:100%}
}
@media(max-width:660px){.portfolio-home .portfolio-explore-wrap{width:calc(100% - 12px)}}

/* Evidence-led engineering previews: preserve the existing project text and
   keep the interactive bookshelf and planetarium as secondary explorations. */
.selected-work-heading{max-width:800px;margin-bottom:clamp(24px,3vw,36px)}
.selected-work-heading h2{font-size:clamp(31px,3.65vw,47px);line-height:1.18;letter-spacing:-.025em;text-wrap:balance}
.selected-work-heading>p:last-child{max-width:60ch;font-size:clamp(15px,1.2vw,17px);line-height:1.7}
.selected-work .featured-project-grid{gap:clamp(15px,1.6vw,23px);align-items:stretch}
.selected-work .featured-project-card{display:flex;flex-direction:column;min-width:0;padding:clamp(17px,2vw,23px);border-radius:18px}
.selected-work .featured-project-card .featured-category{letter-spacing:.07em;font-size:11px;font-weight:800}
.selected-project-preview{display:block;position:relative;overflow:hidden;flex-shrink:0;min-width:0;margin:14px 0 7px;border:1px solid var(--border,#e6dce3);border-radius:12px;background:#f5f2f5;text-decoration:none;color:inherit}
.selected-project-preview img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:#f7f8fa;transition:transform .23s ease}
.selected-project-preview__meta{display:block;padding:9px 11px;color:#63485e;background:#f9f3f7;border-top:1px solid #dfd2df;font:700 10px/1.4 var(--sans,Arial,sans-serif);letter-spacing:.07em}
.selected-project-preview:is(:hover,:focus-visible) img{transform:scale(1.018)}
.selected-project-preview:focus-visible{outline:3px solid #a04e7d;outline-offset:3px}
.selected-work .featured-project-card h3{font-size:clamp(25px,2.2vw,30px);line-height:1.22;margin:16px 0 10px;text-wrap:balance}
.selected-work .selected-project-tools{margin-bottom:13px}
.selected-work .selected-project-role{font-size:14px;line-height:1.7;margin-bottom:14px}
.selected-project-result{margin-top:0;padding:15px 0}
.selected-work .selected-project-scope{font-size:13px;line-height:1.65;margin-bottom:15px}
.selected-work .featured-more{padding-top:15px;min-height:44px}
:root[data-theme="dark"] .selected-project-preview{border-color:#665466;background:#28222f}
:root[data-theme="dark"] .selected-project-preview__meta{color:#f0d8e8;background:#372a3a;border-top-color:#69566a}
/* The bookshelf, repository planets and robot lab remain fully accessible.
   Remove the broad framing that made them compete with the primary case studies. */
.portfolio-explore-wrap{margin-block:clamp(18px,4vw,36px) 38px}
.portfolio-extras{border:0;border-radius:0;background:transparent}
.portfolio-extras>.extras-heading{padding:12px 4px 15px;min-height:0;border:0;border-bottom:1px solid var(--border);border-radius:0}
.extras-summary-copy>h2{font-size:clamp(21px,2.3vw,27px);line-height:1.27}
.extras-summary-copy>p{font-size:14px;max-width:65ch}
.extras-jump{padding:13px 4px 16px;border-bottom:0;gap:9px 18px}
.extras-jump a{font-size:12px}
:root[data-theme="dark"] .portfolio-extras{background:transparent}
@media(max-width:960px){
  .selected-work .featured-project-card{padding:clamp(18px,3vw,24px)}
  .selected-project-preview img{max-height:295px}
}
@media(max-width:660px){
  .selected-work .featured-project-grid{gap:16px}
  .selected-work .featured-project-card{padding:17px}
  .selected-work .featured-project-card h3{font-size:26px}
  .selected-project-preview{margin:12px 0 6px}
  .selected-project-preview__meta{font-size:10px;padding:8px 10px}
  .extras-jump{gap:11px 17px;padding:12px 2px 16px}
}
@media(prefers-reduced-motion:reduce){
  .selected-project-preview img{transition:none}
  .selected-project-preview:is(:hover,:focus-visible) img{transform:none}
}

/* A clearly visible but compact navigation addition to the existing bookshelf.
   No changes to project shelves, the book animations, or the planetarium. */
.bookshelf-index-link{display:inline-flex;align-items:center;gap:9px;margin-top:16px;padding:11px 17px;min-height:45px;border:1px solid #ab7293;border-radius:999px;color:#713b5b;background:#fff8fb;text-decoration:none;font:750 13px/1.4 var(--sans);box-shadow:0 4px 13px #71455c14;transition:background .2s ease,border-color .2s ease}
.bookshelf-index-link:is(:hover,:focus-visible){background:#f5dfeb;border-color:#874b73}
.bookshelf-index-link:focus-visible{outline:3px solid #9b557d;outline-offset:3px}
.book-switcher{display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);align-items:center;gap:15px;margin:2px 8px 19px;padding:15px 18px;border:1px solid #deb4cf;border-radius:14px;background:#fdf4f9;box-shadow:0 5px 23px #160d1826}
.book-switcher__heading{display:flex;flex-direction:column;gap:5px;min-width:0}
.book-switcher__heading label{color:#582a4a;font:750 clamp(16px,1.6vw,20px)/1.24 var(--sans);letter-spacing:-.01em}
.book-switcher__heading span{color:#685368;font:500 12px/1.55 var(--sans)}
.book-switcher__actions{display:flex;flex-direction:column;gap:6px;min-width:0}
.book-switcher__actions select{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:10px 37px 10px 13px;border:2px solid #a96188;border-radius:9px;background:#fff;color:#44283d;font:700 14px/1.45 var(--sans);cursor:pointer}
.book-switcher__actions select:disabled{opacity:.65;cursor:progress}
.book-switcher__actions select:focus-visible{outline:3px solid #734d89;outline-offset:2px}
.book-switcher__directory{align-self:flex-start;padding:5px 2px;color:#6c3157;font:700 12px/1.4 var(--sans);text-decoration:underline;text-underline-offset:3px}
.book-switcher__directory:is(:hover,:focus-visible){color:#361d31}
.book-modal-actions .book-page-control{background:rgba(255,250,252,.16);border-color:#f5d3e4;min-height:47px;font-size:13px}
.book-modal-actions .book-page-control:is(:hover,:focus-visible):not(:disabled){background:#f7dbe9;color:#492340}
.book-modal-actions #book-counter{font-size:13px;font-weight:800}
:root[data-theme="dark"] .bookshelf-index-link{color:#f9e7f2;background:#47344a;border-color:#b58dab}
:root[data-theme="dark"] .bookshelf-index-link:is(:hover,:focus-visible){background:#603f59}
@media(max-width:780px){
 .book-switcher{grid-template-columns:1fr;gap:11px;margin:4px 3px 14px;padding:13px 14px}
 .book-switcher__actions select{font-size:16px;min-height:48px}
 .book-switcher__heading label{font-size:18px}
 .book-switcher__directory{font-size:12px}
}
@media(max-width:390px){
 .book-switcher{padding:11px}
 .book-modal-actions .book-page-control{font-size:12px}
 .book-modal-actions #book-counter{width:100%;order:-1;text-align:center;margin-bottom:5px}
}
@media(prefers-reduced-motion:reduce){.bookshelf-index-link{transition:none}}

/* More slow-moving stardust across the existing decorative background fields.
   All dots remain behind the content and use the current viewport animation gate. */
.ambient-field .ambient-star--extra{
  left:var(--star-x);
  top:var(--star-y);
  width:2.5px;
  height:2.5px;
  background:rgba(146,100,150,.78);
  box-shadow:0 0 0 3px rgba(175,130,174,.045),0 0 9px rgba(168,121,164,.18);
  animation-delay:var(--star-delay);
  animation-duration:var(--twinkle-time,21s);
}
.ambient-field-contact .ambient-star--extra{
  background:rgba(255,229,245,.86);
  box-shadow:0 0 0 3px rgba(255,231,246,.07),0 0 10px rgba(255,226,244,.22);
}
:root[data-theme="dark"] .ambient-field .ambient-star--extra{
  background:rgba(239,199,232,.8);
  box-shadow:0 0 9px rgba(231,186,231,.19);
}
@media(max-width:760px){
  .ambient-field .ambient-star--extra:not(.ambient-star--mobile){display:none}
  .ambient-field .ambient-star--extra{width:2px;height:2px;box-shadow:0 0 5px rgba(166,121,168,.11)}
}
@media(prefers-reduced-motion:reduce){
  .ambient-field .ambient-star--extra{animation:none!important;transform:none;opacity:.48}
}
@media(forced-colors:active){.ambient-field .ambient-star--extra{display:none!important}}
@media print{.ambient-field .ambient-star--extra{display:none!important}}

/* Match featured engineering thumbnails to the nonwhite project-directory media. */
.selected-work .selected-project-preview{background:linear-gradient(145deg,#d7c0d7,#bca8c9);border-color:#bda5bd}
.selected-work .selected-project-preview img{background:transparent}
.selected-work .selected-project-preview--paper::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:rgba(174,116,162,.35);mix-blend-mode:multiply}
.selected-work .selected-project-preview__meta{position:relative;z-index:2}
:root[data-theme="dark"] .selected-work .selected-project-preview{background:linear-gradient(145deg,#54415d,#40334e);border-color:#786182}


/* NASA selected-work card: neutral thumbnail and affiliation disclaimer. */
.selected-work .selected-project-preview--paper{
  background:#f7f8fa;
  border-color:#d7d9df;
}
.selected-work .selected-project-preview--paper::after{
  display:none;
}
:root[data-theme="dark"] .selected-work .selected-project-preview--paper{
  background:#24262b;
  border-color:#555b66;
}
.selected-project-disclaimer{
  margin:12px 0 10px;
  padding:12px 13px;
  border:1px solid #c7a5b7;
  border-left:4px solid #9c5275;
  border-radius:10px;
  background:#fff8fb;
  color:#5c4a56;
  font:500 12px/1.55 var(--sans,Arial,sans-serif);
}
.selected-project-disclaimer strong{
  color:#3f303a;
  font-weight:800;
}
:root[data-theme="dark"] .selected-project-disclaimer{
  background:#332930;
  border-color:#806276;
  border-left-color:#d98aad;
  color:#eadce5;
}
:root[data-theme="dark"] .selected-project-disclaimer strong{
  color:#fff4fa;
}


/* Phase 2: keep the primary portfolio focused; preserve optional interactive archive. */
.portfolio-home .portfolio-explore-wrap{margin-block:clamp(24px,4vw,48px)}
.portfolio-home details.portfolio-extras{
  border:1px solid var(--border,#e3d7e1);border-radius:18px;
  background:var(--paper,#fff);overflow:clip;
}
.portfolio-home details.portfolio-extras>.extras-heading{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:clamp(19px,3vw,29px);min-height:110px;border:0;
  cursor:pointer;list-style:none;border-radius:18px;color:var(--ink,#352937);
}
.portfolio-home details.portfolio-extras>.extras-heading::-webkit-details-marker{display:none}
.portfolio-home details.portfolio-extras>.extras-heading::marker{content:""}
.portfolio-home details.portfolio-extras>.extras-heading:hover{background:var(--soft,#faf3f7)}
.portfolio-home details.portfolio-extras>.extras-heading:focus-visible{outline:3px solid #aa5284;outline-offset:-4px}
.portfolio-home .extras-summary-copy{display:flex;flex-direction:column;align-items:start;gap:5px;max-width:790px;min-width:0}
.portfolio-home .extras-summary-copy .eyebrow{margin:0 0 3px;font-size:10px}
.portfolio-home .extras-summary-copy .extras-title{
  display:block;font:500 clamp(23px,2.8vw,34px)/1.25 var(--serif,Georgia,serif);
  letter-spacing:-.025em;color:var(--ink,#352937);
}
.portfolio-home .extras-summary-copy .extras-title em{color:var(--rose-dark,#904461);font-weight:400}
.portfolio-home .extras-summary-copy .extras-description{
  display:block;font:500 13px/1.75 var(--sans,Arial,sans-serif);color:var(--secondary,#655662)
}
.portfolio-home .extras-expand-cta{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;flex-shrink:0;
  min-height:44px;padding:9px 14px;border-radius:999px;
  background:#904461;color:white;font:750 12px/1.35 var(--sans,Arial,sans-serif);
}
.portfolio-home .extras-chevron{font-size:22px;line-height:1;transition:transform .2s ease}
.portfolio-home .extras-expand-close{display:none}
.portfolio-home details.portfolio-extras[open] .extras-expand-open{display:none}
.portfolio-home details.portfolio-extras[open] .extras-expand-close{display:inline}
.portfolio-home details.portfolio-extras[open] .extras-chevron{transform:rotate(180deg)}
.portfolio-home details.portfolio-extras[open]>.extras-heading{
  border-bottom:1px solid var(--border,#e3d7e1);border-radius:18px 18px 0 0;
}
.portfolio-home details.portfolio-extras .extras-jump{padding:17px 28px}
.portfolio-home details.portfolio-extras .section{scroll-margin-top:90px}
.portfolio-home .home-lab-spotlight{margin-top:30px;margin-bottom:8px}
.portfolio-home #featured-projects{padding-bottom:clamp(24px,3vw,43px)}
.portfolio-home #experience{padding-top:clamp(36px,4vw,63px)}
:root[data-theme="dark"] .portfolio-home details.portfolio-extras{background:#29222f;border-color:#655068}
:root[data-theme="dark"] .portfolio-home details.portfolio-extras>.extras-heading:hover{background:#392a3e}
:root[data-theme="dark"] .portfolio-home .extras-summary-copy :is(.extras-title,.extras-description){color:#f1e2ee}
:root[data-theme="dark"] .portfolio-home .extras-expand-cta{background:#713451;color:#fff}
@media(max-width:680px){
  .portfolio-home details.portfolio-extras>.extras-heading{align-items:stretch;flex-direction:column;padding:19px;gap:15px}
  .portfolio-home .extras-expand-cta{align-self:flex-start}
  .portfolio-home details.portfolio-extras .extras-jump{padding:14px 18px;gap:12px 17px}
  .portfolio-home .extras-summary-copy .extras-description{font-size:13px}
  .portfolio-home .home-lab-spotlight{margin-block:18px 0}
}
@media(prefers-reduced-motion:reduce){.portfolio-home .extras-chevron{transition:none}}

/* Phase 4: research intro between professional experience and about. */
.portfolio-home .research-home-section{padding:clamp(44px,6vw,83px) 0;border-top:1px solid var(--border,#e5d6e0);border-bottom:1px solid var(--border,#e5d6e0);background:var(--paper,#fff);scroll-margin-top:110px}
.portfolio-home .research-home-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr);gap:clamp(24px,5vw,72px);align-items:center}
.portfolio-home .research-home-intro h2{font-size:clamp(32px,4.1vw,52px);line-height:1.19;margin:0 0 18px}
.portfolio-home .research-home-intro>p:not(.eyebrow){font-size:14px;line-height:1.9;max-width:560px;color:var(--secondary,#655662);margin:0 0 23px}
.portfolio-home .research-home-intro .btn{min-height:44px;display:inline-flex;align-items:center;gap:13px}
.portfolio-home .research-home-details{display:grid;gap:10px}
.portfolio-home .research-home-details>div{padding:17px 20px;border:1px solid var(--border,#e5d6e0);border-radius:12px;background:var(--soft,#f8eff5)}
.portfolio-home .research-home-details span{font:800 10px/1.55 var(--sans,Arial,sans-serif);letter-spacing:.1em;color:#884967;display:block;margin-bottom:5px}
.portfolio-home .research-home-details strong{font:500 clamp(21px,2.4vw,27px)/1.3 var(--serif,Georgia,serif);color:var(--ink,#352937)}
.portfolio-home .research-home-details p{font-size:12px;color:var(--secondary,#655662);line-height:1.75;margin:6px 0 0}
:root[data-theme="dark"] .portfolio-home .research-home-section{background:#28212e;border-color:#614d61}
:root[data-theme="dark"] .portfolio-home .research-home-details>div{background:#372a3c;border-color:#65506d}
:root[data-theme="dark"] .portfolio-home .research-home-details :is(strong,p){color:#f2e0ef}
:root[data-theme="dark"] .portfolio-home .research-home-details span{color:#eeb2d0}
:root[data-theme="dark"] .portfolio-home .research-home-intro>p:not(.eyebrow){color:#ebd6e5}
@media(max-width:810px){.portfolio-home .research-home-layout{grid-template-columns:1fr}.portfolio-home .research-home-details{grid-template-columns:repeat(3,minmax(0,1fr))}.portfolio-home .research-home-details>div{padding:14px}}
@media(max-width:580px){.portfolio-home .research-home-details{grid-template-columns:1fr}.portfolio-home .research-home-section{padding:43px 0}.portfolio-home .research-home-intro h2{font-size:36px}}

/* Four primary engineering case studies with NASA return, readable at all widths. */
.selected-work .featured-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.selected-work .featured-project-card--nasa .selected-project-preview img{object-fit:contain}
@media(max-width:960px){.selected-work .featured-project-grid{grid-template-columns:1fr}}
