/* v83 — portfolio-wide simplified typography hierarchy
   Mirrors the approved homepage approach: page title > section heading > card title > body/meta.
   Metadata remains visually quiet and redundant kicker/number layers are removed in the HTML. */

body:not(.home-atlas-page){
  --pt-page:clamp(1.7rem,2.35vw,2.15rem);
  --pt-section:clamp(1.22rem,1.65vw,1.48rem);
  --pt-card:1rem;
  --pt-subcard:.9rem;
  --pt-body:.84rem;
  --pt-meta:.64rem;
}

/* One consistent title system across portfolio pages. */
body:not(.home-atlas-page) h1,
body:not(.home-atlas-page) .inline-page-title,
body:not(.home-atlas-page) .page-hero h1,
body:not(.home-atlas-page) .research-detail-intro-copy h1,
body:not(.home-atlas-page) .automation-academic-title h1,
body:not(.home-atlas-page) .academic-page-intro h1,
body:not(.home-atlas-page) .up-v53-intro h1,
body:not(.home-atlas-page) .education-simple-intro h1,
body:not(.home-atlas-page) .tc-intro h1,
body:not(.home-atlas-page) .credential-record-head h1,
body:not(.home-atlas-page) .professor-contact-head h1{
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:var(--pt-page)!important;
  font-weight:700!important;
  line-height:1.08!important;
  letter-spacing:-.025em!important;
}

/* Major section headings: one shared visual tier. */
body:not(.home-atlas-page) main h2,
body:not(.home-atlas-page) .story-map-head h2,
body:not(.home-atlas-page) .section-head h2,
body:not(.home-atlas-page) .academic-section h2,
body:not(.home-atlas-page) .research-story-group-head h2,
body:not(.home-atlas-page) .credential-group-title,
body:not(.home-atlas-page) .automation-project-detail h2,
body:not(.home-atlas-page) .tc-record h2,
body:not(.home-atlas-page) .education-degree-card h2,
body:not(.home-atlas-page) .up-v53-story-card h2{
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:var(--pt-section)!important;
  font-weight:700!important;
  line-height:1.16!important;
  letter-spacing:-.012em!important;
}

/* Card/project titles: clearly subordinate to H2. */
body:not(.home-atlas-page) main h3,
body:not(.home-atlas-page) .story-chapter h3,
body:not(.home-atlas-page) .automation-project-group h3,
body:not(.home-atlas-page) .platform-panel h3,
body:not(.home-atlas-page) .field-record h3,
body:not(.home-atlas-page) .media-note h3{
  font-size:var(--pt-card)!important;
  line-height:1.22!important;
  letter-spacing:0!important;
}
body:not(.home-atlas-page) main h4{
  font-size:var(--pt-subcard)!important;
  line-height:1.25!important;
}

/* Supporting copy remains readable but never competes with headings. */
body:not(.home-atlas-page) .story-intro > p,
body:not(.home-atlas-page) .credential-record-head > p,
body:not(.home-atlas-page) .education-simple-intro > p,
body:not(.home-atlas-page) .tc-summary-card > p:first-child,
body:not(.home-atlas-page) .automation-academic-summary > p,
body:not(.home-atlas-page) .research-detail-summary,
body:not(.home-atlas-page) .page-hero .lead{
  font-size:var(--pt-body)!important;
  line-height:1.58!important;
}

/* Metadata is metadata, not another heading level. */
body:not(.home-atlas-page) .portfolio-meta-line,
body:not(.home-atlas-page) .story-chapter-kicker,
body:not(.home-atlas-page) .automation-project-detail-heading > div > span,
body:not(.home-atlas-page) .automation-project-format,
body:not(.home-atlas-page) .tc-provider,
body:not(.home-atlas-page) .education-institution,
body:not(.home-atlas-page) .research-detail-label,
body:not(.home-atlas-page) .compact-address-label{
  font-family:"Segoe UI",Arial,Helvetica,sans-serif!important;
  font-size:var(--pt-meta)!important;
  line-height:1.4!important;
  letter-spacing:.065em!important;
}
.portfolio-meta-line{
  margin:0 0 7px;
  color:var(--muted);
  font-weight:700;
  text-transform:uppercase;
}

