/* ==========================================================================
   Emmanuel Pacheco — personal site
   Accent: Cube orange. Rubik colors appear only as small accents.
   ========================================================================== */

:root {
  --ink: #0F1115;
  --ink-2: #171A21;
  --ink-3: #232733;
  --paper: #FFFFFF;
  --paper-tint: #F6F6F3;
  --text: #1B1E25;
  --muted: #5B6170;
  --muted-light: #A9AFBC;
  --line: #E6E6E1;

  --accent: #FF5A1F;          /* Cube orange — buttons, highlights on dark */
  --accent-strong: #B93E0B;   /* Accessible orange for text on light backgrounds */

  --cube-white: #F4F4F4;
  --cube-yellow: #FFD500;
  --cube-red: #C41E3A;
  --cube-orange: #FF5800;
  --cube-blue: #0051BA;
  --cube-green: #009E60;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Archivo", "Inter", system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(15, 17, 21, .04), 0 12px 32px -12px rgba(15, 17, 21, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 59px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.container--narrow { width: min(880px, 100% - 2.5rem); }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--accent); color: var(--ink); padding: .75rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Placeholder markers — remove data-placeholders="on" from <html> to hide */
[data-placeholders="on"] .ph {
  text-decoration: underline dashed rgba(255, 90, 31, .75);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
[data-placeholders="on"] :is(p, blockquote, h3, li).ph {
  text-decoration: none;
  outline: 1.5px dashed rgba(255, 90, 31, .6);
  outline-offset: 6px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: transparent; --fg: currentColor; --bd: currentColor;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: .98rem; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, color .25s, box-shadow .25s, border-color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { --bg: var(--accent); --fg: var(--ink); --bd: var(--accent); }
.btn--primary:hover { box-shadow: 0 10px 28px -8px rgba(255, 90, 31, .6); background: #FF6D38; }
.btn--ghost { --fg: #fff; --bd: rgba(255, 255, 255, .45); }
.btn--ghost:hover { --bd: #fff; background: rgba(255, 255, 255, .08); }
.btn--dark { --bg: var(--ink); --fg: #fff; --bd: var(--ink); }
.btn--dark:hover { background: var(--ink-3); }
.btn--sm { padding: .6rem 1.05rem; font-size: .9rem; }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--accent); }
.section__title { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; margin-bottom: 1.1rem; color: var(--ink); }
.section__title em { font-style: normal; color: var(--accent-strong); }
.section__title--light { color: #fff; }
.section__lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 640px; }
.center .section__lead { margin-inline: auto; }
.section__lead--light { color: var(--muted-light); }
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section { padding-block: clamp(5rem, 11vw, 9rem); }
.section--tint { background: var(--paper-tint); }
.section--dark { background: var(--ink); color: #E8EAEE; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  color: #fff;
  transition: height .35s var(--ease), background-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.nav.is-scrolled {
  --nav-h: 60px;
  background: rgba(15, 17, 21, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; }
.nav__brand {
  display: inline-flex; align-items: center; gap: .65rem;
  text-decoration: none; font-size: 1.02rem; letter-spacing: -.01em; margin-right: auto;
}
.nav__brand strong { font-weight: 700; }
.brand-cube { display: grid; grid-template-columns: repeat(2, 8px); gap: 2px; }
.brand-cube i { width: 8px; height: 8px; border-radius: 2px; }
.brand-cube i:nth-child(1) { background: var(--accent); }
.brand-cube i:nth-child(2) { background: var(--cube-yellow); }
.brand-cube i:nth-child(3) { background: var(--cube-blue); }
.brand-cube i:nth-child(4) { background: var(--cube-green); }

.nav__links { display: flex; gap: .2rem; align-items: center; }
.nav__links a:not(.btn) {
  position: relative; display: block;
  padding: .5rem .7rem; font-size: .9rem; font-weight: 500;
  text-decoration: none; color: rgba(255, 255, 255, .78);
  transition: color .2s;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: #fff; }
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__mobile-cta { display: none; }
.nav__toggle { display: none; }

@media (max-width: 1200px) {
  .nav__cta { display: none; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; background: none; border: 0; cursor: pointer;
  }
  .nav__toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: .3rem;
    background: var(--ink);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links a:not(.btn) { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; padding: .45rem 1rem; }
  .nav__links a:not(.btn)::after { bottom: 0; }
  .nav__mobile-cta { display: block; margin-top: 1.5rem; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 3rem);
  background: var(--ink); color: #fff; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%;
  transform: scale(1.06); animation: heroZoom 18s var(--ease) forwards;
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 17, 21, .7) 0%, rgba(15, 17, 21, .35) 35%, rgba(15, 17, 21, .85) 72%, #0F1115 100%),
    linear-gradient(90deg, rgba(15, 17, 21, .85) 0%, rgba(15, 17, 21, .1) 70%);
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero__content { padding-bottom: clamp(2rem, 4vw, 3rem); }
.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 5.4rem);
  font-weight: 800; font-stretch: 125%; letter-spacing: -0.035em; line-height: .98;
  max-width: 14ch; margin-bottom: 1.5rem;
}
.hero__title span { color: var(--accent); }
.hero__sub { font-size: clamp(1.08rem, 1.8vw, 1.35rem); color: #D3D6DD; max-width: 560px; margin-bottom: 2.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.stat { padding: 1.6rem 1.25rem 0 0; position: relative; }
.stat + .stat { padding-left: 1.5rem; border-left: 1px solid rgba(255, 255, 255, .12); }
.stat::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 34px; height: 2px; background: var(--c, var(--accent));
}
.stat + .stat::before { left: 1.5rem; }
.stat:nth-child(1) { --c: var(--accent); }
.stat:nth-child(2) { --c: var(--cube-yellow); }
.stat:nth-child(3) { --c: var(--cube-green); }
.stat:nth-child(4) { --c: var(--cube-blue); }
.stat__num {
  display: block; font-family: var(--font-display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.stat__label { display: block; font-size: .88rem; color: var(--muted-light); margin-top: .2rem; }

.hero__scroll {
  position: absolute; right: clamp(1.25rem, 3vw, 2.5rem); bottom: 2.5rem;
  width: 26px; height: 42px; border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: #fff; border-radius: 2px; animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(3)::before { left: 0; }
  .stat { padding-bottom: 1.2rem; }
  .hero__scroll { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ---------- Cube color divider ---------- */
.cube-divider { display: flex; justify-content: center; gap: 6px; margin: 2.75rem 0; }
.cube-divider i { width: 9px; height: 9px; border-radius: 2px; }
.cube-divider i:nth-child(1) { background: var(--cube-white); box-shadow: inset 0 0 0 1px #d5d5d0; }
.cube-divider i:nth-child(2) { background: var(--cube-yellow); }
.cube-divider i:nth-child(3) { background: var(--cube-orange); }
.cube-divider i:nth-child(4) { background: var(--cube-red); }
.cube-divider i:nth-child(5) { background: var(--cube-green); }
.cube-divider i:nth-child(6) { background: var(--cube-blue); }

/* ---------- My Why ---------- */
.why__statement {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-stretch: 112%;
  font-size: clamp(1.9rem, 4.6vw, 3.5rem); line-height: 1.14; letter-spacing: -.025em; color: var(--ink);
}
.why__story { display: grid; grid-template-columns: 140px 1fr; gap: 2rem; align-items: center; text-align: left; max-width: 760px; margin-inline: auto; }
.why__story p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.why__photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; object-position: top; box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .why__story { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* ---------- Career: interactive timeline ----------
   --c is the selected stop's chapter color, set by /js/career.js */
.career {
  --cr-bg: #0E0F12; --cr-panel: #121317; --cr-line: #23252B; --cr-road: #1E2026;
  --cr-text: #F4F2EE; --cr-muted: #8A8D95; --cr-radius: 28px;
  --cr-body: "DM Sans", var(--font-body);
  --c: #2F7BFF;
  padding-block: clamp(5rem, 11vw, 9rem);
  background: var(--cr-bg); color: var(--cr-text); font-family: var(--cr-body);
}
.career :is(.career__title, .cd__company, .cd__quote, .road__name, .cl__current) {
  font-family: var(--font-display); font-stretch: 100%;
}
.career__head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.career__eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #FF6A13; margin-bottom: 1.1rem;
}
.career__title { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: 1.1rem; color: var(--cr-text); }
.career__lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--cr-muted); max-width: 640px; margin: 0; }
.career__app { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }

/* 1. Legend */
.cl__top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cr-muted);
  margin-bottom: .4rem;
}
.cl__current {
  font-size: 1rem; font-weight: 800; letter-spacing: 0; text-transform: none; text-align: center;
  color: var(--c); transition: color .3s;
}
.cl__current small { font-family: var(--cr-body); font-weight: 500; font-size: .82rem; margin-left: .45rem; opacity: .85; }
.cl__track { position: relative; height: 44px; display: flex; align-items: center; }
.cl__bar { display: flex; gap: 3px; width: 100%; height: 10px; }
.cl__seg { height: 100%; border-radius: 999px; background: var(--sc); opacity: .35; transition: opacity .3s; }
.cl__seg.is-active { opacity: 1; }
/* Inset so each thumb position sits in the middle of its stop's 1/15 slot */
.cl__range {
  position: absolute; top: 0; height: 44px; margin: 0;
  left: calc(100% / 30 - 14px); width: calc(100% * 14 / 15 + 28px);
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
.cl__range:focus { outline: none; }
.cl__range::-webkit-slider-runnable-track { height: 44px; background: transparent; border: 0; }
.cl__range::-moz-range-track { height: 44px; background: transparent; border: 0; }
.cl__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: 8px; border-radius: 50%;
  background: var(--cr-text); border: 3px solid var(--cr-bg); box-shadow: 0 4px 14px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .15);
  transition: box-shadow .3s;
}
.cl__range::-moz-range-thumb {
  width: 28px; height: 28px; box-sizing: border-box; border-radius: 50%;
  background: var(--cr-text); border: 3px solid var(--cr-bg); box-shadow: 0 4px 14px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .15);
}
.cl__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--cr-bg), 0 0 0 6px var(--c); }
.cl__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--cr-bg), 0 0 0 6px var(--c); }
.cl__labels { display: flex; gap: 3px; margin-top: .25rem; }
.cl__label {
  display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; min-width: 0; min-height: 44px;
  padding: .35rem .2rem 0 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-size: .85rem; font-weight: 500; line-height: 1.25; color: var(--cr-muted); transition: color .3s;
}
.cl__label b { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--sc); }
.cl__label:hover, .cl__label.is-active { color: var(--cr-text); }
@media (max-width: 720px) {
  .cl__label span { display: none; }
  .cl__label { align-items: center; padding-right: 0; }
}

