/* ════════════════════════════════════════════════════════════════
   chuck.lgbt - design system
   Layout rules mirror the Salüd marketing site and heyaapl.com
   (fixed scroll-collapsing header, hero grid, cards-grid, sectioning,
   fade-in scroll animations) with Chuck's own identity: a confident
   violet over a theme-aware surface that follows the visitor's OS
   color-scheme (light default, dark when preferred), plus a signature
   pride-gradient accent strip — it is chuck.lgbt, after all.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand (theme-independent) ───────────────────────── */
  --ck-violet: #7C3AED;         /* primary brand accent */
  --ck-violet-bright: #A78BFA;  /* glow / hover / on-dark text */
  --ck-violet-deep: #5B21B6;    /* borders, depth */
  --ck-pink: #EC4899;           /* secondary accent */
  --pride: linear-gradient(90deg, #E40303 0%, #FF8C00 20%, #FFC800 40%, #008026 60%, #24408E 80%, #732982 100%);

  /* ── Platform / partner colors ───────────────────────── */
  --c-linkedin: #0A66C2;
  --c-salud: #3FB349;
  --c-cellarbot: #8E2A44;
  --c-heyaapl: #3FB349;
  --c-twitch: #9146FF;

  /* ── LIGHT THEME (default) ───────────────────────────── */
  --bg: #F5F3FA;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #F7F5FC;
  --text: #1D1830;
  --text-dim: rgba(29, 24, 48, 0.66);
  --text-faint: rgba(29, 24, 48, 0.45);
  --border: rgba(40, 28, 76, 0.10);
  --border-strong: rgba(40, 28, 76, 0.16);
  --header-bg: rgba(255, 255, 255, 0.82);
  --card-shadow: 0 12px 32px rgba(40, 28, 76, 0.10);

  /* Hero is always a dramatic dark gradient in both themes. */
  --hero-from: #171034;
  --hero-mid: #1E1545;
  --hero-to: #0B0820;
}

/* ── DARK THEME: follows the visitor's OS color-scheme preference. ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0C16;
    --bg-alt: #121020;
    --surface: #181428;
    --surface-2: #1E1932;
    --text: #ECE9F4;
    --text-dim: rgba(236, 233, 244, 0.66);
    --text-faint: rgba(236, 233, 244, 0.42);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --header-bg: rgba(14, 12, 22, 0.82);
    --card-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Clip rather than hide so position:fixed/sticky descendants still
     anchor to the viewport (matches the Salüd approach). */
  overflow-x: clip;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: 880px;
}

/* ─── HEADER ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
}

/* Signature chuck.lgbt touch: a slim pride strip riding the top edge. */
.site-header::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--pride);
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  border-bottom-color: var(--border);
}

/* 3-zone grid header (left | center | right). Top-of-page shows the
   full wordmark on the left; on scroll it collapses and the round
   icon fades in at center, same choreography as the Salüd header. */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  transition: padding 0.35s;
}

.site-header.scrolled .header-inner {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* ── LEFT ZONE ── */
.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-self: start;
  min-width: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  transition: max-width 0.35s ease, opacity 0.35s ease;
}

.header-logo .logo-mark {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  transition: transform 0.35s;
}

.header-logo .logo-word {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.header-logo .logo-word span {
  color: var(--ck-violet);
}

.site-header.scrolled .header-logo {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.nav-anchor { display: none; }
.site-header.scrolled .nav-anchor { display: block; }

/* ── CENTER ZONE (icon, revealed on scroll) ── */
.header-center {
  justify-self: center;
  display: flex;
  align-items: center;
}

.logo-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.85);
  transition: opacity 0.35s, transform 0.35s;
}

.logo-icon-wrap img {
  height: 36px;
  width: 36px;
  border-radius: 50%;
}