/* Story-map pages: compact, stable hierarchy. */
.story-page .story-intro .inline-page-title{margin:0 0 7px!important;}
.story-page .story-map-head h2{margin:0 0 5px!important;}
.story-page .story-map-head p{font-size:.69rem!important;line-height:1.45!important;}
.story-page .research-story-group-head{display:block!important;}
.story-page .research-story-group-head h2{margin:0 0 4px!important;color:var(--primary2)!important;}
.story-page .research-story-group-head p{font-size:.72rem!important;line-height:1.48!important;margin:0!important;}
.story-page .story-chapter h3{margin:.16em 0 .38em!important;}
.story-page .story-summary{font-size:.7rem!important;line-height:1.5!important;}
.story-page .story-chapter-kicker{font-size:.52rem!important;letter-spacing:.08em!important;}

/* Research case studies: no numbered label + heading stack. */
.compact-research-detail .academic-section,
.academic-detail-minimal .academic-section{scroll-margin-top:88px;}
.compact-research-detail .academic-section h2,
.academic-detail-minimal .academic-section h2{margin:0 0 .46rem!important;}
.academic-section-title-simple{margin:0 0 .46rem!important;}

/* Expertise / field / education / teaching pages. */
.automation-academic-title h1,
.academic-page-intro h1,
.up-v53-intro h1,
.education-simple-intro h1,
.tc-intro h1{margin-top:0!important;}
.automation-project-detail-heading h2{margin:.22rem 0!important;}
.automation-project-group h3{font-family:"Segoe UI",Arial,sans-serif!important;font-weight:750!important;}
.uav-field-page .academic-section-heading h2,
.uav-field-page .field-experience-heading h2{margin-top:0!important;}
.uav-field-page .field-record h3{margin-top:0!important;}
.simple-education-page .education-degree-card h2{margin:.3rem 0!important;}
.teaching-capacity-page .tc-record h2{margin:.12rem 0 .28rem!important;}
.teaching-capacity-page .tc-summary-meta{font-size:.62rem!important;}
.credential-page .credential-record-head h1{margin:0 0 7px!important;}

/* Generic legacy pages (Media / Graphic Design / dynamic Detail): remove oversized old defaults. */
body:not(.home-atlas-page) .page-hero{padding-top:42px!important;padding-bottom:28px!important;}
body:not(.home-atlas-page) .page-hero h1{margin:.18em 0!important;}
body:not(.home-atlas-page) .section-head{margin-bottom:18px!important;}
.detail-page .detail-content h2{margin:1.25rem 0 .45rem!important;}

@media(max-width:680px){
  body:not(.home-atlas-page){--pt-page:1.48rem;--pt-section:1.18rem;--pt-card:.96rem;--pt-body:.8rem;--pt-meta:.6rem;}
  body:not(.home-atlas-page) .page-hero{padding-top:28px!important;padding-bottom:22px!important;}
  .story-page .story-map-head p{font-size:.64rem!important;}
  .story-page .research-story-group-head p{font-size:.68rem!important;}
}

/* Contact cards are record titles, not major page sections. */
.compact-contact-details h2{font-size:var(--pt-card)!important;line-height:1.2!important;margin:.1rem 0 .3rem!important;}
/* Route page follows the same simple title + body pattern. */
.portfolio-route-panel h1{margin:0 0 8px!important;}
.portfolio-route-panel > p{font-size:var(--pt-body)!important;line-height:1.55!important;}

/* v83 second-pass audit ----------------------------------------------------
   Simplify utility titles and eliminate leftover micro-heading tiers. */

/* Story-map panel titles are utility labels, not page sections. */
.story-page .story-map-title{
  margin:0 0 4px!important;
  color:var(--primary2)!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:var(--pt-card)!important;
  font-weight:700!important;
  line-height:1.18!important;
  letter-spacing:-.005em!important;
}
.story-page .story-map-head .story-map-title + p{
  margin:0!important;
  font-size:var(--pt-meta)!important;
  line-height:1.42!important;
}