/* 2. Road */
.road { background: var(--cr-panel); border: 1px solid var(--cr-line); border-radius: var(--cr-radius); overflow: hidden; }
.road__scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--cr-line) transparent; }
.road__inner { position: relative; height: 480px; min-width: 1080px; }
.road__svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.road__base { fill: none; stroke: var(--cr-road); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.road__ch { fill: none; stroke-width: 5; stroke-linejoin: round; opacity: .55; transition: stroke-width .3s, opacity .3s; }
.road__ch.is-active { stroke-width: 8; opacity: 1; }
.road__stop {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0;
  display: grid; place-items: center; background: none; border: 0; border-radius: 50%; cursor: pointer;
}
.road__dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--cr-bg); border: 3px solid var(--sc);
  transition: width .3s var(--ease), height .3s var(--ease), background-color .3s, box-shadow .3s;
}
.road__stop:hover .road__dot { background: color-mix(in srgb, var(--sc) 30%, var(--cr-bg)); }
.road__stop.is-active .road__dot {
  width: 30px; height: 30px; background: var(--sc);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--sc) 22%, transparent), 0 0 28px color-mix(in srgb, var(--sc) 55%, transparent);
}
.road__label {
  position: absolute; transform: translateX(-50%); text-align: center; white-space: nowrap;
  line-height: 1.2; color: var(--cr-muted); cursor: pointer; transition: color .3s;
}
.road__label--up { transform: translate(-50%, -100%); }
.road__name { display: block; font-size: 14px; font-weight: 800; }
.road__date { display: block; font-size: 11px; color: var(--cr-muted); margin-top: 2px; }
.road__label.is-chapter { color: var(--cr-text); }
.road__label.is-active { color: var(--sc); }