.site-header.scrolled .logo-icon-wrap {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ── RIGHT ZONE ── */
.nav-pages { justify-self: end; }

.site-header.scrolled .nav-pages .anchor-fallback { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a:not(.btn) {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-links a:not(.btn):hover,
.nav-links a.is-current {
  color: var(--ck-violet);
}

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--ck-violet);
  color: #fff;
}
.btn-primary:hover {
  background: var(--ck-violet-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--ck-violet);
  color: var(--ck-violet);
  transform: translateY(-2px);
}

/* Light buttons used on the dark hero */
.btn-on-dark {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-on-dark:hover {
  border-color: var(--ck-violet-bright);
  color: var(--ck-violet-bright);
}

.btn-linkedin { background: var(--c-linkedin); color: #fff; }
.btn-linkedin:hover { background: #084d92; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10, 102, 194, 0.4); }

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── MOBILE NAV ───────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
}
.mobile-nav a:hover { color: var(--ck-violet); }

/* ─── HERO ─────────────────────────────────────────────── */
.hero {
  padding: 9.5rem 1.5rem 5rem;
  background: linear-gradient(150deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Ambient violet glow orbs (mirrors Salüd's radial ::before/::after) */
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -35%;
  left: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.85fr);
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-grid > * { min-width: 0; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ck-violet-bright);
  margin-bottom: 1.1rem;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ck-violet-bright);
  box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  color: #fff;
  margin-bottom: 1.25rem;
  line-height: 1.05;
}
.hero h1 .accent { color: var(--ck-violet-bright); }

.hero-lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* ── Hero visual: the "profile card" ── */
.hero-card-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.profile-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 1.4rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  z-index: 1;
}

.profile-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.profile-card-head img {
  width: 42px; height: 42px; border-radius: 11px;
}
.profile-card-head .meta { flex: 1; min-width: 0; }
.profile-card-head .meta b {
  display: block;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
}
.profile-card-head .meta small {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
}
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: var(--ck-violet-bright);
}
.open-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ck-violet-bright);
  box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7);
  animation: pulse 1.8s infinite;
}

/* The monogram stage */
.mark-stage {
  position: relative;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(139, 92, 246, 0.20) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.18));
  padding: 1rem 0 0.5rem;
  overflow: hidden;
}
/* Square box so the sparkle overlay (positioned in percentages) maps
   consistently onto the centered mark. */
.logo-anim {
  position: relative;
  width: 215px;
  max-width: 68%;
  aspect-ratio: 1;
  margin: 0.5rem auto 0.75rem;
}
.logo-anim .brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22%;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
  animation: float 6s ease-in-out infinite;
}

.profile-card-foot {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.now-doing {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  min-width: 0;
}
.now-doing .label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.15rem;
}
.now-doing .thing {
  color: var(--ck-violet-bright);
  font-weight: 700;
  transition: opacity 0.4s;
  white-space: nowrap;
}
.foot-platforms { display: flex; gap: 0.55rem; }
.foot-platforms a {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.foot-platforms a:hover { transform: translateY(-2px); }
.foot-platforms svg { width: 16px; height: 16px; }

/* Floating chips around the card */
.float-chip {
  position: absolute;
  z-index: 6;                 /* float above the profile card, never behind it */
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: float 5s ease-in-out infinite;
}
.float-chip .emoji { font-size: 1rem; }
.float-chip.chip-1 { top: 6%; left: -7%; animation-delay: 0s; }
.float-chip.chip-2 { top: 44%; right: -9%; animation-delay: 1.2s; }
.float-chip.chip-3 { bottom: 8%; left: -7%; animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(167, 139, 250, 0); }
  100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); }
}

/* ── Sparkle overlay (rises around the mark) ── */
.b-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  bottom: 18%;
  width: 6px;
  height: 6px;
  opacity: 0;
  animation: rise 3.4s ease-in infinite;
  pointer-events: none;
}
.b-dot.b1 { left: 8%;  width: 6px; height: 6px; animation-delay: 0s;    animation-duration: 3.4s; }
.b-dot.b2 { left: 94%; width: 4px; height: 4px; animation-delay: 0.8s;  animation-duration: 4.1s; }
.b-dot.b3 { left: -4%; width: 7px; height: 7px; animation-delay: 1.6s;  animation-duration: 3s;   }
.b-dot.b4 { left: 102%; width: 4px; height: 4px; animation-delay: 2.2s; animation-duration: 3.7s; }
.b-dot.b5 { left: 3%;  width: 5px; height: 5px; animation-delay: 1.1s;  animation-duration: 4.4s; }
@keyframes rise {
  0%   { transform: translateY(0);     opacity: 0; }
  15%  { opacity: 0.9; }
  100% { transform: translateY(-56px); opacity: 0; }
}

/* ─── DESCRIPTOR MARQUEE ───────────────────────────────── */
.marquee {
  background: var(--ck-violet);
  overflow: hidden;
  position: relative;
}
.marquee::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--pride);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: scroll-x 28s linear infinite;
  font-size: 0;
  padding: 0.95rem 0 0.85rem;
}
.marquee-track .item {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  margin-right: 2.5rem;
}
.marquee-track .item::before {
  content: '✦';
  margin-right: 2.5rem;
  color: rgba(255, 255, 255, 0.5);
}
@keyframes scroll-x {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── GENERIC SECTIONS ─────────────────────────────────── */
.section { padding: 5.5rem 1.5rem; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 3.5rem;
}
.section-header h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--text-dim);
  font-size: 1.08rem;
}
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ck-violet);
  margin-bottom: 0.85rem;
}

/* ─── ABOUT ────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

/* Stats panel stands in for the classic about photo — swap in a
   headshot later by replacing .about-stats with .about-photo. */
