/* ============================================================
   Below-the-fold override
   Re-styles the original Strata template content (#main, #one,
   #news, #two, #skills-timeline, #three, #awards, #vision, #four)
   to match the hero landing page: centered, modern type, ink
   color palette, consistent vertical rhythm.

   Tokens (colors, type) mirror those used in hero.css. Only the
   rules that conflict with the hero aesthetic are overridden;
   everything else keeps the original Strata look (timeline,
   poptrox, etc.) intact.
   ============================================================ */

/* Only non-hero pages need body padding-top to clear the floating header.
   The hero page (#hero) handles its own top padding internally, so adding
   body padding-top there would (a) paint an 88px white strip above the
   #fafafc hero surface and (b) push min-height:100vh content below the
   fold. Scope this to pages WITHOUT a #hero. */
body:not(:has(#hero)) {
  padding-top: 88px;                /* was 60px — clears the new 60px header pill + 16px top offset + air */
}

/* ---------- Page container ---------- */

#main {
  margin-left: 0;                  /* was 35% — sidebar template no longer applies */
  max-width: none;
  padding: 0;
  width: 100%;
  position: relative;
  z-index: 1;
  background: transparent;         /* let the mesh show through subtly */
}

#main > section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 5em 48px 4em;
  border-top: 1px solid rgba(20, 30, 45, 0.06);
}

#main > section:first-of-type {
  border-top: 0;
  padding-top: 6em;
}

#main > section:last-of-type {
  padding-bottom: 6em;
}

/* ---------- Typography (modern, ink-toned) ---------- */

#main,
#main p,
#main li {
  color: #4a5568;                  /* graphite — softer than #a2a2a2 but still body */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

#main h1,
#main h2,
#main h3,
#main h4,
#main h5,
#main h6 {
  color: #141e2d;                  /* ink */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

#main h2 {
  font-size: 2.25em;
  margin: 0 0 0.4em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#main h3 { font-size: 1.4em; margin: 1.4em 0 0.4em; }
#main h4 { font-size: 1.1em; margin: 1em 0 0.4em; }

#main header.major h2 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
}

#main a {
  color: #2a8a6e;                  /* mint-dark, matches pc-slogan-line2 */
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 138, 110, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

#main a:hover {
  color: #1f6a54;
  border-bottom-color: rgba(42, 138, 110, 0.6);
}

#main a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  line-height: 1.2;
  background: #2a8a6e;
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  padding: 0.85em 2em;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px -8px rgba(42, 138, 110, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#main a.button:hover {
  background: #1f6a54;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(42, 138, 110, 0.6);
}

#main ul.actions {
  list-style: none;
  padding: 0;
  margin: 2em 0 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- News strip: glass cards ---------- */

#news .news-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 1.5em;
}

#news .news-item {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 30, 45, 0.08);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -10px rgba(20, 30, 45, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#news .news-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(20, 30, 45, 0.18);
}

#news .news-date {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2a8a6e;
  background: rgba(42, 138, 110, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

#news .news-item h4 {
  margin: 0 0 8px;
  color: #141e2d;
  font-size: 1.1em;
  line-height: 1.35;
}

#news .news-item p {
  font-size: 0.95em;
  line-height: 1.6;
  margin: 0 0 12px;
  color: #4a5568;
}

#news .news-item a {
  font-size: 0.88em;
  font-weight: 600;
}

#news .news-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Recent work (#two): glass-card research entries.
   Reuses blog.css's .glass-card (blur, spotlight, tilt) recipe;
   the .recent-work-list .rw-card selectors below only override the
   internal layout (horizontal thumb + body instead of blog's vertical
   card) and specificity-beat .glass-card's own rules where needed. ---------- */

.recent-work-list {
  display: grid;
  gap: 24px;
  margin-top: 1.5em;
}

/* The [hidden] attribute is weaker than .recent-work-list's display:grid,
   so the folded "Read more" list (#rw-more-list) would otherwise stay
   visible. Force it hidden when the attribute is present. */
.recent-work-list[hidden] {
  display: none;
}

.recent-work-list .rw-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  column-gap: 28px;
  align-items: start;
}

