/* ==========================================================================
   demo.css  -  Upsell Hospitality  -  per-vertical theme system
   Prefix: uh-   (never reused as JS state class)
   RS prefix used exclusively for resume sheet components.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Reset and base tokens
   -------------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Spacing scale */
  --uh-space-xs:   0.25rem;
  --uh-space-sm:   0.5rem;
  --uh-space-md:   1rem;
  --uh-space-lg:   1.75rem;
  --uh-space-xl:   2.5rem;
  --uh-space-2xl:  4rem;
  --uh-space-3xl:  6rem;
  --uh-space-4xl:  9rem;

  /* Typography scale */
  --uh-text-xs:    0.75rem;
  --uh-text-sm:    0.85rem;
  --uh-text-base:  1.0625rem;
  --uh-text-lg:    1.125rem;
  --uh-text-xl:    1.375rem;
  --uh-text-2xl:   1.875rem;
  --uh-text-3xl:   2.75rem;
  --uh-text-4xl:   3.75rem;
  --uh-text-hero:  3.5rem;
  --uh-text-display: clamp(3rem, 9vw, 7rem);
  --uh-text-tagline: clamp(1.5rem, 3.5vw, 2.5rem);
  --uh-text-3xl-lh:  1.1;     /* tight line-height for big section titles */
  --uh-measure:      62ch;    /* capped prose measure */

  /* Radius */
  --uh-radius-sm:  4px;
  --uh-radius-md:  8px;
  --uh-radius-lg:  16px;
  --uh-radius-pill: 999px;

  /* Transition */
  --uh-transition: 200ms ease;

  /* Fallback accent */
  --uh-accent: #C07B4A;

  /* Accent derivatives:
     --uh-on-accent  = text color that sits ON a filled accent button (AA legible)
     --uh-accent-text = accent used for TEXT/rules on light surfaces (darkened where needed)
     Overridden per theme below; default to white-on-accent and the accent itself. */
  --uh-on-accent: #FFFFFF;
  --uh-accent-text: var(--uh-accent);

  /* Component tokens - overridden per theme */
  --uh-bg:          #FFFFFF;
  --uh-surface:     #F5F3EF;
  --uh-surface-2:   #EDE9E3;
  --uh-text-primary:   #1A1A1A;
  --uh-text-secondary: #555555;
  --uh-text-muted:     #888888;
  --uh-border:      rgba(0,0,0,0.10);
  --uh-nav-bg:      #FFFFFF;
  --uh-nav-text:    #1A1A1A;
  --uh-hero-bg:     #1A1A1A;
  --uh-hero-text:   #FFFFFF;
  --uh-hero-sub:    rgba(255,255,255,0.72);
  --uh-motif-color: #FFFFFF;
  --uh-timeline-line:  rgba(0,0,0,0.12);
  --uh-timeline-dot:   var(--uh-accent);

  /* Accent-tinted surfaces so color carries below the hero. Fallbacks first so
     browsers without color-mix still get a sensible value; the @supports block
     below upgrades them. These reference the per-theme accent/bg/surface vars,
     which resolve at use-site, so each vertical tints with its own accent. */
  --uh-accent-wash:   var(--uh-surface);
  --uh-accent-line:   var(--uh-border);
  --uh-surface-tint:  var(--uh-surface);
}

@supports (background: color-mix(in srgb, red 50%, white)) {
  :root {
    --uh-accent-wash:  color-mix(in srgb, var(--uh-accent) 8%, var(--uh-bg));
    --uh-accent-line:  color-mix(in srgb, var(--uh-accent-text) 40%, transparent);
    --uh-surface-tint: color-mix(in srgb, var(--uh-accent) 4%, var(--uh-surface));
  }
}

/* --------------------------------------------------------------------------
   1. THEME: kitchen  -  The Pass at Night: charcoal + ember orange
   -------------------------------------------------------------------------- */

.theme-kitchen {
  --uh-bg:            #111110;
  --uh-surface:       #1C1B19;
  --uh-surface-2:     #252420;
  --uh-text-primary:  #EAE5DA;
  --uh-text-secondary:#B5AFA2;
  --uh-text-muted:    #7A7468;
  --uh-border:        rgba(255,255,255,0.08);
  --uh-nav-bg:        #0D0D0C;
  --uh-nav-text:      #EAE5DA;
  --uh-hero-bg:       #0D0D0C;
  --uh-hero-text:     #EAE5DA;
  --uh-hero-sub:      #E8622A;
  --uh-motif-color:   #E8622A;
  --uh-timeline-line: rgba(232,98,42,0.20);
  --uh-timeline-dot:  #E8622A;
  --uh-accent:        #E8622A;
}

/* Kitchen: ember glow behind hero - radial from bottom, no filter on SVG */
.theme-kitchen .uh-hero {
  background:
    radial-gradient(ellipse 90% 70% at 50% 120%, rgba(232,98,42,0.35) 0%, rgba(160,50,10,0.10) 55%, transparent 80%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(200,80,20,0.15) 0%, transparent 60%),
    #0D0D0C;
}