/* 3. Detail card */
.cd {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  background: var(--cr-panel); border: 1px solid var(--cr-line); border-radius: var(--cr-radius); overflow: hidden;
}
.cd__chapter {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 6px solid var(--c);
  background: color-mix(in srgb, var(--c) 6%, var(--cr-panel));
  transition: border-color .3s, background-color .3s;
}
.cd__kicker { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-bottom: 2rem; transition: color .3s; }
.cd__label { font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cr-muted); margin-bottom: .6rem; }
.cd__quote { margin: 0; font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; color: var(--cr-text); }
.cd__main { display: flex; flex-direction: column; padding: clamp(1.75rem, 3vw, 2.5rem); min-width: 0; }
.cd__body { flex: 1; }
.cd__body.is-entering { animation: cd-in .35s var(--ease); }
@keyframes cd-in { from { opacity: 0; transform: translateY(8px); } }
.cd__heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1.5rem; }
.cd__company { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 900; letter-spacing: -.025em; color: var(--cr-text); }
.cd__dates { font-size: .95rem; font-weight: 700; color: var(--c); transition: color .3s; white-space: nowrap; }
.cd__role { color: var(--cr-muted); font-size: 1.05rem; margin: .55rem 0 1.5rem; }
.cd__points li { position: relative; padding-left: 1.4rem; margin-bottom: .7rem; color: var(--cr-text); line-height: 1.55; }
.cd__points li::before {
  content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 2px;
  background: var(--c); transition: background-color .3s;
}
.cd__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--cr-line);
}
.cd__count { font-size: .88rem; font-weight: 500; color: var(--cr-muted); }
.cd__nav { display: flex; gap: .65rem; }
.cd__btn {
  width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  transition: background-color .3s, border-color .3s, color .3s, transform .25s var(--ease), opacity .3s;
}
.cd__btn--prev { background: transparent; border: 1.5px solid #3A3D45; color: var(--cr-text); }
.cd__btn--prev:hover:not(:disabled) { border-color: var(--cr-text); }
.cd__btn--next { background: var(--c); border: 1.5px solid var(--c); color: var(--cr-bg); }
.cd__btn:hover:not(:disabled) { transform: translateY(-2px); }
.cd__btn:disabled { opacity: .3; cursor: default; }
.career :focus-visible { outline-color: var(--c); }
@media (max-width: 820px) {
  .cd { grid-template-columns: 1fr; }
  .cd__kicker { margin-bottom: 1.25rem; }
}

/* 4. Résumé */
.career__foot { display: flex; justify-content: center; margin-top: clamp(2rem, 4vw, 3rem); }
.career__resume {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: .8rem 1.6rem;
  border: 1.5px solid rgba(244, 242, 238, .4); border-radius: 999px;
  color: var(--cr-text); font-weight: 700; font-size: .98rem; text-decoration: none;
  transition: border-color .25s, background-color .25s, transform .25s var(--ease);
}
.career__resume:hover { border-color: var(--cr-text); background: rgba(244, 242, 238, .06); transform: translateY(-2px); }

/* ---------- Impact ---------- */
.impact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.impact-card {
  position: relative; padding: 2.1rem 1.9rem 1.9rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform .35s var(--ease), box-shadow .35s;
  overflow: hidden;
}
.impact-card::after {
  content: ""; position: absolute; left: 1.9rem; top: 0; width: 40px; height: 3px; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
  transition: width .4s var(--ease);
}
.impact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.impact-card:hover::after { width: 80px; }
.impact-card__icon { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1.4rem; }
.impact-card__num {
  font-family: var(--font-display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -.03em; color: var(--ink); margin-bottom: .55rem;
  font-variant-numeric: tabular-nums;
}
.impact-card__text { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .impact__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .impact__grid { grid-template-columns: 1fr; } }

/* ---------- Cube Method ---------- */
.cube { overflow: hidden; }
.cube__layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; margin-bottom: clamp(3.5rem, 7vw, 6rem); }
.text-link {
  display: inline-block; margin-top: .5rem; font-weight: 600; color: var(--accent);
  text-decoration: none; border-bottom: 1.5px solid rgba(255, 90, 31, .4); padding-bottom: 2px; transition: border-color .2s;
}
.text-link:hover { border-color: var(--accent); }

.cube__stage { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.cube__controls { display: flex; gap: .75rem; }
.cube__status { font-size: .9rem; color: var(--muted-light); min-height: 1.5em; margin: 0; text-align: center; }

.rubik {
  --s: clamp(54px, 9vw, 78px);
  width: calc(var(--s) * 5); height: calc(var(--s) * 5);
  perspective: 1200px;
  display: grid; place-items: center;
  position: relative;
}
.rubik::before {
  content: ""; position: absolute; left: 15%; right: 15%; bottom: 0; height: 20px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); filter: blur(6px);
}
.rubik__view, .rubik__layer, .cubie { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.rubik__view { transform: rotateX(-28deg) rotateY(-38deg); }
.cubie__face {
  position: absolute; width: var(--s); height: var(--s); left: calc(var(--s) / -2); top: calc(var(--s) / -2);
  background: #0b0c0f; padding: 4px;
  backface-visibility: hidden;
}
.cubie__face::after {
  content: ""; display: block; width: 100%; height: 100%; border-radius: 6px;
  background: var(--f, #0b0c0f);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .18), inset 0 4px 8px rgba(255, 255, 255, .22);
}
.cubie__face--in::after { box-shadow: none; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: clamp(3.5rem, 7vw, 6rem); counter-reset: step; }
.step {
  padding: 1.8rem 1.6rem; border-radius: var(--radius-lg);
  background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .07);
  transition: transform .35s var(--ease), border-color .35s;
}
.step:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .18); }
.step__num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px;
  background: var(--c); color: var(--ink); font-weight: 700; font-size: .9rem; margin-bottom: 1.3rem;
}
.step__title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: .6rem; }
.step p { color: var(--muted-light); margin: 0; font-size: .98rem; }
.step p.step__life { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.cube__intro .btn { margin-top: .5rem; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .cube__layout { grid-template-columns: 1fr; text-align: center; } .cube__intro .section__lead { margin-inline: auto; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.rubik-quote {
  display: grid; grid-template-columns: 260px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  margin: 0 auto clamp(3rem, 6vw, 4.5rem); max-width: 1000px;
}
.rubik-quote img { border-radius: var(--radius); width: 100%; filter: saturate(.9); }
.rubik-quote blockquote {
  margin: 0 0 1rem; font-family: var(--font-display); font-stretch: 112%; font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.25; color: #fff; letter-spacing: -.015em;
}
.rubik-quote figcaption { color: var(--muted-light); }
.rubik-quote figcaption strong { color: var(--accent); font-weight: 600; }
.rubik-quote__event { display: block; margin-top: .4rem; font-size: .9rem; }
.rubik-quote__video { display: block; border-radius: var(--radius); transition: transform .2s ease, box-shadow .2s ease; }
.rubik-quote__video:hover, .rubik-quote__video:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.rubik-quote__video img { display: block; }
@media (max-width: 700px) { .rubik-quote { grid-template-columns: 1fr; text-align: center; } .rubik-quote img { max-width: 320px; margin-inline: auto; } .rubik-quote__video { max-width: 320px; margin-inline: auto; } }

.cube__proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3rem; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 2.5rem; color: var(--muted-light); font-size: .98rem; }
.cube__proof strong { color: #fff; font-family: var(--font-display); font-size: 1.15rem; margin-right: .25rem; }

/* ---------- Speaking ---------- */
.reel {
  position: relative; max-width: 1000px; margin: 0 auto clamp(3rem, 6vw, 5rem);
  aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(15, 17, 21, .5);
}
.reel img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: transform .8s var(--ease), opacity .4s; }
.reel:hover img { transform: scale(1.03); opacity: .7; }
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(255, 90, 31, .22); transition: transform .3s var(--ease), box-shadow .3s;
}
.reel__play:hover { transform: scale(1.07); box-shadow: 0 0 0 16px rgba(255, 90, 31, .18); }
.reel__play svg { width: 30px; height: 30px; fill: var(--ink); margin-left: 4px; }
.reel__note {
  position: absolute; left: 1.4rem; bottom: 1.1rem; margin: 0; color: #fff;
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}

.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.topic {
  padding: 2rem 1.8rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--paper);
  position: relative; transition: transform .35s var(--ease), box-shadow .35s;
}
.topic::before { content: ""; position: absolute; left: 0; top: 1.8rem; bottom: 1.8rem; width: 3px; background: var(--c); border-radius: 0 3px 3px 0; }
.topic:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.topic__tag { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.topic h3 { font-size: 1.4rem; color: var(--ink); margin-bottom: .8rem; }
.topic p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .topics { grid-template-columns: 1fr; } }

