/*
Theme Name: Justin Astra Child (v117y)
Theme URI: https://justindavidstrong.com/
Description: A clean, modern academic layout built as a child theme for Astra.
Author: (generated with ChatGPT)
Template: astra
Version: 1.17.25
Text Domain: justin-astra-child
*/

/* =============== 
   Design tokens
   =============== */
:root{
  --jds-max: 1120px;
  --jds-radius: 18px;
  --jds-shadow: 0 12px 30px rgba(0,0,0,.08);
  --jds-border: rgba(0,0,0,.08);
  --jds-muted: rgba(0,0,0,.62);
  --jds-ink: #111;
  --jds-bg: #fff;
  --jds-surface: #f6f6f7;
  --jds-accent: #1f4d7a; /* deep academic blue */
}

/* Improve baseline typography without fighting Astra */
body{
  color: var(--jds-ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a{ text-underline-offset: 0.18em; }
a:focus{ outline: 2px solid rgba(31,77,122,.35); outline-offset: 3px; }

/* Constrain content width a bit more consistently */
.jds-wrap{
  max-width: var(--jds-max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ===== Homepage layout ===== */
body.home .site-content{
  padding-top: 0 !important;
}

.jds-hero{
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--jds-border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 60%, #f6f6f7 100%);
}

.jds-hero-inner{
  padding: 28px 0 28px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 34px;
  align-items: center;
}

@media (max-width: 860px){
  .jds-hero-inner{
    grid-template-columns: 1fr;
    padding: 48px 0 30px;
  }
}

.jds-title{
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.08;
  margin: 0 0 10px;
}

.jds-subtitle{
  font-size: 18px;
  line-height: 1.55;
  color: var(--jds-muted);
  margin: 0 0 18px;
  max-width: 64ch;
}

.jds-cta{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.jds-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--jds-border);
  background: var(--jds-bg);
  color: var(--jds-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform .08s ease, box-shadow .14s ease, background .14s ease;
}

.jds-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}


/* Smaller inline button variant (used within paragraphs) */
.jds-btn.sm{
  padding: 6px 10px;
  font-size: 13px;
  gap: 8px;
  border-radius: 999px;
  vertical-align: baseline;
  white-space: nowrap;
}

.jds-btn.sm:hover{
  transform: none;
  box-shadow: none;
}

.jds-btn.primary{
  background: var(--jds-accent);
  border-color: rgba(31,77,122,.5);
  color: #fff;
}

.jds-btn.primary:hover{
  box-shadow: 0 14px 30px rgba(31,77,122,.22);
}

.jds-card{
  background: var(--jds-bg);
  border: 1px solid var(--jds-border);
  border-radius: var(--jds-radius);
  box-shadow: var(--jds-shadow);
  overflow: hidden;
}

.jds-headshot{
  width: min(360px, 100%);
  height: auto;
  margin-left: auto;
  border-radius: var(--jds-radius);
  border: 1px solid var(--jds-border);
  box-shadow: var(--jds-shadow);
  display: block;
}

.jds-sections{
  padding: 42px 0 60px;
  background: var(--jds-surface);
}

.jds-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

@media (max-width: 860px){
  .jds-grid{ gap: 14px; }
}

.jds-panel{
  grid-column: span 6;
  padding: 22px 22px 18px;
}

@media (max-width: 860px){
  .jds-panel{ grid-column: 1 / -1; }
}

.jds-panel h2{
  margin: 0 0 10px;
  font-size: 18px;
}

.jds-panel p{
  margin: 0 0 12px;
  color: var(--jds-muted);
  line-height: 1.6;
}

.jds-list{
  margin: 0;
  padding-left: 18px;
  color: var(--jds-muted);
  line-height: 1.7;
}

.jds-feature{
  grid-column: 1 / -1;
  padding: 22px;
  display:grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

@media (max-width: 700px){
  .jds-feature{ grid-template-columns: 1fr; }
}

.jds-cover{
  width: 180px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--jds-border);
  box-shadow: 0 12px 26px rgba(0,0,0,.10);
}

.jds-feature h2{ margin: 0 0 6px; font-size: 20px; }
.jds-feature p{ margin: 0; color: var(--jds-muted); line-height: 1.6; }

/* Make “Site Map” widgets less loud if they exist elsewhere */
.widget_nav_menu ul, .widget_pages ul { padding-left: 18px; }

/* Better spacing for single pages */
.single .entry-content, .page .entry-content{
  max-width: 76ch;
}

/* Some legacy pages include separator blocks/HRs that can look like random lines.
   Hide them site-wide (can be re-enabled later if desired). */
.entry-content hr,
.jds-page-body hr,
hr.wp-block-separator,
.entry-content .wp-block-separator{
  display: none !important;
  border: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}

/* ===============
   Inner pages (CV, Books, etc.)
   =============== */
.jds-page-hero{
  padding: clamp(18px, 2.8vw, 34px) 0;
  border-bottom: 1px solid var(--jds-border);
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,0));
}
.jds-page-title{
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.015em;
  margin: 0;
}
.jds-page-subtitle{
  margin: 10px 0 0;
  max-width: 70ch;
  color: var(--jds-muted);
}
.jds-page-body{
  padding: 18px 0 42px;
}
/* Give WP content a calm, readable rhythm */
.jds-page-body > * + *{ margin-top: 16px; }
.jds-page-body h2{ margin-top: 30px; }
.jds-page-body ul, .jds-page-body ol{ padding-left: 1.2em; }
.jds-page-body hr{ border: 0; border-top: 1px solid var(--jds-border); margin: 28px 0; }


/* ===============
   Minimal Header / Footer overrides
   =============== */

.jds-skip-link{
  position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;
}
.jds-skip-link:focus{
  left:16px;top:16px;width:auto;height:auto;z-index:9999;
  background:#fff;border:1px solid #ddd;padding:8px 10px;border-radius:10px;
}

.jds-header{
  border-bottom:1px solid rgba(0,0,0,0.08);
  background:#fff;
}
.jds-header-inner{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 0;
  gap:16px;
}
.jds-site-title{
  font-size:18px;
  letter-spacing:0.2px;
  text-decoration:none;
  color:inherit;
  font-weight:600;
  white-space: nowrap;
}
.jds-nav{display:flex;flex-wrap:wrap;gap:10px;}
.jds-nav-link{
  text-decoration:none;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.10);
  color:inherit;
  font-size:14px;
}
.jds-nav-link:hover, .jds-nav-link:focus{
  border-color:rgba(0,0,0,0.25);
}