.theme-kitchen .uh-hero__name {
  letter-spacing: -0.015em;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-kitchen .uh-nav {
  border-bottom: 1px solid rgba(232,98,42,0.18);
}

/* Ember pulse: purely additive glow on motif wrapper, never on SVG root */
@media (prefers-reduced-motion: no-preference) {
  .theme-kitchen .uh-motif-wrap--kitchen {
    animation: uh-ember-pulse 3s ease-in-out infinite;
  }
}

@keyframes uh-ember-pulse {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 1.0; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-kitchen .uh-motif-wrap--kitchen {
    animation: none !important;
    opacity: 0.85 !important;
  }
}

/* --------------------------------------------------------------------------
   2. THEME: floor  -  Bistro Daylight: cream + bottle green + persimmon
   -------------------------------------------------------------------------- */

.theme-floor {
  --uh-bg:            #FAF6EE;
  --uh-surface:       #F3EDD9;
  --uh-surface-2:     #EAE2CA;
  --uh-text-primary:  #1E2B1A;
  --uh-text-secondary:#3B4F34;
  --uh-text-muted:    #7A8574;
  --uh-border:        rgba(30,43,26,0.12);
  --uh-nav-bg:        #1E2B1A;
  --uh-nav-text:      #F3EDD9;
  --uh-hero-bg:       #2B4028;
  --uh-hero-text:     #FAF6EE;
  --uh-hero-sub:      #E8C56A;
  --uh-motif-color:   #D95F3B;
  --uh-timeline-line: rgba(30,43,26,0.15);
  --uh-timeline-dot:  #D95F3B;
  --uh-accent:        #D95F3B;
}

.theme-floor .uh-hero {
  background:
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(232,197,106,0.18) 0%, transparent 65%),
    linear-gradient(155deg, #1E2B1A 0%, #2B4028 50%, #3C5A37 100%);
}

.theme-floor .uh-section__title {
  border-bottom-color: rgba(30,43,26,0.20);
}

/* Plate shine - a gentle shimmer on the motif */
@media (prefers-reduced-motion: no-preference) {
  .theme-floor .uh-motif-wrap--floor {
    animation: uh-bistro-shine 4s ease-in-out infinite;
  }
}

@keyframes uh-bistro-shine {
  0%, 100% { opacity: 0.8; }
  40%       { opacity: 1.0; }
  60%       { opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-floor .uh-motif-wrap--floor {
    animation: none !important;
    opacity: 0.85 !important;
  }
}

/* --------------------------------------------------------------------------
   3. THEME: hotel  -  The Concierge: ink/navy + brass + ivory
   -------------------------------------------------------------------------- */

.theme-hotel {
  --uh-bg:            #FDFAF4;
  --uh-surface:       #F5EFE0;
  --uh-surface-2:     #EDE5D0;
  --uh-text-primary:  #14202E;
  --uh-text-secondary:#2C3E52;
  --uh-text-muted:    #8A9AAA;
  --uh-border:        rgba(20,32,46,0.10);
  --uh-nav-bg:        #14202E;
  --uh-nav-text:      #F5EFE0;
  --uh-hero-bg:       #14202E;
  --uh-hero-text:     #FDFAF4;
  --uh-hero-sub:      #B8963E;
  --uh-motif-color:   #B8963E;
  --uh-timeline-line: rgba(184,150,62,0.20);
  --uh-timeline-dot:  #B8963E;
  --uh-accent:        #B8963E;
}

.theme-hotel .uh-hero {
  background:
    radial-gradient(ellipse 50% 50% at 80% 50%, rgba(184,150,62,0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0E1924 0%, #14202E 60%, #1C2C42 100%);
  border-bottom: 1px solid rgba(184,150,62,0.25);
}

.theme-hotel .uh-nav {
  border-bottom: 1px solid rgba(184,150,62,0.20);
}

.theme-hotel .uh-hero__name {
  letter-spacing: 0.04em;
  font-weight: 400;
}

/* Brass service bell: a slow elegant rotate on the motif wrapper */
@media (prefers-reduced-motion: no-preference) {
  .theme-hotel .uh-motif-wrap--hotel {
    animation: uh-hotel-entrance 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }
}

@keyframes uh-hotel-entrance {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-hotel .uh-motif-wrap--hotel {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   4. THEME: bar  -  Last Call: aubergine + amber, moody
   -------------------------------------------------------------------------- */

.theme-bar {
  --uh-bg:            #110E18;
  --uh-surface:       #1A1624;
  --uh-surface-2:     #231E30;
  --uh-text-primary:  #E8E0D0;
  --uh-text-secondary:#B8AACC;
  --uh-text-muted:    #7A6E8A;
  --uh-border:        rgba(255,255,255,0.07);
  --uh-nav-bg:        #0D0B12;
  --uh-nav-text:      #E8E0D0;
  --uh-hero-bg:       #0D0B12;
  --uh-hero-text:     #E8E0D0;
  --uh-hero-sub:      #D6913F;
  --uh-motif-color:   #D6913F;
  --uh-timeline-line: rgba(200,120,58,0.18);
  --uh-timeline-dot:  #D6913F;
  --uh-accent:        #D6913F;
}

.theme-bar .uh-hero {
  background:
    radial-gradient(ellipse 75% 60% at 50% 128%, rgba(216,140,72,0.38) 0%, rgba(150,80,28,0.12) 52%, transparent 74%),
    radial-gradient(ellipse 55% 45% at 84% 6%, rgba(124,70,156,0.34) 0%, transparent 56%),
    radial-gradient(ellipse 45% 34% at 8% 18%, rgba(92,58,116,0.22) 0%, transparent 52%),
    #0D0B12;
}

/* Amber pour: a subtle opacity wave */
@media (prefers-reduced-motion: no-preference) {
  .theme-bar .uh-motif-wrap--bar {
    animation: uh-pour 5s ease-in-out infinite;
  }
}

@keyframes uh-pour {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1.0; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-bar .uh-motif-wrap--bar {
    animation: none !important;
    opacity: 0.85 !important;
  }
}

/* --------------------------------------------------------------------------
   5. THEME: events  -  The Gala: near-black + champagne gold
   -------------------------------------------------------------------------- */

.theme-events {
  --uh-bg:            #F8F6F0;
  --uh-surface:       #F0EBE0;
  --uh-surface-2:     #E5DDD0;
  --uh-text-primary:  #2A2822;
  --uh-text-secondary:#4A4840;
  --uh-text-muted:    #8A8880;
  --uh-border:        rgba(42,40,34,0.10);
  --uh-nav-bg:        #F0EBE0;
  --uh-nav-text:      #2A2822;
  --uh-hero-bg:       #1E1C18;
  --uh-hero-text:     #F8F6F0;
  --uh-hero-sub:      #C8AA60;
  --uh-motif-color:   #C8AA60;
  --uh-timeline-line: rgba(200,170,96,0.25);
  --uh-timeline-dot:  #C8AA60;
  --uh-accent:        #C8AA60;
}

.theme-events .uh-hero {
  background:
    radial-gradient(ellipse 50% 60% at 50% 0%, rgba(200,170,96,0.18) 0%, transparent 55%),
    linear-gradient(160deg, #141210 0%, #1E1C18 50%, #282420 100%);
}

.theme-events .uh-nav {
  border-bottom: 1px solid rgba(42,40,34,0.12);
}

.theme-events .uh-hero__name {
  letter-spacing: 0.035em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Spotlight sweep: arc light across the hero heading wrapper */
@media (prefers-reduced-motion: no-preference) {
  .theme-events .uh-motif-wrap--events {
    animation: uh-spotlight 6s ease-in-out infinite;
  }
}

@keyframes uh-spotlight {
  0%, 100% { opacity: 0.75; transform: translateY(0); }
  50%       { opacity: 1.0;  transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-events .uh-motif-wrap--events {
    animation: none !important;
    opacity: 0.85 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   6. THEME: golf  -  The Back Nine: fairway green + sand + clubhouse navy
   -------------------------------------------------------------------------- */

.theme-golf {
  --uh-bg:            #F6F4EE;
  --uh-surface:       #ECE8DC;
  --uh-surface-2:     #E0DBCC;
  --uh-text-primary:  #1A2818;
  --uh-text-secondary:#2E4430;
  --uh-text-muted:    #7A8A70;
  --uh-border:        rgba(26,40,24,0.10);
  --uh-nav-bg:        #1A2818;
  --uh-nav-text:      #ECE8DC;
  --uh-hero-bg:       #1A2818;
  --uh-hero-text:     #F6F4EE;
  --uh-hero-sub:      #C4A84A;
  --uh-motif-color:   #C4A84A;
  --uh-timeline-line: rgba(45,90,61,0.20);
  --uh-timeline-dot:  #2D5A3D;
  --uh-accent:        #2D5A3D;
}

.theme-golf .uh-hero {
  background:
    radial-gradient(ellipse 80% 50% at 100% 80%, rgba(196,168,74,0.12) 0%, transparent 60%),
    linear-gradient(160deg, #101C10 0%, #1A2818 50%, #223222 100%);
}

.theme-golf .uh-hero__name {
  letter-spacing: 0.02em;
  font-style: italic;
}

.theme-golf .uh-nav {
  border-bottom: 1px solid rgba(196,168,74,0.20);
}

/* Flag unfurl: a gentle rise on the motif */
@media (prefers-reduced-motion: no-preference) {
  .theme-golf .uh-motif-wrap--golf {
    animation: uh-flag-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }
}

@keyframes uh-flag-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-golf .uh-motif-wrap--golf {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   7. THEME: spa  -  Stillness: sage/stone/blush, airy
   -------------------------------------------------------------------------- */

.theme-spa {
  --uh-bg:            #F8F6F2;
  --uh-surface:       #EEE9E2;
  --uh-surface-2:     #E4DDD4;
  --uh-text-primary:  #2A2824;
  --uh-text-secondary:#5A5850;
  --uh-text-muted:    #9A9890;
  --uh-border:        rgba(42,40,36,0.08);
  --uh-nav-bg:        #F0EDE8;
  --uh-nav-text:      #2A2824;
  --uh-hero-bg:       #E4DDD4;
  --uh-hero-text:     #2A2824;
  --uh-hero-sub:      #7A9E8A;
  --uh-motif-color:   #7A9E8A;
  --uh-timeline-line: rgba(122,158,138,0.22);
  --uh-timeline-dot:  #7A9E8A;
  --uh-accent:        #7A9E8A;
}

.theme-spa .uh-hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% 80%, rgba(122,158,138,0.15) 0%, rgba(200,180,170,0.08) 60%, transparent 85%),
    linear-gradient(170deg, #DDD6CE 0%, #E4DDD4 60%, #EBE4DC 100%);
}

.theme-spa .uh-hero__name {
  color: var(--uh-text-primary);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.theme-spa .uh-nav {
  border-bottom: 1px solid rgba(122,158,138,0.18);
}

/* Ripple: concentric slow pulse on motif wrapper */
@media (prefers-reduced-motion: no-preference) {
  .theme-spa .uh-motif-wrap--spa {
    animation: uh-ripple 4s ease-in-out infinite;
  }
}

@keyframes uh-ripple {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1.0; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-spa .uh-motif-wrap--spa {
    animation: none !important;
    opacity: 0.85 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   8. THEME: general  -  warm hospitality: espresso + terracotta + sand
   -------------------------------------------------------------------------- */

.theme-general {
  --uh-bg:            #FBF8F3;
  --uh-surface:       #F2EDE4;
  --uh-surface-2:     #E8E0D4;
  --uh-text-primary:  #221810;
  --uh-text-secondary:#4A3828;
  --uh-text-muted:    #8A7868;
  --uh-border:        rgba(34,24,16,0.10);
  --uh-nav-bg:        #221810;
  --uh-nav-text:      #F2EDE4;
  --uh-hero-bg:       #221810;
  --uh-hero-text:     #FBF8F3;
  --uh-hero-sub:      #C07B4A;
  --uh-motif-color:   #C07B4A;
  --uh-timeline-line: rgba(192,123,74,0.22);
  --uh-timeline-dot:  #C07B4A;
  --uh-accent:        #C07B4A;
}

.theme-general .uh-hero {
  background:
    radial-gradient(ellipse 70% 50% at 78% 55%, rgba(192,123,74,0.30) 0%, transparent 62%),
    linear-gradient(150deg, #2A1A0E 0%, #3A2415 55%, #4A301C 100%);
}

/* --------------------------------------------------------------------------
   THEME: executive  -  The Operator: graphite + burnished bronze + ivory
   -------------------------------------------------------------------------- */

.theme-executive {
  --uh-bg:            #F7F5F0;
  --uh-surface:       #EEE9DF;
  --uh-surface-2:     #E2DACC;
  --uh-text-primary:  #1C1B18;
  --uh-text-secondary:#4A463E;
  --uh-text-muted:    #8A8276;
  --uh-border:        rgba(28,27,24,0.10);
  --uh-nav-bg:        #1B1D20;
  --uh-nav-text:      #EEE9DF;
  --uh-hero-bg:       #1B1D20;
  --uh-hero-text:     #F7F5F0;
  --uh-hero-sub:      #C2954E;
  --uh-motif-color:   #C2954E;
  --uh-timeline-line: rgba(194,149,78,0.22);
  --uh-timeline-dot:  #C2954E;
  --uh-accent:        #A6772E;
}

.theme-executive .uh-hero {
  background:
    radial-gradient(ellipse 55% 45% at 75% 50%, rgba(194,149,78,0.16) 0%, transparent 60%),
    linear-gradient(150deg, #141518 0%, #1B1D20 55%, #23252B 100%);
}

.theme-executive .uh-nav {
  letter-spacing: 0.04em;
}

.theme-executive .uh-hero__name {
  letter-spacing: -0.01em;
}

/* Portico: a slow, dignified settle on the motif wrapper */
@media (prefers-reduced-motion: no-preference) {
  .theme-executive .uh-motif-wrap--executive {
    animation: uh-portico 9s ease-in-out infinite;
    transform-origin: 50% 60%;
  }
  @keyframes uh-portico {
    0%, 100% { transform: translateY(0); opacity: 0.92; }
    50%      { transform: translateY(-2px); opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-executive .uh-motif-wrap--executive {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Accessible accent tokens (WCAG AA): button foreground + accent-for-text.
   Light accents (brass, champagne, sage, terracotta) get a dark button text
   and a darkened text-accent so dates/rules/links stay legible on cream.
   Dark themes inherit accent-text = accent (bright accent reads fine on dark).
   -------------------------------------------------------------------------- */

.theme-hotel     { --uh-on-accent: #1C1606; --uh-accent-text: #8A6A1E; }
.theme-events    { --uh-on-accent: #241F12; --uh-accent-text: #806416; }
.theme-spa       { --uh-on-accent: #14201A; --uh-accent-text: #3C5A47; }
.theme-floor     { --uh-accent-text: #B0472A; }
.theme-general   { --uh-accent-text: #9A5A2C; }
.theme-executive { --uh-accent-text: #8A6326; }
.theme-golf      { --uh-accent-text: #2D5A3D; }

/* Calmer, high-legibility hero subhead on the dark heroes (no second accent fighting the name) */
.theme-kitchen   { --uh-hero-sub: rgba(234,229,218,0.84); }
.theme-bar       { --uh-hero-sub: rgba(233,225,210,0.84); }
.theme-floor     { --uh-hero-sub: rgba(250,246,238,0.86); }
.theme-general   { --uh-hero-sub: rgba(247,242,235,0.86); }

/* ==========================================================================
   LAYOUT AND COMPONENTS  (all uh- prefixed, theme-independent structure)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Body
   -------------------------------------------------------------------------- */

.uh-body {
  background: var(--uh-bg);
  color: var(--uh-text-primary);
  min-height: 100vh;
  font-size: var(--uh-text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */

.uh-skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  background: var(--uh-accent);
  color: var(--uh-on-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--uh-radius-sm);
  font-size: var(--uh-text-sm);
  text-decoration: none;
  z-index: 10000;
  transition: top var(--uh-transition);
}

.uh-skip-link:focus-visible {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Preview ribbon
   -------------------------------------------------------------------------- */

.uh-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #1A1A1A;
  color: #F5F0E8;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: var(--uh-text-sm);
  flex-wrap: wrap;
  text-align: center;
}

.uh-ribbon__text {
  opacity: 0.9;
}

.uh-ribbon__btn {
  background: var(--uh-accent);
  color: var(--uh-on-accent);
  border-radius: var(--uh-radius-pill);
  padding: 0.3rem 1rem;
  font-size: var(--uh-text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--uh-transition);
}

.uh-ribbon__btn:hover {
  opacity: 0.88;
}

.uh-ribbon__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* When ribbon present, push nav below it */
[data-preview="true"] .uh-nav,
[data-preview="true"] .uh-rs-bar {
  top: 2.8rem;
}

[data-preview="true"] .uh-hero,
[data-preview="true"] .uh-rs-body {
  padding-top: 2.8rem;
}

/* --------------------------------------------------------------------------
   Watermark  (behind content, purely decorative)
   -------------------------------------------------------------------------- */

.uh-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.uh-watermark__text {
  font-size: clamp(4rem, 20vw, 14rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(128,128,128,0.08);
  transform: rotate(-35deg);
  white-space: nowrap;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Preview invite block (site, gated)
   -------------------------------------------------------------------------- */

.uh-preview-invite {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--uh-space-xl) var(--uh-space-xl);
  border-top: 1px solid var(--uh-border);
  display: flex;
  flex-direction: column;
  gap: var(--uh-space-md);
}

.uh-preview-invite__text {
  font-size: var(--uh-text-base);
  color: var(--uh-text-secondary);
  line-height: 1.65;
  max-width: 560px;
}

.uh-preview-invite__link {
  display: inline-flex;
  align-items: center;
  gap: var(--uh-space-xs);
  color: var(--uh-accent);
  font-size: var(--uh-text-sm);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--uh-transition);
}

.uh-preview-invite__link:hover {
  border-bottom-color: var(--uh-accent);
}

.uh-preview-invite__link:focus-visible {
  outline: 2px solid var(--uh-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Navigation bar
   -------------------------------------------------------------------------- */

.uh-nav {
  position: sticky;
  top: 0;
  z-index: 800;
  background: var(--uh-nav-bg);
  color: var(--uh-nav-text);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 var(--uh-space-xl);
  height: 3.5rem;
  gap: var(--uh-space-lg);
  border-bottom: 1px solid var(--uh-border);
}

.uh-nav__brand {
  font-size: var(--uh-text-lg);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

.uh-nav__links {
  display: flex;
  align-items: center;
  gap: var(--uh-space-lg);
  flex-shrink: 0;
  margin-left: auto;
}

.uh-nav__link {
  color: var(--uh-nav-text);
  text-decoration: none;
  font-size: var(--uh-text-sm);
  opacity: 0.8;
  transition: opacity var(--uh-transition);
  white-space: nowrap;
}

.uh-nav__link:hover {
  opacity: 1;
}

.uh-nav__link:focus-visible {
  outline: 2px solid var(--uh-accent);
  outline-offset: 2px;
  border-radius: var(--uh-radius-sm);
  opacity: 1;
}

.uh-nav__link--cta {
  background: var(--uh-accent);
  color: var(--uh-on-accent);
  opacity: 1;
  padding: 0.38rem 0.95rem;
  border-radius: var(--uh-radius-pill);
  font-weight: 600;
  font-size: var(--uh-text-sm);
}

.uh-nav__link--cta:hover {
  opacity: 0.88;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.uh-hero {
  background: var(--uh-hero-bg);
  color: var(--uh-hero-text);
  padding: var(--uh-space-2xl) var(--uh-space-xl);
  min-height: 55vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.uh-hero__inner {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.uh-hero__motif {
  margin-bottom: var(--uh-space-lg);
  color: var(--uh-motif-color);
  line-height: 0;
}

/* motif wrapper handles animation/glow; SVG root stays filter-free */
.uh-motif-wrap {
  display: inline-block;
}

.uh-motif-svg {
  display: block;
  color: var(--uh-motif-color);
  opacity: 0.85;
}

/* In the hero, the motif is a signature mark - give it more presence */
.uh-hero__motif .uh-motif-svg {
  width: 64px;
  height: 64px;
  opacity: 0.95;
}

.uh-hero__name {
  font-size: var(--uh-text-display);
  font-weight: 700;
  line-height: 1.02;
  color: var(--uh-hero-text);
  margin-bottom: var(--uh-space-md);
  opacity: 1;
  visibility: visible;
}

.uh-hero__role {
  font-size: var(--uh-text-lg);
  color: var(--uh-hero-sub);
  opacity: 1;
  visibility: visible;
  line-height: 1.5;
}

.uh-hero__tagline {
  margin-top: var(--uh-space-md);
  max-width: 22ch;
  font-size: var(--uh-text-tagline);
  line-height: 1.15;
  color: var(--uh-hero-text);
  opacity: 0.95;
}

/* Motion guard - base state always readable (opacity never changed - only transform) */
@media (prefers-reduced-motion: no-preference) {
  .uh-hero__name {
    animation: uh-slide-up 0.55s ease forwards;
  }
  .uh-hero__role {
    animation: uh-slide-up 0.55s 0.12s ease forwards;
  }
}

/* Slide only - opacity stays at 1 throughout so text is ALWAYS readable at rest */
@keyframes uh-slide-up {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .uh-hero__name,
  .uh-hero__role {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
}

/* --------------------------------------------------------------------------
   Sections (shared)
   -------------------------------------------------------------------------- */

.uh-section {
  max-width: 860px;
  margin: 0 auto;
  /* Generous desktop rhythm. Collapses on mobile via the breakpoints below
     (where --uh-space-3xl is reduced) so small screens stay tight. */
  padding: var(--uh-space-3xl) var(--uh-space-xl);
  border-bottom: 1px solid var(--uh-accent-line);
  scroll-margin-top: 5.5rem;
}

.uh-section:last-of-type {
  border-bottom: none;
}

/* Alternating tint so color carries below the hero. The About band gets a
   softer accent wash statement treatment (rule below). Full-bleed background
   with the inner content still capped, achieved via box-shadow spread so the
   max-width container reads as a tinted band. */
.uh-section--tint {
  background: var(--uh-surface-tint);
  box-shadow: 0 0 0 100vmax var(--uh-surface-tint);
  clip-path: inset(0 -100vmax);
}

.uh-strengths.uh-section {
  background: var(--uh-accent-wash);
  box-shadow: 0 0 0 100vmax var(--uh-accent-wash);
  clip-path: inset(0 -100vmax);
}

.uh-skills.uh-section {
  background: var(--uh-surface-tint);
  box-shadow: 0 0 0 100vmax var(--uh-surface-tint);
  clip-path: inset(0 -100vmax);
}

.uh-section__title {
  font-size: var(--uh-text-3xl);
  font-weight: 600;
  line-height: var(--uh-text-3xl-lh);
  letter-spacing: -0.015em;
  color: var(--uh-text-primary);
  margin-bottom: var(--uh-space-lg);
  padding-bottom: var(--uh-space-sm);
  border-bottom: 2px solid var(--uh-accent-text);
  display: inline-block;
  opacity: 1;
  visibility: visible;
}

/* Kicker / eyebrow above each section title */
.uh-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--uh-space-sm);
  font-size: var(--uh-text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--uh-accent-text);
}

.uh-kicker::before {
  content: '';
  width: 1.6em;
  height: 2px;
  background: var(--uh-accent-text);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Strengths / About
   -------------------------------------------------------------------------- */

.uh-strengths__text {
  font-size: var(--uh-text-lg);
  color: var(--uh-text-secondary);
  line-height: 1.75;
  max-width: var(--uh-measure);
}

/* --------------------------------------------------------------------------
   Skills grid ("What I do well")
   -------------------------------------------------------------------------- */

.uh-skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--uh-space-lg);
}

.uh-skill {
  padding-top: var(--uh-space-md);
  border-top: 2px solid var(--uh-accent-text);
}

.uh-skill__title {
  font-size: var(--uh-text-lg);
  font-weight: 600;
  color: var(--uh-text-primary);
  margin-bottom: var(--uh-space-xs);
  line-height: 1.25;
}

.uh-skill__text {
  font-size: var(--uh-text-base);
  color: var(--uh-text-secondary);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .uh-skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .uh-skills__grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.uh-timeline__list {
  list-style: none;
  position: relative;
  padding-left: 1.75rem;
}

.uh-timeline__list::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--uh-timeline-line);
}

.uh-timeline__item {
  position: relative;
  padding: 0 0 var(--uh-space-xl) var(--uh-space-md);
}

.uh-timeline__item:last-child {
  padding-bottom: 0;
}

.uh-timeline__marker {
  position: absolute;
  left: -1.175rem;
  top: 0.45rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--uh-timeline-dot);
  border: 2px solid var(--uh-bg);
  box-shadow: 0 0 0 1px var(--uh-timeline-dot);
}

.uh-timeline__item--current .uh-timeline__marker {
  width: 0.8rem;
  height: 0.8rem;
  left: -1.25rem;
}

.uh-timeline__role {
  font-size: var(--uh-text-lg);
  font-weight: 600;
  color: var(--uh-text-primary);
  margin-bottom: var(--uh-space-xs);
  opacity: 1;
  visibility: visible;
}

.uh-timeline__meta {
  font-size: var(--uh-text-base);
  color: var(--uh-text-secondary);
  margin-bottom: var(--uh-space-xs);
}

.uh-timeline__company {
  font-weight: 500;
}

.uh-timeline__loc {
  color: var(--uh-text-muted);
}

.uh-timeline__dates {
  font-size: var(--uh-text-sm);
  color: var(--uh-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--uh-space-sm);
  font-weight: 600;
}

.uh-timeline__desc {
  font-size: var(--uh-text-base);
  color: var(--uh-text-secondary);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Contact section
   -------------------------------------------------------------------------- */

.uh-contact__intro {
  font-size: var(--uh-text-lg);
  color: var(--uh-text-secondary);
  margin-bottom: var(--uh-space-lg);
}

.uh-contact__form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--uh-space-md);
}

.uh-contact__form--locked {
  opacity: 0.55;
  pointer-events: none;
}

.uh-contact__field {
  display: flex;
  flex-direction: column;
  gap: var(--uh-space-xs);
}

.uh-contact__label {
  font-size: var(--uh-text-sm);
  font-weight: 500;
  color: var(--uh-text-secondary);
}

.uh-contact__input,
.uh-contact__textarea {
  background: var(--uh-bg);
  border: 1px solid color-mix(in srgb, var(--uh-text-secondary) 30%, transparent);
  border-radius: var(--uh-radius-md);
  padding: 0.65rem 0.875rem;
  font-size: var(--uh-text-base);
  color: var(--uh-text-primary);
  font-family: inherit;
  transition: border-color var(--uh-transition), box-shadow var(--uh-transition);
  width: 100%;
}

.uh-contact__input:focus-visible,
.uh-contact__textarea:focus-visible {
  outline: none;
  border-color: var(--uh-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--uh-accent) 24%, transparent);
}

.uh-contact__input:disabled,
.uh-contact__textarea:disabled {
  cursor: not-allowed;
  background: var(--uh-surface-2);
}

.uh-contact__textarea {
  resize: vertical;
  min-height: 7rem;
}

.uh-contact__linkedin {
  margin-top: var(--uh-space-lg);
  font-size: var(--uh-text-base);
  color: var(--uh-text-muted);
}

.uh-contact__linkedin--locked {
  color: var(--uh-text-muted);
  font-size: var(--uh-text-sm);
  font-style: italic;
  margin-top: var(--uh-space-lg);
}

/* --------------------------------------------------------------------------
   Lock note
   -------------------------------------------------------------------------- */

.uh-lock-note {
  display: flex;
  align-items: center;
  gap: var(--uh-space-xs);
  font-size: var(--uh-text-sm);
  color: var(--uh-text-muted);
  margin-top: var(--uh-space-xs);
}

.uh-lock-icon {
  flex-shrink: 0;
  color: var(--uh-text-muted);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.uh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--uh-space-sm);
  align-self: flex-start;
  background: var(--uh-accent);
  color: var(--uh-on-accent);
  border: none;
  border-radius: var(--uh-radius-md);
  padding: 0.75rem 1.6rem;
  font-size: var(--uh-text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.16);
  transition: opacity var(--uh-transition), background var(--uh-transition), transform var(--uh-transition);
  white-space: nowrap;
}

.uh-btn:hover {
  opacity: 0.88;
}

.uh-btn:focus-visible {
  outline: 2px solid var(--uh-accent);
  outline-offset: 3px;
  border-radius: var(--uh-radius-md);
}

.uh-btn--locked {
  background: var(--uh-surface-2);
  color: var(--uh-text-muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.uh-btn--locked:hover {
  opacity: 0.65;
}

.uh-btn--download {
  font-size: var(--uh-text-sm);
  padding: 0.45rem 1.1rem;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */

.uh-link {
  color: var(--uh-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--uh-transition);
}

.uh-link:hover {
  border-bottom-color: var(--uh-accent);
}

.uh-link:focus-visible {
  outline: 2px solid var(--uh-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.uh-footer {
  text-align: center;
  padding: var(--uh-space-xl) var(--uh-space-xl);
  border-top: 1px solid var(--uh-border);
}

.uh-footer__text {
  font-size: var(--uh-text-sm);
  color: var(--uh-text-muted);
}

/* ==========================================================================
   RESUME PAGE  - Mateo Ferraro structure
   Classes prefixed uh-rs- (resume sheet) to avoid any collision with uh-
   ========================================================================== */

/* Top bar */
.uh-rs-bar {
  position: sticky;
  top: 0;
  z-index: 800;
  background: var(--uh-nav-bg);
  color: var(--uh-nav-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--uh-space-xl);
  height: 3.5rem;
  gap: var(--uh-space-lg);
  border-bottom: 1px solid var(--uh-border);
}

.uh-rs-back {
  color: var(--uh-nav-text);
  text-decoration: none;
  font-size: var(--uh-text-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--uh-space-xs);
  opacity: 0.85;
  border-bottom: none;
  transition: opacity var(--uh-transition);
}

.uh-rs-back:hover {
  opacity: 1;
  border-bottom: none;
}

.uh-rs-back:focus-visible {
  outline: 2px solid var(--uh-accent);
  outline-offset: 2px;
  border-radius: var(--uh-radius-sm);
  opacity: 1;
}

.uh-resume-nav__download {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

/* Resume page body wrapper */
.uh-rs-body {
  background: var(--uh-surface);
  min-height: calc(100vh - 3.5rem);
  padding: var(--uh-space-2xl) var(--uh-space-xl);
}

/* The sheet card */
.uh-rs-sheet {
  max-width: 780px;
  margin: 0 auto;
  background: var(--uh-bg);
  border-radius: var(--uh-radius-md);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  padding: var(--uh-space-2xl);
  color: var(--uh-text-primary);
}

/* Resume header. The accent tick above the name is a CSS-only border (replaces
   the old SVG emblem, which corrupted ATS resume parsing). No markup, so resume
   parsers ignore it entirely. */
.uh-rs-head {
  margin-bottom: var(--uh-space-xl);
  border-top: 3px solid var(--uh-accent-text);
  padding-top: var(--uh-space-md);
}

.uh-rs-name {
  font-size: clamp(1.75rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--uh-text-primary);
  margin-bottom: 0.35rem;
  opacity: 1;
  visibility: visible;
}

.uh-rs-role {
  font-size: var(--uh-text-lg);
  color: var(--uh-accent-text);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.uh-rs-locked {
  font-style: italic;
  color: var(--uh-text-muted);
}

.uh-rs-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.9rem;
  font-size: var(--uh-text-sm);
  color: var(--uh-text-secondary);
  margin-bottom: 0;
}

.uh-rs-contact > * + *::before {
  content: '\00B7';
  margin-right: 0.9rem;
  color: var(--uh-text-muted);
}

.uh-rs-contact a {
  color: var(--uh-text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--uh-transition), color var(--uh-transition);
}

.uh-rs-contact a:hover {
  color: var(--uh-accent);
  border-bottom-color: var(--uh-accent);
}

.uh-rs-contact a:focus-visible {
  outline: 2px solid var(--uh-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Accent rule below header */
.uh-rs-rule {
  border: none;
  border-top: 2px solid var(--uh-accent-text);
  margin-top: var(--uh-space-lg);
}

/* Sections */
.uh-rs-sec {
  margin-bottom: var(--uh-space-xl);
}

.uh-rs-sec h2 {
  font-size: var(--uh-text-xl);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--uh-text-primary);
  margin-bottom: var(--uh-space-md);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--uh-border);
  opacity: 1;
  visibility: visible;
}

.uh-rs-summary {
  font-size: var(--uh-text-base);
  color: var(--uh-text-secondary);
  line-height: 1.75;
}

/* Job entries */
.uh-rs-job {
  margin-bottom: var(--uh-space-lg);
  padding-bottom: var(--uh-space-md);
  border-bottom: 1px solid var(--uh-border);
}

.uh-rs-job:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Job top row: title left, dates right - like Mateo Ferraro */
.uh-rs-job-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--uh-space-md);
  margin-bottom: 0.2rem;
}

.uh-rs-job-top h3 {
  font-size: var(--uh-text-base);
  font-weight: 700;
  color: var(--uh-text-primary);
  margin: 0;
  line-height: 1.3;
  opacity: 1;
  visibility: visible;
}

.uh-rs-when {
  font-size: var(--uh-text-sm);
  color: var(--uh-text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Org line: company carries the accent (legible on light sheets) */
.uh-rs-org {
  font-size: var(--uh-text-sm);
  color: var(--uh-accent-text);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Education / certifications lines */
.uh-rs-edu {
  font-size: var(--uh-text-sm);
  color: var(--uh-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

/* Bullet list for job descriptions */
.uh-rs-bullets {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.4rem 0 0 0;
}

.uh-rs-bullets li {
  font-size: var(--uh-text-sm);
  color: var(--uh-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.uh-rs-bullets li:last-child {
  margin-bottom: 0;
}

/* Two-column grid for Strengths + Education */
.uh-rs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--uh-space-xl);
  margin-bottom: var(--uh-space-xl);
}

/* Strength chips */
.uh-rs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.uh-rs-tag {
  display: inline-block;
  background: var(--uh-surface-2);
  border: 1px solid color-mix(in srgb, var(--uh-text-secondary) 22%, transparent);
  border-radius: var(--uh-radius-pill);
  padding: 0.25rem 0.8rem;
  font-size: var(--uh-text-sm);
  color: var(--uh-text-secondary);
}

/* Resume preview invite line */
.uh-resume-preview-invite {
  font-size: var(--uh-text-sm);
  color: var(--uh-text-muted);
  padding-top: var(--uh-space-lg);
  border-top: 1px solid var(--uh-border);
  line-height: 1.6;
}

/* Resume footer */
.uh-footer--resume {
  max-width: 780px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Print styles for resume
   -------------------------------------------------------------------------- */

@media print {
  @page {
    size: Letter;
    margin: 0.5in;
  }

  .uh-rs-bar,
  .uh-ribbon,
  .uh-watermark,
  .uh-footer--resume {
    display: none !important;
  }

  /* Force a light, high-contrast sheet regardless of theme (dark themes like
     theme-kitchen / theme-bar would otherwise print near-black on near-black
     and be unreadable). Fixed pt sizing replaces the screen clamp/rem scale. */
  .uh-rs-body {
    background: #fff !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  .uh-rs-sheet {
    background: #fff !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    /* Condensed display faces (e.g. Barlow Condensed) are hard to read in body
       copy at print sizes; fall back to a readable serif. */
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
  }

  .uh-rs-sheet,
  .uh-rs-sheet * {
    color: #000 !important;
    background: transparent !important;
  }

  a {
    color: #000 !important;
    text-decoration: none;
    border-bottom: none !important;
  }

  .uh-rs-name {
    font-size: 21pt !important;
    line-height: 1.1 !important;
  }

  .uh-rs-role {
    font-size: 12pt !important;
  }

  .uh-rs-sec h2 {
    font-size: 13pt !important;
  }

  .uh-rs-summary,
  .uh-rs-bullets li,
  .uh-rs-edu,
  .uh-rs-tag,
  .uh-rs-org,
  .uh-rs-contact {
    font-size: 10.5pt !important;
  }

  /* Rules and chip borders need a visible ink color once everything is black. */
  .uh-rs-rule,
  .uh-rs-sec h2,
  .uh-rs-job {
    border-color: #000 !important;
  }

  .uh-rs-tag {
    border: 1px solid #888 !important;
    background: transparent !important;
  }

  .uh-rs-job,
  .uh-rs-sec {
    break-inside: avoid;
  }

  /* Keep a section heading with its first line of content. */
  .uh-rs-sec h2 {
    break-after: avoid;
    break-inside: avoid;
  }
}

/* ==========================================================================
   RESPONSIVE  -  mobile (390px viewport, no horizontal overflow)
   ========================================================================== */

@media (max-width: 600px) {
  :root {
    --uh-space-xl:  1.5rem;
    --uh-space-2xl: 2.25rem;
    /* Collapse the generous desktop section rhythm so mobile stays tight. */
    --uh-space-3xl: 2.75rem;
    --uh-space-4xl: 3.5rem;
  }

  /* Two-row sticky nav: brand + Resume on row 1, section links on row 2.
     Keeps every destination reachable by thumb (no hidden hamburger). */
  .uh-nav {
    flex-wrap: wrap;
    height: auto;
    min-height: 3.25rem;
    align-items: center;
    padding: 0.5rem var(--uh-space-md);
    column-gap: var(--uh-space-md);
    row-gap: 0.4rem;
  }

  .uh-nav__brand {
    order: 1;
    font-size: var(--uh-text-base);
    max-width: 60vw;
  }

  .uh-nav__cta {
    order: 2;
    margin-left: auto;
    padding: 0.45rem 1.05rem;
  }

  .uh-nav__links {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: var(--uh-space-lg);
  }

  .uh-nav__link:not(.uh-nav__link--cta) {
    display: inline-block;
    opacity: 0.85;
  }

  .uh-hero {
    min-height: 45vh;
    padding: var(--uh-space-xl) var(--uh-space-md);
  }

  .uh-hero__name {
    font-size: clamp(1.75rem, 9vw, 3rem);
  }

  .uh-section {
    padding: var(--uh-space-xl) var(--uh-space-md);
  }

  .uh-section__title {
    font-size: var(--uh-text-2xl);
  }

  .uh-timeline__list {
    padding-left: 1.25rem;
  }

  .uh-contact__form {
    max-width: 100%;
  }

  .uh-preview-invite {
    padding: var(--uh-space-lg) var(--uh-space-md);
  }

  /* Resume: bar */
  .uh-rs-bar {
    padding: 0.6rem var(--uh-space-md);
    flex-wrap: wrap;
    height: auto;
    gap: var(--uh-space-sm);
    position: sticky;
  }

  .uh-rs-body {
    padding: var(--uh-space-xl) var(--uh-space-md);
  }

  .uh-rs-sheet {
    padding: var(--uh-space-xl) var(--uh-space-md);
    border-radius: var(--uh-radius-sm);
  }

  .uh-rs-name {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .uh-rs-grid {
    grid-template-columns: 1fr;
    gap: var(--uh-space-lg);
  }

  .uh-rs-job-top {
    flex-direction: column;
    gap: 0.1rem;
  }

  .uh-ribbon {
    flex-direction: column;
    gap: var(--uh-space-sm);
    padding: var(--uh-space-sm) var(--uh-space-md);
    font-size: 0.8rem;
  }

  [data-preview="true"] .uh-nav,
  [data-preview="true"] .uh-rs-bar {
    top: 5.5rem;
  }

  [data-preview="true"] .uh-hero,
  [data-preview="true"] .uh-rs-body {
    padding-top: 5.5rem;
  }
}

@media (max-width: 390px) {
  .uh-nav__brand {
    max-width: 12rem;
  }

  .uh-rs-contact {
    flex-direction: column;
    gap: 0.25rem;
  }

  .uh-rs-contact > * + *::before {
    content: none;
  }
}

/* ==========================================================================
   SEEDED PER-PERSON VARIANTS
   Selected deterministically per person in generate.js and emitted as
   data-hero / data-layout / data-motif on <html>. These keep every base theme
   intact and only shift hero composition, timeline rhythm, and motif presence
   so two people in the same vertical do not get a byte-identical layout.
   ========================================================================== */

/* --- Hero variant: left-rail (left-aligned, narrower measure) --- */
[data-hero="left-rail"] .uh-hero__inner {
  max-width: 760px;
  margin-left: max(var(--uh-space-xl), calc((100% - 860px) / 2));
  margin-right: auto;
  text-align: left;
}
[data-hero="left-rail"] .uh-hero {
  min-height: 50vh;
}
[data-hero="left-rail"] .uh-hero__motif {
  margin-bottom: var(--uh-space-md);
}
[data-hero="left-rail"] .uh-hero__tagline {
  max-width: 34ch;
}

/* --- Hero variant: stacked (centered, larger motif, tighter stack) --- */
[data-hero="stacked"] .uh-hero {
  min-height: 60vh;
  text-align: center;
}
[data-hero="stacked"] .uh-hero__inner {
  max-width: 720px;
  text-align: center;
}
[data-hero="stacked"] .uh-hero__motif {
  margin-bottom: var(--uh-space-sm);
}
[data-hero="stacked"] .uh-hero__motif .uh-motif-svg {
  width: 84px;
  height: 84px;
}
[data-hero="stacked"] .uh-hero__tagline {
  margin-left: auto;
  margin-right: auto;
  max-width: 28ch;
}

/* Centered is the base; this just re-asserts it explicitly for clarity. */
[data-hero="centered"] .uh-hero__inner {
  text-align: left;
}

/* --- Layout variant: alt (centered section titles, alternating timeline) --- */
[data-layout="alt"] .uh-section__title {
  text-align: center;
}
[data-layout="alt"] .uh-skills__grid {
  justify-items: center;
}
/* Alternating timeline: even items shift to a right-rail rhythm on wider screens. */
@media (min-width: 760px) {
  [data-layout="alt"] .uh-timeline__list {
    padding-left: 0;
    padding-right: 1.75rem;
  }
  [data-layout="alt"] .uh-timeline__list::before {
    left: auto;
    right: 0.55rem;
  }
  [data-layout="alt"] .uh-timeline__item {
    padding: 0 var(--uh-space-md) var(--uh-space-xl) 0;
    text-align: right;
  }
  [data-layout="alt"] .uh-timeline__marker {
    left: auto;
    right: -1.175rem;
  }
  [data-layout="alt"] .uh-timeline__item--current .uh-timeline__marker {
    right: -1.25rem;
    left: auto;
  }
  [data-layout="alt"] .uh-timeline__meta {
    justify-content: flex-end;
  }
}

/* --- Motif variant: b (larger, rotated, repositioned signature mark) --- */
[data-motif="b"] .uh-hero__motif {
  transform: rotate(-8deg);
  transform-origin: left center;
}
[data-motif="b"] .uh-hero__motif .uh-motif-svg {
  width: 76px;
  height: 76px;
  opacity: 0.9;
}
[data-hero="left-rail"][data-motif="b"] .uh-hero__motif {
  transform: rotate(6deg);
}