.about-stats {
  position: relative;
  border-radius: 24px;
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
}
.about-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.25rem;
  background: var(--surface);
}
.about-stats .stat:nth-child(odd) { background: var(--surface-2); }
.about-stats .stat b {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ck-violet);
  line-height: 1.1;
}
.about-stats .stat span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  max-width: 170px;
}
.about-stats::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 24px;
  pointer-events: none;
}
.about-stats .photo-tag {
  position: absolute;
  bottom: 0.9rem; left: 0.9rem;
  background: var(--ck-violet);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
}

.about-content h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 1.4rem;
}
.about-content p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 1.15rem;
  line-height: 1.75;
}
.about-content strong { color: var(--text); font-weight: 700; }

.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.fact .emoji { font-size: 1rem; }

/* ─── EXPERIENCE TIMELINE ──────────────────────────────── */
.xp-list {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.xp-item {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.xp-item:last-child { margin-bottom: 0; }
/* Each item draws its own segment of the timeline; the joints hide
   behind the next item's chip. */
.xp-item::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 20px;
  bottom: -1.75rem;
  width: 2px;
  background: var(--border-strong);
}
/* The last item trails off into the past: dashed and fading out. */
.xp-item:last-child::before {
  top: 84px;
  bottom: auto;
  height: 150px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-strong) 0 6px,
    transparent 6px 13px
  );
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.xp-chip {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  /* Always white so dark company marks stay legible in dark mode. */
  background: #fff;
  border: 1px solid var(--border-strong);
  box-shadow: var(--card-shadow);
}
.xp-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* The Salüd mark is white-on-transparent, so its tiles stay dark. */
.xp-chip.salud { background: #0d1f14; }
.xp-item.current .xp-chip {
  border-color: var(--ck-violet);
  box-shadow: 0 0 0 2px var(--ck-violet), var(--card-shadow);
}
.xp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem 2rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, border-color 0.3s;
}
.xp-card:hover {
  transform: translateY(-4px);
  border-color: var(--ck-violet);
}
.xp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.35rem;
}
.xp-head h3 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.xp-head .span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-faint);
  white-space: nowrap;
}
.xp-sub {
  font-size: 0.88rem;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.xp-role { margin-bottom: 1.1rem; }
.xp-role:last-child { margin-bottom: 0; }
.xp-role .role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  margin-bottom: 0.4rem;
}
.xp-role .role-head b {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ck-violet);
}
.xp-role .role-head .dates {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
}
.xp-role ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.xp-role ul li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}
.xp-role ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ck-violet);
  opacity: 0.6;
}

/* ─── CERTS & TOOLBOX ──────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  max-width: 980px;
  margin: 0 auto;
}
.cert-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s, border-color 0.25s;
}
.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--ck-violet);
}
.cert-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.12);
  color: var(--ck-violet);
}
.cert-icon svg { width: 24px; height: 24px; }
.cert-card b {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}
.cert-card small {
  color: var(--text-faint);
  font-size: 0.8rem;
  font-weight: 600;
}

.play-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
  justify-content: center;
}
.play-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.play-chip .emoji { margin-right: 0.4rem; }

/* ─── QUOTE ────────────────────────────────────────────── */
.quote-wrap {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding-top: 2.25rem;
}
.quote-wrap::before {
  content: '“';
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5.5rem;
  line-height: 1;
  font-weight: 800;
  color: var(--ck-violet);
  opacity: 0.35;
  pointer-events: none;
}
.quote-wrap blockquote {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text);
}
.quote-wrap cite {
  display: block;
  margin-top: 1.4rem;
  font-style: normal;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ck-violet);
}
.quote-wrap cite small {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-faint);
  font-weight: 600;
}

/* ─── SALÜD SPOTLIGHT ──────────────────────────────────── */
.salud-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}
.salud-feature.reverse .salud-demo { order: 2; }
.salud-feature.reverse .salud-copy { order: 1; }
.salud-copy h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin-bottom: 1rem;
}
.salud-copy p {
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.salud-copy strong { color: var(--text); font-weight: 700; }
.salud-copy .project-tags { margin-bottom: 0; }

/* Demo iframes render at a native --anim-w × --anim-h pixel viewport
   (set inline per-iframe) and are scaled to fit the container via CSS
   transform (wired up in js/main.js) — same mechanism as gosalud.io. */
.salud-demo {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: var(--anim-w) / var(--anim-h);
  overflow: hidden;
  border-radius: 20px;
  background: #0d1423;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  line-height: 0;
}
.demo-anim {
  width: calc(var(--anim-w) * 1px);
  height: calc(var(--anim-h) * 1px);
  border: 0;
  display: block;
  transform-origin: top left;
  transform: scale(var(--anim-scale, 1));
}

.salud-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.salud-cta small {
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ─── PROJECTS ─────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--ck-violet);
}
.project-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.project-logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.project-head .pmeta b {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.project-head .pmeta .role {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ck-violet);
}
.project-card > p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.project-tags span {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  color: var(--ck-violet);
  align-self: flex-start;
}
.project-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
.project-card:hover .project-link svg { transform: translate(2px, -2px); }