/* The thumbnail is the click target (opens the original); the body
   text is not. Pointer + focus affordance live on the thumb, not the
   whole card. The thumb stretches to the card's full height (negative
   margins bleed it to the card's top/bottom/left edges) and centers
   the figure vertically within that column. */
.recent-work-list .rw-thumb {
  align-self: stretch;
  margin: -20px 0 -20px -20px;
  border-radius: 24px 0 0 24px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.recent-work-list .rw-thumb:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: -2px;
}

/* Teaser figures have wildly different aspect ratios (portrait ARIA,
   banner AutoMat, near-4:3 DUAL-X). `contain` + center shows the
   whole figure; the flex parent above centers the 4:3 image box
   vertically inside the full-height column. */
.recent-work-list .rw-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
}

.recent-work-list .rw-body {
  min-width: 0;
}

.recent-work-list .rw-card h3 {
  margin: 0 0 8px;
}

.recent-work-list .rw-card .blog-meta {
  margin: 0 0 10px;
}

.recent-work-list .rw-links {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
}

.recent-work-list .rw-link {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(20, 30, 45, 0.08);
  color: var(--mint);
  font-size: 0.95em;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.recent-work-list .rw-link:hover,
.recent-work-list .rw-link:focus-visible {
  background: var(--mint);
  color: #fff;
  transform: translateY(-2px);
  outline: none;
}

.recent-work-list .rw-card .row-header-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--mint);
  margin: 0;
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

.recent-work-list .rw-card .row-header-toggle:hover { color: var(--mint-bright); }

.recent-work-list .rw-card .row-header-toggle .chev {
  display: inline-block;
  transition: transform 200ms var(--ease-spring);
}

.recent-work-list .rw-card .row-header-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }

.recent-work-list .rw-card .spring-panel {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border-strong);
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.6;
}

.recent-work-list .rw-card .spring-panel p { margin: 0 0 10px; }
.recent-work-list .rw-card .spring-panel p:last-child { margin-bottom: 0; }

/* ---------- Awards section: keep existing inline bg, fix text contrast ---------- */

#awards {
  border-radius: 24px;
  margin: 2em auto;
  max-width: 1180px;
}

#awards h2,
#awards p,
#awards li {
  color: #2d3748;
}

#awards a {
  color: #1f6a54;
  border-bottom-color: rgba(31, 106, 84, 0.3);
}

/* ---------- Vision / contact sections ---------- */

#vision,
#four {
  text-align: center;
}

#vision h2,
#four h2 {
  margin-bottom: 0.6em;
}

#four ul.icons {
  list-style: none;
  padding: 0;
  margin: 2em 0 0;
  display: flex;
  gap: 16px;
  justify-content: center;
}

#four ul.icons li a {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(20, 30, 45, 0.08);
  color: #2a8a6e;
  font-size: 1.1em;
  transition: transform 0.2s ease, background 0.2s ease;
}

#four ul.icons li a:hover {
  background: #2a8a6e;
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Skills-timeline: keep its existing visual; just center & rhythm ---------- */

#skills-timeline {
  /* Most of this section's appearance comes from inline <style> already
     in index.html. Only the rhythm + max-width matter here. */
}

#skills-timeline .timeline {
  margin-top: 2em;
}

/* ---------- Three (Work Gallery / projects) ---------- */

#three {
  text-align: center;
}

#three .features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 2em;
  text-align: left;
}

#three .features article {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 30, 45, 0.08);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -10px rgba(20, 30, 45, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#three .features article:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(20, 30, 45, 0.18);
}

#three .features article h3 {
  margin: 0 0 8px;
  color: #141e2d;
}

#three .features article p {
  color: #4a5568;
  font-size: 0.95em;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Three: blog-style glass cards (reuses blog.css's .glass-card
   + .btn-teal recipe so Work Experience matches blog.html's cards).
   Scoped with #three so these win over #main's generic a/h3/p rules and
   the older #three .image.fit thumb-sizing rule below. ---------- */

#three .row {
  text-align: left;
}

#three .glass-card .image.fit.thumb {
  width: auto;
  max-width: none;
  border: 0;
}

#three .glass-card .image.fit.thumb img {
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

#three .glass-card h3 {
  margin: 0 0 6px;
}

