/* site.css — shared global styles for every page on the site.
   Element-level styling stays inline on each element (that is what keeps the
   pages editable); this file holds only the site-wide document rules. */

html { scroll-behavior: smooth; background: #FBF6EE; min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: #FBF6EE;
  color: #2B2118;
  font-family: Figtree, Rubik, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

a { color: #C2553A; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #A44229; }

p { text-wrap: pretty; }

/* Circular social icon buttons (footer). Fills with the primary button color
   on hover/focus. Declared here so the hover state beats the generic a:hover. */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1.5px solid #E5D9C4;
  background: transparent;
  color: #73634D;
  transition: background 250ms cubic-bezier(0.32, 0.72, 0, 1),
              border-color 250ms cubic-bezier(0.32, 0.72, 0, 1),
              color 250ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* Header call-to-action: gold at rest, terracotta with white text on hover/focus. */
.btn-header {
  background-color: #FFC776;
  color: #222426;
  border: 1px solid transparent;
  transition: background-color 250ms cubic-bezier(0.32, 0.72, 0, 1),
              color 250ms cubic-bezier(0.32, 0.72, 0, 1),
              border-color 250ms cubic-bezier(0.32, 0.72, 0, 1),
              transform 250ms cubic-bezier(0.32, 0.72, 0, 1);
}

.btn-header:hover,
.btn-header:focus-visible {
  background-color: #C2553A;
  color: #fff;
  transform: translateY(-1px);
}

/* Role card imagery: desaturated at rest, full color on card hover/focus. */
.role-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.role-card:hover .role-img,
.role-card:focus-within .role-img,
.role-img:hover {
  filter: grayscale(0);
}

.social-icon:hover,
.social-icon:focus-visible {
  background: #FFC776;
  border-color: #FFC776;
  color: #222426;
}

/* Same button on a dark ground — matches the header CTA (.btn-header).
   Declared after the base hover so it wins. */
.social-icon--on-dark {
  background: #FFC776;
  color: #222426;
  border: 1px solid transparent;
  transition: background 250ms cubic-bezier(0.32, 0.72, 0, 1),
              border-color 250ms cubic-bezier(0.32, 0.72, 0, 1),
              color 250ms cubic-bezier(0.32, 0.72, 0, 1),
              transform 250ms cubic-bezier(0.32, 0.72, 0, 1);
}

.social-icon--on-dark:hover,
.social-icon--on-dark:focus-visible {
  background: #C2553A;
  border-color: #C2553A;
  color: #fff;
  transform: translateY(-1px);
}

/* Link with no underline until hover/focus; keeps its own color on hover. */
.link-hover-underline { text-decoration: none; }
.link-hover-underline:hover,
.link-hover-underline:focus-visible { color: inherit; text-decoration: underline; }

/* CTA message dots: gold focus ring (!important beats the inline all:unset). */
[data-cta-dot]:focus { outline: 2px solid #FFC776 !important; outline-offset: 1px !important; }

details summary::-webkit-details-marker { display: none; }

/* Footer: stack into two centered lines on narrow screens */
@media (max-width: 600px) {
  .site-footer-row { flex-direction: column !important; justify-content: center !important; text-align: center; }
}

/* Ж-shaped hero: glyph drops below the intro paragraph, centered, on narrow screens */
@media (max-width: 600px) {
  .zh-hero { grid-template-columns: minmax(0,1fr) !important; gap: 32px !important; }
  .zh-hero-glyph { justify-self: center; text-align: center; }
}

/* Header "pancake" menu */
.site-menu-btn { transition: background 200ms ease, border-color 200ms ease, color 200ms ease; }
.site-menu-btn:hover, .site-menu[open] .site-menu-btn, .site-menu-btn:focus-visible { background: #FFC776; border-color: #FFC776 !important; color: #222426 !important; }
.site-menu-link { transition: background 150ms ease, color 150ms ease; }
.site-menu-link:hover, .site-menu-link:focus-visible { background: #F4ECDD; color: #C2553A !important; }

/* Header nav: inline page links on wide screens, pancake menu on narrow */
.site-nav-link { transition: color 200ms ease; }
.site-nav-link:hover, .site-nav-link:focus-visible { color: #FFC776 !important; }
@media (min-width: 720px) { .site-menu { display: none !important; } }
@media (max-width: 719px) { .site-nav-links { display: none !important; } }

/* Résumé in-page jump links; sections clear the sticky header when jumped to */
section[id] { scroll-margin-top: 96px; }
.resume-jump { transition: background 200ms ease, border-color 200ms ease, color 200ms ease; }
.resume-jump:hover, .resume-jump:focus-visible { background: #FFC776; border-color: #FFC776 !important; color: #222426 !important; }

/* Résumé logo tiles link to company sites */
.logo-link { transition: opacity 200ms ease, transform 200ms ease; }
.logo-link:hover, .logo-link:focus-visible { opacity: .8; transform: translateY(-1px); }

/* Header: always one row; tightens on phones */
@media (max-width: 719px) {
  .site-header-nav { min-height: 60px !important; padding: 8px 16px !important; gap: 10px !important; }
  .site-header-actions { gap: 10px !important; }
  .site-header-name { font-size: 14px !important; }
  .site-header-cta { font-size: 13px !important; padding: 9px 14px !important; }
  .site-menu-btn { width: 40px !important; height: 40px !important; }
}
.cta-short { display: none; }
@media (max-width: 360px) {
  .cta-long { display: none !important; }
  .cta-short { display: inline !important; }
}
@media (max-width: 359px) {
  .site-header-nav { padding: 8px 12px !important; gap: 8px !important; }
  .site-header-actions { gap: 8px !important; }
  .site-header-cta { font-size: 12px !important; padding: 8px 12px !important; }
}

/* CTA card bottom strip: ~25% smaller location text on phones */
@media (max-width: 719px) {
  .cta-loc { font-size: 14px !important; }
}

/* Résumé experience on phones: logo + title/company on one row, dates/location below */
@media (max-width: 719px) {
  .exp-item { display: grid !important; grid-template-columns: 72px minmax(0,1fr); gap: 4px 16px !important; }
  .exp-meta, .exp-body { display: contents !important; }
  .exp-logo { grid-row: 1; grid-column: 1; margin-bottom: 0 !important; }
  .exp-title { grid-row: 1; grid-column: 2; align-self: center; }
  .exp-title h3, h3.exp-title { font-size: 22px !important; }
  .exp-meta > span, .exp-body > :not(.exp-title) { grid-column: 1 / -1; }
  .exp-meta > span:first-of-type { margin-top: 12px; }
  .exp-body > :not(.exp-title) { margin-top: 8px !important; }
}

/* Footer Ж: back-to-top link, keeps its blue on hover */
a.footer-zhe, a.footer-zhe:hover, a.footer-zhe:focus-visible, a.footer-zhe:visited { color: #99CEF2 !important; text-decoration: none !important; }

/* Ж page history: narrower year column on phones (120px → 84px) */
@media (max-width: 719px) {
  .history-row { grid-template-columns: 84px minmax(0,1fr) !important; }
}

/* Ж page roles grid on phones: 2 columns, no numbers, tighter cells, titles wrap */
@media (max-width: 719px) {
  .roles-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .roles-cell { min-height: 0 !important; padding: 12px 12px !important; justify-content: center !important; }
  .roles-cell span:last-child { font-size: 15px !important; overflow-wrap: anywhere; hyphens: auto; }
  .roles-num { display: none !important; }
}

/* Closing CTA card heading: 30px on phones */
@media (max-width: 719px) {
  .cta-heading { font-size: 30px !important; }
}

/* Testimonial carousel arrows */
.carousel-btn { transition: background 200ms ease, border-color 200ms ease; }
.carousel-btn:hover, .carousel-btn:focus-visible { background: #FFC776 !important; border-color: #FFC776 !important; }

.carousel-dot:hover > span, .carousel-dot:focus-visible > span { background: #FFC776 !important; }

/* Header: sticky everywhere; on phones it hides while scrolling down, returns on scroll up */
.site-header { transition: transform 250ms ease; will-change: transform; }
@media (max-width: 719px) {
  .site-header--hidden { transform: translateY(-100%); }
}

/* Résumé experience: sticky role index + Summary / Full detail */
.exp-rail-item { transition: background 150ms ease; }
.exp-rail-item:hover .exp-rail-title { color: #C2553A !important; }
.exp-rail-item.is-active { background: #F4ECDD; border-left-color: #C2553A !important; }
.exp-rail-item.is-active .exp-rail-title { font-weight: 600 !important; }
.exp-dens-btn.is-on { background: #384954 !important; color: #F0F0F0 !important; }
[data-density="summary"] ul:not(:has(ul)) { display: none !important; }
[data-rail]::-webkit-scrollbar { width: 8px; -webkit-appearance: none; }
[data-rail]::-webkit-scrollbar-track { background: #F4ECDD; border-radius: 4px; }
[data-rail]::-webkit-scrollbar-thumb { background: #C9B79C; border-radius: 4px; }
[data-rail]::-webkit-scrollbar-thumb:hover { background: #73634D; }
@media (max-width: 899px) {
  .exp-layout { flex-direction: column !important; gap: 0 !important; align-items: stretch !important; }
  .exp-rail { position: static !important; max-height: none !important; flex: none !important; }
  .exp-rail nav { display: none !important; }
}

/* Ж-shaped quote card: headshot below the quote once the card wraps on narrow screens */
@media (max-width: 640px) {
  #myQuote > img { order: 2; }
}

@media print {
  body { background: #fff; }
  .exp-rail { display: none !important; }
  [data-density="summary"] ul { display: flex !important; }
}

/* Focus ring: dark ink on light sections; gold on dark (slate) sections */
:focus-visible { outline: 2px solid #222426; outline-offset: 2px; }
.site-header :focus-visible,
footer :focus-visible,
#partners :focus-visible,
[style*="background:#384954"] :focus-visible,
[style*="background: #384954"] :focus-visible,
[style*="background-color:#384954"] :focus-visible,
[style*="background-color: #384954"] :focus-visible { outline-color: #FFC776; }
/* Mobile menu panel is light even though it sits inside the dark header */
.site-menu > :not(summary) :focus-visible { outline-color: #222426; }

/* Ж links (header nav + footer back-to-top): 44×44 tap area, same visual size/position */
a.site-nav-link[href*="he-shaped"],
a.footer-zhe {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-width: 44px; min-height: 44px;
  margin: -13px -14px; border-radius: 8px;
}

/* Header nav links (Home, Résumé): 44px-tall tap area, same visual position */
.site-nav-link { display: inline-flex; align-items: center; box-sizing: border-box; min-height: 44px; margin: -13px 0; border-radius: 8px; }

/* Header name link: 44px-tall tap area, same visual position */
a.site-header-name { display: block; box-sizing: border-box; line-height: 44px; margin-top: -13px; margin-bottom: -13px; border-radius: 8px; }

/* Shared element classes (moved out of repeated inline styles).
   The résumé PDF doesn't load this file: tools/build-resume-pdf.js expands these back to inline styles. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skill-chip { background:#FBF6EE; color:#222426; font-size:14px; padding:6px 14px; border-radius:999px; }
.site-menu-link { display:block; padding:8px 14px 8px 30px; border-radius:8px; font-size:14px; font-weight:400; color:#73634D; text-decoration:none; }
.eyebrow { font-family:Figtree,sans-serif; font-size:15px; line-height:1.4; font-weight:500; letter-spacing:.04em; text-transform:uppercase; margin:0; color:#FFC776; text-align:center; }
.industry-ico { display:inline-block; width:20px; height:20px; vertical-align:-4px; }

/* Résumé Experience: Full Detail | Summary | Timeline switch (resume-timeline.js) */
.exp-timeline { display: none; }
#experience[data-view="timeline"] .exp-layout { display: none !important; }
#experience[data-view="timeline"] .exp-timeline { display: block; }
.tl-mobile { display: none; }
@media (max-width: 760px) {
  .tl-desktop { display: none; }
  .tl-mobile { display: block; }
}
.tl-chip { transition: transform 150ms ease, box-shadow 150ms ease; }
.tl-chip:hover, .tl-chip:focus-within { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34,36,38,.18); }
a.tl-chip-link, a.tl-chip-link:hover, a.tl-chip-link:visited { color: inherit; text-decoration: none; }
#tl-modal { border: 0; padding: 0; border-radius: 16px; background: #FBF6EE; color: #222426; width: min(760px, calc(100% - 32px)); max-height: min(86vh, 920px); box-shadow: 0 24px 64px rgba(34,36,38,.35); }
#tl-modal::backdrop { background: rgba(34,36,38,.55); }
.tl-modal-more { background: none; border: 0; padding: 0; font: 600 15px Figtree, sans-serif; color: #C2553A; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tl-modal-more:hover { color: #A44229; }
.tl-modal-close { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid #E5D9C4; background: #FBF6EE; color: #222426; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tl-modal-close:hover { background: #FFC776; border-color: #FFC776; }
@media (max-width: 600px) {
  .tl-modal-inner { padding: 20px 18px 24px !important; }
}
@media print {
  .exp-timeline, .exp-head [role="group"] { display: none !important; }
  #experience .exp-layout { display: flex !important; }
}