/* ─── CONNECT / SOCIALS ────────────────────────────────── */
.connect {
  background: linear-gradient(150deg, var(--hero-from) 0%, var(--hero-mid) 60%, var(--hero-to) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.connect::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.20) 0%, transparent 70%);
  pointer-events: none;
}
.connect .section-header h2 { color: #fff; }
.connect .section-header p { color: rgba(255,255,255,0.72); }
.connect .section-label { color: var(--ck-violet-bright); }

.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.connect-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}
.connect-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.09);
}
.connect-card .s-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  overflow: hidden;
}
.connect-card .s-icon svg { width: 24px; height: 24px; }
.connect-card .s-icon img { width: 100%; height: 100%; object-fit: cover; }
.connect-card .s-text b {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.connect-card .s-text small {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
}
.connect-card.linkedin .s-icon { background: var(--c-linkedin); }
.connect-card.salud .s-icon { background: #0d1f14; }
.connect-card.salud .s-icon img { object-fit: contain; padding: 7px; }
.connect-card.linkedin:hover { border-color: var(--c-linkedin); }
.connect-card.salud:hover { border-color: var(--c-salud); }
.connect-card.cellarbot:hover { border-color: #c04a6b; }
.connect-card.heyaapl:hover { border-color: var(--c-heyaapl); }

/* ─── FOOTER ───────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  color: var(--text-dim);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 3px;
  background: var(--pride);
  opacity: 0.85;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand img { height: 38px; width: 38px; border-radius: 50%; }
.footer-brand b { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.footer-brand b span { color: var(--ck-violet); }
.footer-badges { display: flex; gap: 0.6rem; }
.footer-badges a {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: transform 0.2s, color 0.2s, border-color 0.2s;
}
.footer-badges a:hover { transform: translateY(-2px); color: var(--ck-violet); border-color: var(--ck-violet); }
.footer-badges svg { width: 17px; height: 17px; }
.footer-copyright {
  width: 100%;
  text-align: center;
  padding-top: 1.75rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}
.footer-copyright .sep { margin: 0 0.5rem; opacity: 0.5; }

/* ─── SCROLL ANIMATIONS ────────────────────────────────── */
.fade-in, .fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible, .fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Stack the hero and reorder so the visual sits between the title and
     the paragraph. display:contents dissolves .hero-content so its
     children become orderable flex items of .hero-grid. */
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.9rem;
    text-align: center;
  }
  .hero-content { display: contents; }
  .hero-eyebrow { order: 1; justify-content: center; margin-bottom: 0; }
  .hero h1 { order: 2; margin-bottom: 0; }
  .hero-card-wrap { order: 3; width: 100%; }
  .hero-lead { order: 4; margin: 0 auto; }
  .hero-cta { order: 5; justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-stats { max-width: 420px; margin: 0 auto; order: -1; width: 100%; }
  .salud-feature { grid-template-columns: 1fr; gap: 1.75rem; margin-bottom: 3.25rem; }
  .salud-feature.reverse .salud-demo { order: 0; }
  .salud-feature.reverse .salud-copy { order: 1; }
}

@media (max-width: 768px) {
  .nav-anchor,
  .site-header.scrolled .nav-anchor,
  .nav-pages { display: none; }
  .header-actions-desktop { display: none; }
  .hamburger { display: flex; justify-self: end; }
  .header-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-self: end;
  }
  .hero { padding: 8rem 1.25rem 4rem; }
  .section { padding: 4rem 1.25rem; }
  .float-chip { display: none; }
  .profile-card { max-width: 340px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .xp-item::before { display: none; }
  .xp-item { grid-template-columns: 1fr; gap: 0.75rem; }
  .xp-chip { width: 52px; height: 52px; border-radius: 13px; padding: 8px; }
  .xp-card { padding: 1.4rem 1.5rem; }
}

@media (min-width: 769px) {
  .header-mobile-actions { display: none; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .connect-grid { grid-template-columns: 1fr; }
  .profile-card-head { flex-wrap: wrap; }
  .profile-card-head .meta small { white-space: nowrap; }
  .about-stats { aspect-ratio: auto; }
  .about-stats .stat { padding: 1.5rem 1rem; }
  .about-stats .photo-tag { display: none; }
}

/* ─── REDUCED MOTION ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in, .fade-in-up { opacity: 1; transform: none; }
}