.jds-main{min-height:60vh;}

.jds-footer{
  border-top:1px solid rgba(0,0,0,0.08);
  background:#fff;
  margin-top:48px;
}
.jds-footer-inner{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 0;
  gap:16px;
  font-size:14px;
}
.jds-footer-link{text-decoration:none;border-bottom:1px solid rgba(0,0,0,0.25); color:inherit;}
.jds-footer-link:hover,.jds-footer-link:focus{border-bottom-color:rgba(0,0,0,0.5);}


/* Open access callouts */
.jds-oa, .jds-oa-callout { margin-top: 12px; }
.jds-oa a { text-decoration: underline; }

.jds-oa-box{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border:1px solid var(--jds-border);
  border-radius: var(--jds-radius);
  background: rgba(0,0,0,.02);
}

/* Ensure page content matches the site’s typography and colors */
.jds-rich, .jds-rich *{
  color: var(--jds-ink) !important;
  font-family: inherit !important;
  line-height: 1.65;
}
.jds-rich a{
  color: var(--jds-ink) !important;
  text-decoration: underline;
}
.jds-rich h1, .jds-rich h2, .jds-rich h3, .jds-rich h4{
  color: var(--jds-ink) !important;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.jds-rich img{
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}


/* Books page: force consistent typography and remove legacy builder styling */
.jds-books .jds-books-grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items:start;
}
@media (max-width: 900px){
  .jds-books .jds-books-grid{ grid-template-columns: 1fr; }
}