.featured { text-align: center; margin-bottom: 3rem; }
.featured__label { font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.featured__logos {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem clamp(1.75rem, 4vw, 3.5rem);
  padding-block: 1.75rem; border-block: 1px solid var(--line);
}
.featured__logos li {
  font-family: var(--font-display); font-stretch: 112%; font-weight: 700; font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: #8C919C; letter-spacing: -.01em; transition: color .25s;
}
.featured__logos li:hover { color: var(--ink); }

/* ---------- Things I'm Working On ---------- */
.projects__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.5rem; max-width: 1000px; margin-inline: auto; }
.project { display: flex; }
.project__link {
  display: flex; flex-direction: column; width: 100%; text-decoration: none; color: inherit;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.project__link:hover, .project__link:focus-visible { transform: translateY(-5px); border-color: var(--c); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .7); }
.project__visual {
  position: relative; aspect-ratio: 16 / 8; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 110%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%), var(--ink-3);
}
.project__visual img { width: 100%; height: 100%; object-fit: cover; }
.project__body { padding: 1.7rem 1.7rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.project__tag { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c); filter: brightness(1.5); margin-bottom: .7rem; }
.project__title { font-size: 1.5rem; color: #fff; margin-bottom: .7rem; }
.project__body p { color: var(--muted-light); font-size: .98rem; margin-bottom: 1.4rem; }
.project__url {
  margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  font-weight: 600; font-size: .92rem; color: var(--accent);
}
.project__url svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.project__link:hover .project__url svg { transform: translate(3px, -3px); }

/* Assume The Deal visual: belt levels + closed-deal check */
.project__visual--deal { display: flex; align-items: center; justify-content: center; gap: .8rem; }
.belt { width: 22%; height: 22px; border-radius: 5px; position: relative; transform: rotate(-8deg); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); transition: transform .5s var(--ease); }
.belt::after { content: ""; position: absolute; right: 16%; top: -4px; bottom: -4px; width: 12%; background: inherit; filter: brightness(.8); border-radius: 3px; }
.belt--white { background: var(--cube-white); }
.belt--blue { background: var(--cube-blue); }
.belt--black { background: #050608; outline: 1px solid rgba(255, 255, 255, .18); }
.project__link:hover .belt { transform: rotate(0); }
.deal-check {
  position: absolute; right: 9%; top: 14%; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--cube-green); box-shadow: 0 0 0 8px rgba(0, 158, 96, .2);
}
.deal-check svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Hard Problems visual: flat cube face */
.mini-cube {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 34%; max-width: 132px; aspect-ratio: 1;
  padding: 6px; background: #0b0c0f; border-radius: 12px; transform: rotate(-10deg);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .8); transition: transform .6s var(--ease);
}
.mini-cube i { border-radius: 5px; background: var(--f); box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .18), inset 0 3px 6px rgba(255, 255, 255, .22); }
.project__link:hover .mini-cube { transform: rotate(80deg); }