/* GIS Automation: H1 -> selected project H2; everything else is metadata/body. */
.automation-compact-page .automation-academic-header{
  align-items:start!important;
}
.automation-compact-page .automation-academic-title h1{
  font-size:var(--pt-page)!important;
  line-height:1.08!important;
  letter-spacing:-.025em!important;
}
.automation-compact-page .automation-academic-summary>p{
  font-size:var(--pt-body)!important;
  line-height:1.58!important;
}
.automation-compact-page .automation-academic-domains span{
  font-size:var(--pt-meta)!important;
  letter-spacing:.05em!important;
}
.automation-compact-page .automation-project-group-label{
  margin:0 0 6px!important;
  padding-bottom:5px!important;
  border-bottom:1px solid #d6cec0;
  color:#8b5d16!important;
  font-family:"Segoe UI",Arial,Helvetica,sans-serif!important;
  font-size:var(--pt-meta)!important;
  font-weight:750!important;
  line-height:1.35!important;
  letter-spacing:.055em!important;
  text-transform:uppercase;
}
html[data-theme=dark] .automation-compact-page .automation-project-group-label{border-color:var(--line)}
.automation-compact-page .automation-project-tab{
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;
  padding:7px 9px!important;
}
.automation-compact-page .automation-project-tab>span{display:none!important}
.automation-compact-page .automation-project-tab strong{
  font-size:.78rem!important;
  line-height:1.28!important;
}
.automation-compact-page .automation-project-tab small{
  margin-top:3px!important;
  font-size:.64rem!important;
  line-height:1.32!important;
}
.automation-compact-page .automation-project-detail-heading>div>span{display:none!important}
.automation-compact-page .automation-project-detail h2{
  margin:0!important;
  font-size:var(--pt-section)!important;
  line-height:1.14!important;
  letter-spacing:-.012em!important;
}
.automation-compact-page .automation-project-format{
  font-size:var(--pt-meta)!important;
  line-height:1.3!important;
  letter-spacing:.045em!important;
}
.automation-compact-page .automation-project-summary{
  font-size:.79rem!important;
  line-height:1.5!important;
}
.automation-compact-page .automation-project-facts dt,
.automation-compact-page .automation-project-notes span,
.automation-compact-page .automation-project-footer-label,
.automation-compact-page .automation-project-evidence>span{
  font-size:.61rem!important;
  line-height:1.35!important;
  letter-spacing:.055em!important;
}
.automation-compact-page .automation-project-facts dd,
.automation-compact-page .automation-project-notes p{
  font-size:.73rem!important;
  line-height:1.48!important;
}
.automation-compact-page .automation-project-tags span,
.automation-compact-page .automation-project-evidence p,
.automation-compact-page .automation-project-github-note{
  font-size:.59rem!important;
  line-height:1.4!important;
}
.automation-compact-page .automation-project-github{
  font-size:.66rem!important;
}

/* UAV page: supporting callout title instead of H4. */
.uav-field-page .processing-emphasis-title{
  margin:0 0 5px!important;
  color:var(--primary2)!important;
  font-size:.76rem!important;
  font-weight:750!important;
  line-height:1.35!important;
}

/* Graphic-design editor note stays visually quiet. */
.media-note-title{
  margin:0 0 7px!important;
  font-size:var(--pt-card)!important;
  font-weight:700!important;
  line-height:1.25!important;
}

/* Certification page: page H1 -> group H2 -> credential-card H3. */
.credential-page .credential-group-head{
  display:block!important;
  position:sticky;
  top:94px;
}
.credential-page .credential-group-head>span{display:none!important}
.credential-page .credential-group-head h2{
  margin:0 0 5px!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:var(--pt-section)!important;
  font-weight:700!important;
  line-height:1.16!important;
  letter-spacing:-.012em!important;
}
.credential-page .credential-group-head p{
  font-size:.74rem!important;
  line-height:1.5!important;
}
.credential-page .credential-card h3{
  font-size:var(--pt-card)!important;
  line-height:1.22!important;
}

@media(max-width:820px){
  .credential-page .credential-group-head{position:static!important;}
}

/* Story cards: semantic H2 on direct-card pages, H3 only beneath Research group H2. */
.story-page .story-chapter h2,
.story-page .story-chapter h3{
  margin:.16em 0 .38em!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:var(--pt-card)!important;
  font-weight:700!important;
  line-height:1.22!important;
  letter-spacing:0!important;
}
.story-page .publication-record-card h2{
  font-size:var(--pt-card)!important;
  line-height:1.22!important;
}

/* Research case-study inline emphasis without creating a third heading tier. */
.academic-inline-title{
  margin:1rem 0 .38rem!important;
  color:var(--primary2)!important;
  font-size:.82rem!important;
  font-weight:750!important;
  line-height:1.35!important;
}