.jds-books .jds-books-text{
  background: transparent;
  max-width: none !important;
  width: 100% !important;
}

/* Neutralize common legacy inline/background styling */
.jds-books .jds-books-text *{
  background: transparent !important;
  box-shadow: none !important;
}

/* Undo common “nested page” / builder constraints that cause narrow, centered text */
.jds-books .jds-books-text .wp-block-group,
.jds-books .jds-books-text .wp-block-columns,
.jds-books .jds-books-text .wp-block-column,
.jds-books .jds-books-text .wp-block-cover,
.jds-books .jds-books-text .wp-block-cover__inner-container,
.jds-books .jds-books-text .wp-block-media-text,
.jds-books .jds-books-text .elementor,
.jds-books .jds-books-text .elementor-section,
.jds-books .jds-books-text .elementor-container,
.jds-books .jds-books-text .elementor-column,
.jds-books .jds-books-text .elementor-widget-wrap{
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Force readable, consistent left alignment (legacy content sometimes mixes alignments) */
.jds-books .jds-books-text,
.jds-books .jds-books-text p,
.jds-books .jds-books-text li,
.jds-books .jds-books-text blockquote,
.jds-books .jds-books-text div,
.jds-books .jds-books-text span{
  text-align: left !important;
}
.jds-books .jds-books-text .has-text-align-center,
.jds-books .jds-books-text .has-text-align-right{
  text-align: left !important;
}

/* Normalize WordPress "has-*-font-size" utilities that can create jagged typography */
.jds-books .jds-books-text [class*="font-size"],
.jds-books .jds-books-text .has-small-font-size,
.jds-books .jds-books-text .has-medium-font-size,
.jds-books .jds-books-text .has-large-font-size,
.jds-books .jds-books-text .has-x-large-font-size,
.jds-books .jds-books-text .has-huge-font-size{
  font-size: 1rem !important;
}

/* Make text sizes coherent */
.jds-books .jds-books-text p,
.jds-books .jds-books-text li{
  font-size: 1rem !important;
  line-height: 1.7 !important;
  color: var(--jds-ink) !important;
}

.jds-books .jds-books-text h2{ font-size: 1.35rem !important; line-height: 1.25 !important; margin-top: 1.4em !important; }
.jds-books .jds-books-text h3{ font-size: 1.15rem !important; line-height: 1.25 !important; margin-top: 1.2em !important; }
.jds-books .jds-books-text h4{ font-size: 1.05rem !important; line-height: 1.25 !important; margin-top: 1.1em !important; }

/* Hide any leftover legacy buttons inside the book text area */
.jds-books .jds-books-text a.wp-block-button__link:not(.jds-oa-link),
.jds-books .jds-books-text .wp-block-button:not(.jds-oa) a,
.jds-books .jds-books-text a.elementor-button,
.jds-books .jds-books-text button{
  display:none !important;
}

.jds-books .jds-books-aside{
  position: sticky;
  top: 24px;
}

.jds-books .jds-cover{
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.jds-books .jds-books-actions{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.jds-books .jds-oa{
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,0.035);
  border: 1px solid rgba(0,0,0,0.06);
}

.jds-books .jds-oa-note{
  margin: 0 0 10px 0;
  color: var(--jds-muted);
}


/* Contact page */
.jds-contact-card { padding: 28px 0 56px; }
.jds-card {
  border: 1px solid rgba(20, 20, 30, 0.10);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
}
.jds-h2 { margin: 18px 0 8px; font-size: 1.05rem; }
.jds-list { margin: 8px 0 0; padding-left: 18px; }
.jds-list li { margin: 6px 0; }
.jds-note { margin-top: 14px; font-size: 0.95rem; color: rgba(20,20,30,0.70); }


/* --- Books page refinements (v1.0.8) --- */
.jds-books-grid{
  display:flex;
  gap:32px;
  align-items:flex-start;
}
@media (max-width: 900px){
  .jds-books-grid{ flex-direction:column; }
}
.jds-books-text{ flex: 1 1 60%; min-width:0; }
.jds-books-aside{ flex: 0 0 360px; max-width: 420px; display:flex; flex-direction:column; gap:16px; }
@media (max-width: 900px){
  .jds-books-aside{ max-width: 520px; width:100%; }
}
.jds-books-card .jds-lede,
.jds-books-card p,
.jds-books-card li,
.jds-books-card blockquote{
  font-size: 1rem !important;
  line-height: 1.65 !important;
  text-align: left !important;
  max-width: none !important;
}
.jds-books-card .jds-lede{ margin:0; }
.jds-award{ margin-top: 0; margin-bottom: 16px; }
.jds-quote{
  margin: 0 0 18px 0;
  padding: 14px 16px;
  border-left: 3px solid rgba(17,17,17,.12);
  background: rgba(17,17,17,.02);
  border-radius: 12px;
}
.jds-quote p{ margin:0 0 8px 0; }
.jds-quote cite{
  display:block;
  font-style: normal;
  color: rgba(17,17,17,.70);
  font-size: .95rem;
}



/* New / attention callout */
.jds-new-note{
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 193, 7, 0.28);
  background: rgba(255, 193, 7, 0.14);
  color: rgba(0,0,0,0.82);
}
.jds-new-note strong{ font-weight: 700; }

/* Inline open-access highlight that wraps around the button (homepage featured book) */
.jds-newbar{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 193, 7, 0.28);
  background: rgba(255, 193, 7, 0.14);
  color: rgba(0,0,0,0.82);
}
.jds-newbar strong{ font-weight: 700; }
.jds-newbar .jds-btn{
  margin: 0;
}