/* ---------- Testimonials ---------- */
.carousel { position: relative; }
.carousel__track { display: grid; }
.slide {
  grid-area: 1 / 1; margin: 0; text-align: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), visibility .7s;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; }
.slide blockquote {
  margin: 0 auto 2rem; max-width: 760px;
  font-family: var(--font-display); font-stretch: 112%; font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem); line-height: 1.32; letter-spacing: -.015em; color: var(--ink);
}
.slide figcaption { display: inline-flex; align-items: center; gap: 1rem; text-align: left; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.slide figcaption strong { color: var(--ink); font-size: 1.02rem; }
.avatar {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: var(--ink);
  background: #fff; box-shadow: inset 0 0 0 3px var(--c), var(--shadow);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.carousel__controls { display: flex; justify-content: center; align-items: center; gap: 1.25rem; margin-top: 2.75rem; }
.carousel__btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  display: grid; place-items: center; cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s;
}
.carousel__btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.carousel__btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carousel__dots { display: flex; gap: .55rem; }
.carousel__dots button {
  width: 12px; height: 12px; border-radius: 3px; border: 0; padding: 0; cursor: pointer;
  background: #D3D3CD; transition: background-color .3s, transform .3s;
}
.carousel__dots button[aria-current="true"] { background: var(--c, var(--accent)); transform: scale(1.25); }

/* ---------- Contact ---------- */
.contact__layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact__details { margin-top: 2.2rem; display: grid; gap: 1rem; }
.contact__details li { display: flex; align-items: center; gap: .9rem; color: var(--text); }
.contact__details svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent-strong); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact__details li:nth-child(2) svg { fill: var(--accent-strong); stroke: none; }
.contact__details a { text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s; word-break: break-word; }
.contact__details a:hover { border-color: var(--accent-strong); }