#three .glass-card .blog-meta {
  font-size: 0.8em;
  color: var(--graphite);
  margin: 0 0 10px;
}

#three .glass-card .btn-teal {
  background: transparent;
  border-color: var(--mint-bright);
  border-bottom: 1px solid var(--mint-bright);
  color: var(--mint-bright) !important;
  box-shadow: none;
}

#three .glass-card .btn-teal:hover,
#three .glass-card .btn-teal:focus-visible {
  background: var(--mint-bright);
  color: #fff !important;
  border-bottom-color: var(--mint-bright);
}

/* ---------- Mobile ---------- */

@media screen and (max-width: 768px) {
  #main > section {
    padding: 3.5em 24px 3em;
  }
  #main > section:first-of-type { padding-top: 4em; }
  #main > section:last-of-type  { padding-bottom: 4em; }

  #main h2,
  #main header.major h2 { font-size: 1.7em; }

  .recent-work-list .rw-card {
    grid-template-columns: 1fr;
  }
  .recent-work-list .rw-thumb {
    margin: -20px -20px 16px;
    border-radius: 24px 24px 0 0;
  }
  .recent-work-list .rw-thumb img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

/* ---------- Scroll-reveal entrance (assets/js/reveal-on-scroll.js) ----------
   Shared primitive: elements with .reveal start faded + nudged down,
   then transition in when scrolled into view. Honors
   prefers-reduced-motion (JS reveals instantly + this kills the
   transition). Page-specific stylesheets defer to this. ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms var(--ease-spring);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
  }
}

/* ---------- Springy inline card-open primitive ---------- */

.spring-header {
  cursor: pointer;
  user-select: none;
}
.spring-header:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 8px;
}
.spring-panel {
  /* All animation is driven by inline styles set in spring-card.js.
     These CSS rules are fallbacks for no-JS and reduced-motion. */
}
.spring-panel a { color: var(--mint); }
.spring-panel a:hover { color: var(--mint-bright); }

/* ---------- Publications / Work Gallery thumbs (Strata .image.fit) ----------
   Without this rule the .col-3 .image.fit <img> renders at its native
   size inside a 25%-width column, producing the tiny ~32px thumbs
   reported on the presentations page. Force a minimum visible size
   with object-fit: cover.

   NOTE: scoped to #three (the Strata work gallery) and any section
   that uses the .col-3 / .col-9 row pattern. #two (.recent-work-list)
   now uses .rw-card, styled above, not this pattern. */
#three .image.fit,
.row .col-3 .image.fit,
.row .col-12-small .image.fit {
  display: block;
  width: 220px;
  max-width: 100%;
}
#three .image.fit > img,
.row .col-3 .image.fit > img,
.row .col-12-small .image.fit > img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
}

/* ---------- Experience (#experience): 2-col Work + 3-col Skills ---------- */

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.skills-grid { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }

.exp-card { padding: 24px; }
.exp-header { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.exp-logo {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--mint), var(--mint-bright));
  color: #fff; font: 700 20px/1 var(--font-display);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 48px;
}
.exp-meta { min-width: 0; }
.exp-role { margin: 0 0 4px; color: var(--ink); font: 600 18px/1.2 var(--font-display); }
.exp-org { margin: 0 0 4px; color: var(--graphite); font: 500 14px/1.3 var(--font-text); }
.exp-when { margin: 0; color: var(--graphite); font: 400 13px/1.3 var(--font-text); }
.exp-card .spring-panel { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--glass-border-strong); color: var(--graphite); font-size: 15px; line-height: 1.6; }
.exp-card .spring-panel p { margin: 0 0 10px; }
.exp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.exp-tag {
  display: inline-block;
  background: rgba(42, 138, 110, 0.1);
  color: var(--mint);
  font: 600 12px/1 var(--font-text);
  padding: 5px 10px;
  border-radius: 999px;
}

.skill-card { padding: 24px; }
.skill-card h3 { margin: 0 0 12px; color: var(--ink); font: 600 18px/1.2 var(--font-display); }
.skill-card ul { margin: 0; padding: 0 0 0 20px; color: var(--graphite); font-size: 15px; line-height: 1.7; }