/* Aggressive separator cleanup (legacy content often includes separator blocks) */
.wp-block-separator,
hr.wp-block-separator,
.entry-content .wp-block-separator,
.entry-content hr,
.jds-page hr,
.jds-page .wp-block-separator{
  display:none !important;
  border:0 !important;
  height:0 !important;
  margin:0 !important;
  padding:0 !important;
}
/* Reduce extra top whitespace on inner pages now that we removed the page hero */
.jds-page{
  padding-top: 18px;
}


/* Hide legacy separator rules that show up as stray horizontal lines */
hr,
.entry-content hr,
.wp-block-separator{
  display: none !important;
  border: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --- v1.1.6d hero layout tweaks (Option A + C, larger photo) --- */
.jds-hero-inner{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 520px);
  gap: 28px;
  align-items: start;
}
.jds-headshot{
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  justify-self: end;
}
/* Desktop: allow the name to wrap so it never sits behind the photo */
@media (min-width: 901px){
  .jds-title{ white-space: normal; }
}
@media (max-width: 900px){
  .jds-hero-inner{ grid-template-columns: 1fr; }
  .jds-headshot{ max-width: 100%; justify-self: start; }
}

/* Inline, sentence-level buttons */
.jds-inline-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--jds-border) !important;
  background: var(--jds-bg) !important;
  box-shadow: none;
  font-size: 0.95em;
  line-height: 1.35;
  text-decoration: none !important;
  color: inherit !important;
}
.jds-inline-btn:hover{
  background: #fff !important;
}
.jds-inline-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Smaller button variant (used on Contact page) */
.jds-btn.jds-btn-sm{
  padding: 9px 12px;
  font-size: 13px;
}

/* Homepage CTA: slightly tighter so four buttons fit comfortably */
body.home .jds-cta .jds-btn{
  padding: 10px 14px;
  font-size: 13px;
}

/* Button row on Contact page */
.jds-btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 10px;
}

/* Column of buttons (used on Contact page for one-per-line links) */
.jds-btn-col{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  margin-top: 10px;
}

/* Soft divider on Contact page */
.jds-hr-soft{
  border:0;
  border-top: 1px solid var(--jds-border);
  margin: 18px 0;
  opacity: .55;
}

/* Minor typographic helpers */
.jds-h3{ font-size: 16px; margin: 14px 0 6px; }
.jds-muted{ opacity: .9; }



