/* Redesign, 26 October 2026: fewer competing elements, larger reading sizes,
   imagery-led hero, featured projects and an always-visible CV link.
   Loaded last on every page so it can be removed in one step. */

:root { --rd-bg:#070d13; --rd-surface:#0f1b25; --rd-line:#22323d; --rd-text:#eef3f5; --rd-muted:#a9b8c3; --rd-accent:#a3d8e3; }

/* ---------- Shared masthead (all pages) ---------- */
.site-masthead { background:rgba(7,13,19,.86); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border-bottom:1px solid #ffffff12; }
.site-nav { min-height:72px; }
.site-brand { font-size:26px; }
.site-links { gap:34px; }
.site-links a { font-size:14px; letter-spacing:.01em; color:#cfd9df; }
.site-links a.nav-cv { min-height:38px; padding:0 18px; gap:8px; border:1px solid #5b7584; color:var(--rd-text); }
.site-links a.nav-cv:hover { border-color:var(--rd-accent); color:var(--rd-accent); }
html { scroll-padding-top:96px; }

@media (max-width:760px) {
  .site-masthead { position:relative; }
  .site-nav { width:calc(100% - 40px); min-height:0; padding:12px 0 2px; display:flex; flex-wrap:wrap; align-items:center; gap:0; }
  .site-brand { order:1; flex:1; }
  .site-brand small { display:none; }
  .site-links { display:contents; }
  .site-links a.nav-cv { order:2; min-height:40px; padding:0 16px; font-size:14px; }
  .site-nav::after { content:""; order:3; flex-basis:100%; height:6px; }
  .site-links a:not(.nav-cv) { order:4; min-height:44px; margin-right:24px; font-size:15px; }
}
@media (max-width:350px) { .site-links a:not(.nav-cv) { margin-right:16px; font-size:14px; } }

/* ---------- Homepage ---------- */
.portfolio-page:not(.case-page) { background:var(--rd-bg); font-size:17px; }

/* Hero */
.hero-v2 { position:relative; overflow:hidden; min-height:calc(100svh - 72px); display:flex; flex-direction:column; justify-content:flex-end; padding-top:72px; background:var(--rd-bg); }
.hero-media { position:absolute; top:0; right:0; bottom:0; width:min(62vw,980px); z-index:0; }
.hero-media img { display:block; width:100%; height:100%; object-fit:cover; object-position:55% 45%; opacity:.9; }
.hero-media::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,var(--rd-bg) 0%,rgba(7,13,19,.75) 26%,rgba(7,13,19,.12) 60%,rgba(7,13,19,.35) 100%),linear-gradient(0deg,var(--rd-bg) 0%,rgba(7,13,19,0) 38%),linear-gradient(180deg,rgba(7,13,19,.7) 0%,rgba(7,13,19,0) 22%); }
.hero-v2-inner { position:relative; z-index:1; padding-bottom:56px; }
.hero-v2 .eyebrow { font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:#b6cfd9; }
.hero-v2 h1 { margin:22px 0 0; font-size:clamp(48px,6.3vw,92px); line-height:.96; letter-spacing:-.05em; font-weight:500; }
.hero-v2 h1 span { display:block; color:#9cc2d0; }
.hero-v2 .hero-statement { margin:30px 0 0; font-size:clamp(22px,2.2vw,30px); line-height:1.3; color:#e3ebef; }
.hero-v2 .hero-intro { margin-top:18px; max-width:520px; font-size:18px; line-height:1.65; color:#b5c3cc; }
.hero-v2 .actions { margin-top:36px; display:flex; flex-wrap:wrap; gap:14px; }
.portfolio-page .button { min-height:52px; padding:0 26px; font-size:15px; letter-spacing:.01em; }
.hero-v2 .availability { margin-top:22px; font-size:14px; color:#8fa2ae; }
.hero-v2 .credential-strip { position:relative; z-index:1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin-top:0; padding:0; border-top:1px solid #ffffff1c; }
.hero-v2 .credential-strip > div { padding:26px 28px 34px 0; border:0; }
.hero-v2 .credential-strip > div + div { padding-left:28px; border-left:1px solid #ffffff14; }
.hero-v2 .credential-strip strong { display:block; margin-top:10px; font-size:17px; font-weight:500; line-height:1.45; color:var(--rd-text); }
.hero-v2 .credential-strip .subtle { display:block; font-size:14px; font-weight:400; color:var(--rd-muted); }
.hero-v2 .credential-strip .micro { font-size:11px; color:#8ea6b3; }
.hero-credit { position:absolute; z-index:2; right:24px; top:20px; font:11px/1.4 var(--sans); color:#8ea2ad; text-decoration:none; }
.hero-credit:hover { color:var(--rd-accent); }

/* Section rhythm and type */
.portfolio-page:not(.case-page) .section { padding-block:120px; }
.portfolio-page .section-label { font-size:12px; letter-spacing:.14em; color:#8fb3c2; }
.portfolio-page:not(.case-page) h2 { font-size:clamp(36px,4.4vw,60px); line-height:1.04; letter-spacing:-.04em; }
.portfolio-page .section-heading p { font-size:18px; line-height:1.6; color:var(--rd-muted); max-width:620px; }
.portfolio-page .large-copy { font-size:clamp(21px,1.9vw,26px); line-height:1.5; }
.portfolio-page .profile-grid p:not(.large-copy) { font-size:17px; line-height:1.75; color:#b8c6ce; }
.portfolio-page .text-link { font-size:15px; }

/* Featured projects: wide alternating rows */
.featured-list { display:grid; gap:40px; margin-top:56px; }
.feature-row.project { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); align-items:stretch; background:var(--rd-surface); border:1px solid var(--rd-line); }
.feature-row:nth-child(even) .project-image { order:2; }
.feature-row .project-image { position:relative; height:100%; min-height:520px; margin:0; overflow:hidden; background:#0b1620; border:0; }
.feature-row .project-image img { position:absolute; inset:0; width:100%; height:100%; }
.feature-row .glider-image img, .feature-row .evidence-photo img { object-fit:contain; padding:36px; background:radial-gradient(ellipse at 50% 50%,#1b2f3c 0%,#0c1720 75%); }
.feature-row .project-image figcaption { left:28px; bottom:24px; font-size:11px; }
.feature-row .project-body { display:flex; flex-direction:column; justify-content:center; padding:56px 52px; }
.portfolio-page .project-type { font-size:12px; letter-spacing:.12em; color:#8fb3c2; }
.feature-row h3 { margin:14px 0 18px; font-size:clamp(30px,2.8vw,40px); line-height:1.1; letter-spacing:-.035em; }
.portfolio-page .project-body > p:not(.project-type):not(.scope-note) { font-size:17px; line-height:1.65; color:#bccad2; }
.portfolio-page .project-facts dt { font-size:13px; }
.portfolio-page .project-facts dd { font-size:20px; }
.portfolio-page .project-facts dd small { font-size:13px; }
.portfolio-page .scope-note { font-size:14px; line-height:1.6; color:#94a7b2; }
.portfolio-page details summary { font-size:15px; min-height:52px; }
.portfolio-page .detail-content p { font-size:16px; line-height:1.7; }

/* Labs: two large interactive cards */
.labs-section { background:linear-gradient(180deg,#0a141c,#08111a); border-block:1px solid #ffffff0d; }
.lab-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; margin-top:56px; }
.lab-card.project { display:flex; flex-direction:column; grid-column:auto; background:var(--rd-surface); border:1px solid var(--rd-line); }
.lab-card .thruster-visual, .lab-card .mission-visual { position:relative; height:360px; min-height:0; border:0; border-bottom:1px solid var(--rd-line); }
.lab-card .thruster-visual img { object-fit:cover; }
.lab-card .project-body { flex:1; display:flex; flex-direction:column; align-items:flex-start; padding:40px 40px 44px; }
.lab-card h3 { margin:12px 0 16px; font-size:clamp(28px,2.4vw,36px); letter-spacing:-.035em; }
.lab-card .button { margin-top:auto; }
.lab-card .scope-note { margin-bottom:28px; }

/* Compact studies */
.compact-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin-top:48px; align-items:start; }
.compact-card.project { background:var(--rd-surface); border:1px solid var(--rd-line); }
.compact-card .project-image, .compact-card .software-visual { height:240px; min-height:0; }
.compact-card .project-body { padding:30px 28px 32px; }
.compact-card h3 { font-size:26px; letter-spacing:-.03em; }
.compact-card .project-image figcaption { display:none; }

/* Experience */
.portfolio-page .timeline h3 { font-size:24px; }
.portfolio-page .employer { font-size:15px; }
.portfolio-page .role-summary { font-size:18px; line-height:1.6; }
.portfolio-page .responsibility-list li { font-size:15.5px; line-height:1.65; }
.portfolio-page .timeline li > p { font-size:16px; }
.portfolio-page .interest-grid p, .portfolio-page .ventures-grid p { font-size:16px; line-height:1.65; }
.portfolio-page .interest-grid h3 { font-size:24px; }

/* Downloads and contact */
.portfolio-page .downloads { padding:56px; border-color:var(--rd-line); background:var(--rd-surface); }
.portfolio-page .downloads p { font-size:17px; }
.portfolio-page .contact-section { background:#0c1822; }
.portfolio-page .contact-section h2 + p { font-size:18px; line-height:1.65; }
.portfolio-page .email-link { font-size:clamp(22px,2.4vw,32px); }
.site-end nav a { font-size:13px; }

/* ---------- Responsive ---------- */
@media (max-width:1060px) {
  .feature-row.project { grid-template-columns:1fr; }
  .feature-row:nth-child(even) .project-image { order:0; }
  .feature-row .project-image { height:420px; min-height:0; }
  .feature-row .project-body { padding:40px 36px 44px; }
  .compact-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hero-media { width:100%; }
  .hero-media img { opacity:.55; }
}
@media (max-width:760px) {
  .portfolio-page:not(.case-page) .section { padding-block:80px; }
  .hero-v2 { display:block; min-height:0; padding-top:0; }
  .hero-media { position:relative; top:auto; right:auto; bottom:auto; width:100%; height:300px; margin-bottom:-24px; }
  .hero-media img { object-position:58% 42%; opacity:.85; }
  .hero-media::after { background:linear-gradient(0deg,var(--rd-bg) 0%,rgba(7,13,19,0) 55%),linear-gradient(180deg,rgba(7,13,19,.5) 0%,rgba(7,13,19,0) 30%); }
  .hero-v2 .eyebrow { font-size:11px; letter-spacing:.1em; }
  .hero-v2 h1 { font-size:clamp(44px,13vw,64px); }
  .hero-v2 .hero-intro { font-size:17px; }
  .hero-v2 .actions .button { flex:1 1 100%; justify-content:space-between; }
  .hero-v2-inner { padding-bottom:48px; }
  .hero-v2 .credential-strip { grid-template-columns:1fr; }
  .hero-v2 .credential-strip > div, .hero-v2 .credential-strip > div + div { padding:20px 0; border-left:0; border-top:1px solid #ffffff14; }
  .hero-v2 .credential-strip > div:first-child { border-top:0; }
  .hero-credit { top:14px; right:16px; }
  .feature-row .glider-image img, .feature-row .evidence-photo img { padding:16px; }
  .featured-list { gap:28px; margin-top:40px; }
  .feature-row .project-body, .lab-card .project-body, .compact-card .project-body { padding:28px 22px 32px; }
  .lab-grid, .compact-grid { grid-template-columns:1fr; margin-top:40px; }
  .lab-card .thruster-visual, .lab-card .mission-visual { height:240px; }
  .feature-row .project-image { height:280px; }
  .compact-card .project-image, .compact-card .software-visual { height:240px; }
  .portfolio-page .downloads { padding:32px 22px; }
}

@media print {
  .hero-credit, .nav-cv { display:none!important; }
}
.portfolio-page .profile-grid h2 { font-size:clamp(34px,3.6vw,52px); }

/* Images in normal sizing for every engine */
.compact-card .project-image img { display:block; width:100%; height:100%; object-fit:contain; padding:18px; }
.feature-row .project-image img { display:block; }

/* Three labs */
.lab-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.lab-card .thruster-visual, .lab-card .mission-visual { height:300px; }
.lab-card .thruster-visual img { object-fit:cover; }
.lab-card .project-body { padding:34px 30px 36px; }
@media (max-width:1100px) { .lab-grid { grid-template-columns:1fr; } .lab-card .thruster-visual, .lab-card .mission-visual { height:340px; } }
@media (max-width:760px) { .lab-card .thruster-visual, .lab-card .mission-visual { height:220px; } .lab-card .project-body { padding:28px 22px 32px; } }

/* Sliders: bigger touch target, vertical scroll still allowed */
input[type="range"] { touch-action: pan-y; }
@media (pointer: coarse) { input[type="range"] { min-height: 36px; } }

/* Lab cards: the artwork carries its own labels, so drop the overlay label that collided with it */
.lab-card .development-label { display:none; }
.lab-card.thruster-project .thruster-visual { background:#101c28; }
.lab-card.thruster-project .thruster-visual img { object-fit:contain; }