@media (max-width: 768px) {
  .experience-grid, .skills-grid { grid-template-columns: 1fr; }
}

/* ---------- Skills-timeline: glass cards on the date rail ---------- */

#skills-timeline .timeline-container::after {
  background: var(--mint) !important;
  opacity: 0.3;
}
#skills-timeline .t-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  color: var(--graphite);
  font-family: var(--font-text);
}
#skills-timeline .t-item h3, #skills-timeline .t-item h4 { color: var(--ink); }
#skills-timeline .t-item::before {
  background: var(--mint) !important;
  border-color: #fff !important;
}

/* ---------- News strip: 3 cards + Read more on the index ---------- */

#news .news-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 1.5em;
}
@media (max-width: 900px) {
  #news .news-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  #news .news-strip { grid-template-columns: 1fr; }
}

#news .news-readmore {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border: 1px dashed var(--glass-border-strong);
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  min-height: 200px;
}
#news .news-readmore:hover {
  border-style: solid;
  border-color: var(--mint);
  background: rgba(42, 138, 110, 0.06);
  color: var(--ink);
  transform: translateY(-3px);
}
#news .readmore-chev {
  font-size: 32px; color: var(--mint); line-height: 1; margin-bottom: 8px;
  transition: transform 200ms var(--ease-spring);
}
#news .news-readmore:hover .readmore-chev { transform: translateX(4px); }
#news .readmore-label { font: 600 18px/1.2 var(--font-display); color: var(--ink); }
#news .readmore-sub { font: 400 13px/1.4 var(--font-text); color: var(--graphite); margin-top: 6px; }

/* ---------- News timeline page (news.html) ---------- */

.news-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 48px 96px;
}
.news-page h1 { color: var(--ink); font: 700 36px/1.1 var(--font-display); margin: 0 0 8px; }
.news-page .lead { color: var(--graphite); font: 400 17px/1.5 var(--font-text); margin: 0 0 32px; }

.news-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.news-filter {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--graphite);
  font: 600 13px/1 var(--font-text);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-spring);
  text-decoration: none;
}
.news-filter:hover { transform: translateY(-1px); }
.news-filter[aria-pressed="true"] {
  background: var(--mint);
  color: #fff;
  border-color: var(--mint);
}

.news-year {
  margin: 32px 0 12px;
  color: var(--ink);
  font: 700 22px/1.2 var(--font-display);
  display: flex;
  align-items: center;
  gap: 12px;
}
.news-year::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border-strong);
}
.news-year-count {
  font: 400 13px/1 var(--font-text);
  color: var(--graphite);
  background: rgba(42, 138, 110, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
}

.news-timeline {
  position: relative;
  margin: 8px 0 0;
  padding-left: 32px;
}
.news-timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: var(--mint);
  opacity: 0.35;
  border-radius: 2px;
}
.news-entry {
  position: relative;
  padding: 14px 0 14px 8px;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: baseline;
  gap: 18px;
  color: var(--graphite);
  font-family: var(--font-text);
  font-size: 15px;
  border-bottom: 1px solid var(--glass-border-strong);
}
.news-entry::before {
  content: '';
  position: absolute;
  left: -28px; top: 22px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px #fff;
}
.news-entry .date {
  color: var(--graphite);
  font: 500 13px/1.2 var(--font-text);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.news-entry .title { color: var(--ink); font: 600 16px/1.3 var(--font-display); text-decoration: none; }
.news-entry .title:hover { color: var(--mint); }
.news-entry .tag {
  font: 600 11px/1 var(--font-text);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(42, 138, 110, 0.1);
  color: var(--mint);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .news-entry { grid-template-columns: 80px 1fr; }
  .news-entry .tag { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Section card wrapper (Awards/Vision/Contact) ---------- */

.section-card {
  margin-top: 1.5em;
  padding: 32px 36px;
  color: var(--graphite);
}
.section-card h2 { margin-top: 0; }
#awards .section-card { padding: 28px 32px; }
#vision .section-card p { color: var(--graphite); font-size: 18px; line-height: 1.6; }
#four .section-card p { color: var(--graphite); font-size: 16px; line-height: 1.5; margin: 0 0 16px; }