/* Tighten top spacing on About & Connect pages */
.page-about .site-content,
.page-contact .site-content{
  padding-top: 0 !important;
}

/* Connect page: email label under H1 */
.jds-contact-email-label{
  font-weight: 700;
  font-size: 14px;
  color: var(--jds-ink);
}

/* Ensure buttons stack one per line on Connect */
.jds-btn-col{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.jds-btn-col .jds-btn{
  width: fit-content;
}

/* Homepage title always above image row */
.jds-hero .jds-title{
  position: relative;
  z-index: 3;
  margin-bottom: 18px;
}


/* ===============
   About page photo wrap
   =============== */
.jds-prose::after{ content:""; display:block; clear:both; }

/* About page photo (wrapped) */

.jds-about-figure{
  width:100%;
  margin: 4px 0 18px 0;
}
.jds-about-photo{
  width: 100%;
  height: auto;
  border-radius: var(--jds-radius);
  border: 1px solid var(--jds-border);
  box-shadow: var(--jds-shadow);
  display: block;
}

@media (max-width: 860px){
  .jds-about-figure{
    float: none;
    width: 100%;
    margin: 14px 0 18px 0;
  }
}


/* About page: float-based wrap so paragraphs continue alongside the image
   (no large vertical gap), while keeping a predictable image width. */
.jds-about-layout{
  display:block !important;
}

/* Consistent paragraph spacing on About page */
.jds-page.jds-about .jds-prose p{
  margin: 0 0 14px 0;
}
.jds-page.jds-about .jds-prose p:last-child{
  margin-bottom: 0;
}
.jds-about-copy{
  flex:1 1 auto;
  min-width:0;
}
.jds-about-rest{
  min-width: 0;
}
.jds-about-figure{
  float:right;
  width: 400px;
  max-width: 400px;
  margin: 4px 0 18px 24px; /* left margin creates the gutter between text and image */
}
.jds-about-photo{
  width:100%;
  height:auto;
  border-radius: var(--jds-radius);
  border: 1px solid var(--jds-border);
  box-shadow: var(--jds-shadow);
  display:block;
}

@media (max-width: 860px){
  .jds-about-layout{ display:block !important; }
  .jds-about-figure{
    float:none;
    width:100%;
    max-width: 680px;
    margin: 0 0 18px 0;
  }
}



/* Tighten top spacing on About + Connect pages */
.jds-page.jds-about .jds-page-hero,
.jds-page.jds-connect .jds-page-hero{
  padding-top: 16px !important;
  padding-bottom: 22px !important;
}
.jds-page.jds-about .jds-page-body,
.jds-page.jds-connect .jds-page-body{
  padding-top: 14px !important;
}


/* v1.1.7p tweaks: tighten page-title gaps and homepage hero spacing */
.jds-about .jds-page-hero,
.jds-contact .jds-page-hero{
  padding: 10px 0 12px !important;
}
.jds-about .jds-page-body,
.jds-contact .jds-page-body{
  padding-top: 10px !important;
}
/* reduce any extra top padding Astra adds inside content area on these templates */
.jds-about .site-content,
.jds-contact .site-content{
  padding-top: 0 !important;
}


/* v1.1.7t About page: enforce float layout + 600px image cap (extra-specific to beat caches/specificity) */
.jds-page.jds-about .jds-prose::after{ content:""; display:block; clear:both; }
.jds-page.jds-about .jds-about-figure{
  float: right !important;
  width: 400px !important;
  max-width: 400px !important;
  margin: 4px 0 18px 24px !important;
}
.jds-page.jds-about .jds-about-photo{
  width: 100% !important;
  height: auto !important;
}
.jds-page.jds-about .jds-prose p{ margin: 0 0 14px 0 !important; }
.jds-page.jds-about .jds-prose p:last-child{ margin-bottom: 0 !important; }

@media (max-width: 860px){
  .jds-page.jds-about .jds-about-figure{
    float:none !important;
    width:100% !important;
    max-width: 680px !important;
    margin: 0 0 18px 0 !important;
  }
}