.form {
  background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.6rem);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: .85rem 1rem; border: 1px solid #D6D6CF; border-radius: 10px; background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230F1115' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 4px rgba(255, 90, 31, .18); }
.form__status { margin: 1rem 0 0; font-weight: 500; min-height: 1.5em; }
.form__status.is-success { color: #0B7A47; }
.form__status.is-error { color: #B3261E; }
@media (max-width: 900px) { .contact__layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--muted-light); padding-block: 3.5rem; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2rem; align-items: center; }
.footer__name { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; color: #fff; font-size: 1.35rem; margin-bottom: .3rem; }
.footer__tag { margin: 0; }
.socials { display: flex; gap: .6rem; }
.socials a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .15); color: #fff; transition: background-color .25s, border-color .25s, color .25s;
}
.socials a:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.socials svg { width: 19px; height: 19px; fill: currentColor; }
.footer__copy { grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .88rem; }
@media (max-width: 640px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- Thank-you page ---------- */
.thanks { min-height: 100svh; display: grid; place-items: center; text-align: center; background: var(--ink); color: #fff; padding: 2rem; }
.thanks h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; margin-bottom: 1rem; }
.thanks p { color: var(--muted-light); max-width: 520px; margin: 0 auto 2rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* backdrop-filter creates a containing block for fixed children; drop it while the mobile menu is open */
body.menu-open .nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
