@charset "utf-8";
/* ==========================================================================
   eduardorueda.com — site.css
   Single stylesheet. No build step, no dependencies.

   Palette is derived from Eduardo_Rueda_CV.pdf so the site and the PDF read
   as one artifact: #2563EB headers, #1A1A2E ink, #374151 body, #6B7280 muted.

   Sections
     1. Tokens
     2. Dark tokens
     3. Reset
     4. Base elements
     5. Layout primitives
     6. Components
     7. Utilities
     8. Reduced motion
     9. Print
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* --- accent ramp, anchored on the CV blue --------------------------- */
  --c-accent-50:  #eff6ff;
  --c-accent-100: #dbeafe;
  --c-accent-200: #bfdbfe;
  --c-accent-300: #93c5fd;
  --c-accent-400: #60a5fa;
  --c-accent-500: #3b82f6;
  --c-accent-600: #2563eb; /* the CV blue */
  --c-accent-700: #1d4ed8;
  --c-accent-800: #1e40af;
  --c-accent-900: #1e3a8a;

  /* --- neutrals, cool-tinted to match #1a1a2e ------------------------- */
  --c-n-0:   #ffffff;
  --c-n-25:  #fafbfc;
  --c-n-50:  #f6f8fa;
  --c-n-100: #eef1f5;
  --c-n-200: #dfe4ea;
  --c-n-300: #c6ccd6;
  --c-n-400: #949cab;
  --c-n-500: #6b7280; /* CV muted */
  --c-n-600: #4b5563;
  --c-n-700: #374151; /* CV body */
  --c-n-800: #232a36;
  --c-n-900: #1a1a2e; /* CV ink */
  --c-n-950: #101018;

  /* --- semantic tokens. Components read ONLY these. ------------------- */
  --c-bg:            var(--c-n-0);
  --c-bg-subtle:     var(--c-n-50);
  --c-bg-raised:     var(--c-n-0);
  --c-text:          var(--c-n-700);
  --c-text-strong:   var(--c-n-900);
  --c-text-muted:    var(--c-n-500);
  --c-text-invert:   var(--c-n-0);
  --c-border:        var(--c-n-200);
  --c-border-strong: var(--c-n-300);
  --c-link:          var(--c-accent-700);
  --c-link-hover:    var(--c-accent-800);
  --c-accent:        var(--c-accent-600); /* decorative fills and rules */
  --c-accent-solid:  var(--c-accent-700); /* fills that CARRY white text */
  --c-accent-text:   var(--c-accent-700); /* accent used AS text */
  --c-accent-soft:   var(--c-accent-50);
  --c-focus:         var(--c-accent-600);

  /* --- type ----------------------------------------------------------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* clamp() mixes rem + vw so browser zoom still works */
  --step--1: clamp(0.875rem, 0.851rem + 0.109vw, 0.9375rem); /* 14 → 15 */
  --step-0:  clamp(1rem,     0.951rem + 0.217vw, 1.125rem);  /* 16 → 18 */
  --step-1:  clamp(1.125rem, 1.027rem + 0.435vw, 1.375rem);  /* 18 → 22 */
  --step-2:  clamp(1.375rem, 1.179rem + 0.870vw, 1.875rem);  /* 22 → 30 */
  --step-3:  clamp(1.625rem, 1.234rem + 1.739vw, 2.625rem);  /* 26 → 42 */
  --step-4:  clamp(2rem,     1.315rem + 3.043vw, 3.75rem);   /* 32 → 60 */
  --step-5:  clamp(2.5rem,   1.522rem + 4.348vw, 5rem);      /* 40 → 80 */

  --lh-tight: 1.1;
  --lh-snug:  1.3;
  --lh-body:  1.65;
  --ls-tight: -0.025em;
  --ls-wide:   0.08em;

  /* --- space ----------------------------------------------------------- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2rem;
  --space-xl:  3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-section: clamp(3.5rem, 1.94rem + 6.96vw, 7.5rem); /* 56 → 120 */

  /* --- shape ------------------------------------------------------------ */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-sm: 0 1px 3px rgb(16 24 40 / 0.08), 0 1px 2px rgb(16 24 40 / 0.04);
  --shadow-md: 0 4px 12px rgb(16 24 40 / 0.08), 0 2px 4px rgb(16 24 40 / 0.04);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / 0.12), 0 4px 8px rgb(16 24 40 / 0.05);
  --ring: 0 0 0 3px color-mix(in srgb, var(--c-focus) 35%, transparent);

  /* --- motion ----------------------------------------------------------- */
  --dur-fast: 120ms;
  --dur: 220ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* --- layout ----------------------------------------------------------- */
  --measure: 62ch;
  --container: 1120px;
  --container-narrow: 720px;
  --gutter: clamp(1.25rem, 0.9rem + 1.5vw, 2.5rem);
  --header-h: 4rem;
}

/* ==========================================================================
   2. DARK TOKENS
   Only variables change. No component ever needs a dark override.
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg:            #0f1218;
    --c-bg-subtle:     #161b24;
    --c-bg-raised:     #1b212c;
    --c-text:          #c9d1dc; /* 12.18:1 */
    --c-text-strong:   #f2f5f9; /* 17.15:1 */
    --c-text-muted:    #8d97a6; /*  6.35:1 */
    --c-text-invert:   #0f1218;
    --c-border:        #2a3240;
    --c-border-strong: #3a4454;
    --c-link:          #7fb0ff; /*  8.53:1 */
    --c-link-hover:    #a8c9ff;
    --c-accent:        #3b82f6;
    --c-accent-solid:  #2563eb; /* 5.17:1 against white text */
    --c-accent-text:   #7fb0ff; /* 8.53:1 against --c-bg */
    --c-accent-soft:   #16233a;
    --c-focus:         #7fb0ff;

    /* shadows read as nothing on dark; lean on borders instead */
    --shadow-xs: 0 0 0 1px var(--c-border);
    --shadow-sm: 0 0 0 1px var(--c-border);
    --shadow-md: 0 0 0 1px var(--c-border-strong);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.5);
  }
}

/* ==========================================================================
   3. RESET
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }

p, h1, h2, h3, h4 { overflow-wrap: break-word; }

ul[class], ol[class] { list-style: none; padding: 0; }

/* ==========================================================================
   4. BASE ELEMENTS
   ========================================================================== */

h1, h2, h3, h4 {
  color: var(--c-text-strong);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: var(--lh-snug); }
h4 { font-size: var(--step-1); line-height: var(--lh-snug); letter-spacing: normal; }

a {
  color: var(--c-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--c-link-hover); }

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

strong, b { color: var(--c-text-strong); font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--c-border);
  margin-block: var(--space-xl);
}

::selection {
  background: var(--c-accent-solid);
  color: #fff;
}

/* ==========================================================================
   5. LAYOUT PRIMITIVES
   ========================================================================== */

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}
.container--narrow { --container: var(--container-narrow); }

/* the only card grid the site needs; no media query */
.grid-auto {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.stack > * + * { margin-block-start: var(--flow, var(--space-m)); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  align-items: center;
}

/* ==========================================================================
   6. COMPONENTS
   ========================================================================== */

/* --- 6.1 skip link ---------------------------------------------------- */

.skip-link {
  position: absolute;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  background: var(--c-accent-solid);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* --- 6.2 header + nav -------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--c-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: var(--header-h);
  padding-block: var(--space-2xs);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: 700;
  color: var(--c-text-strong);
  text-decoration: none;
  letter-spacing: var(--ls-tight);
}
.brand:hover { color: var(--c-text-strong); }
.brand__mark { width: 1.75rem; height: 1.75rem; flex: none; border-radius: var(--radius-sm); }
.brand__name { font-size: var(--step-0); }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: block;
  padding: var(--space-3xs) var(--space-3xs);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  border-block-end: 2px solid transparent;
}
.nav a:hover { color: var(--c-link); }

/* current page marked in CSS so the header markup stays byte-identical */
.page-work .nav-work,
.page-home .nav-home {
  color: var(--c-text-strong);
  border-block-end-color: var(--c-accent);
}

/* --- 6.3 hero ---------------------------------------------------------- */

.hero {
  padding-block: clamp(2.5rem, 1.5rem + 4.5vw, 5.5rem) var(--space-section);
}

.hero__grid {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.hero__name {
  font-size: var(--step-4);
  margin-block-end: var(--space-xs);
}

.hero__role {
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--c-accent-text);
  line-height: var(--lh-snug);
  margin-block-end: var(--space-s);
}

/* separator in the LinkedIn-style headline; muted so the two halves read as
   one line rather than two competing statements */
.hero__role-sep {
  color: var(--c-text-muted);
  font-weight: 400;
  margin-inline: 0.45em;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--ls-wide);
  color: var(--c-text-muted);
  text-transform: uppercase;
  margin-block-end: var(--space-m);
}
.hero__meta span { display: inline-flex; align-items: center; gap: var(--space-2xs); }

.hero__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--c-accent);
  flex: none;
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--c-text);
  max-width: 34ch;
  margin-block-end: var(--space-l);
}

.hero__portrait {
  width: min(100%, 22rem);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  justify-self: center;
}

/* --- 6.4 section + eyebrow --------------------------------------------- */

.section { padding-block: var(--space-section); }
.section--subtle { background: var(--c-bg-subtle); }

.section__head { margin-block-end: var(--space-xl); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-accent-text);
  margin-block-end: var(--space-s);
}
/* the 2rem blue rule — the direct CV echo */
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--c-accent);
  flex: none;
}

.section__title { font-size: var(--step-3); }

.section__lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--c-text);
  max-width: var(--measure);
  margin-block-start: var(--space-s);
}

/* --- 6.5 case card ----------------------------------------------------- */

.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-m);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.case-card:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.case-card:focus-within {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}

.case-card__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.case-card__title { font-size: var(--step-2); }

/* whole card clickable, one accessible link, no nested interactives */
.case-card__title a {
  color: var(--c-text-strong);
  text-decoration: none;
}
.case-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.case-card__title a:focus-visible { outline: none; }
.case-card:hover .case-card__title a { color: var(--c-link); }

.case-card__result {
  margin-block-start: auto;
  padding-block-start: var(--space-xs);
  font-weight: 600;
  color: var(--c-accent-text);
}

/* --- 6.6 stats --------------------------------------------------------- */

.stats {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.stat { border-block-start: 2px solid var(--c-accent); padding-block-start: var(--space-xs); }

.stat__value {
  display: block;
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--ls-tight);
  color: var(--c-text-strong);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  display: block;
  margin-block-start: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--ls-wide);
  color: var(--c-text-muted);
  text-transform: uppercase;
}

/* --- 6.7 skill pills --------------------------------------------------- */

.skill-group + .skill-group { margin-block-start: var(--space-m); }

.skill-group__name {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-block-end: var(--space-2xs);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* not clickable — no hover state */
.pill {
  padding: 0.2rem var(--space-xs);
  font-size: var(--step--1);
  color: var(--c-text);
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
}
.section--subtle .pill { background: var(--c-bg); }

/* --- 6.8 buttons ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 2.75rem; /* 44px tap target */
  padding: var(--space-2xs) var(--space-m);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--c-accent-solid);
  color: #fff;
}
.btn--primary:hover {
  background: var(--c-accent-800);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--c-text-strong);
  border-color: var(--c-border-strong);
}
.btn--ghost:hover {
  background: var(--c-bg-subtle);
  border-color: var(--c-text-muted);
  color: var(--c-text-strong);
}

.btn__icon { width: 1.1em; height: 1.1em; flex: none; }

.btn__meta {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 400;
  opacity: 0.75;
  letter-spacing: 0;
}

/* --- 6.9 prose (the only place with descendant selectors) -------------- */

.prose { max-width: var(--measure); }
.prose > * + * { margin-block-start: var(--space-m); }

.prose h2 {
  font-size: var(--step-2);
  margin-block-start: var(--space-2xl);
}
.prose h3 {
  font-size: var(--step-1);
  margin-block-start: var(--space-xl);
  letter-spacing: normal;
}
.prose h2 + *, .prose h3 + * { margin-block-start: var(--space-s); }

.prose ul, .prose ol { padding-inline-start: 1.25rem; }
.prose li + li { margin-block-start: var(--space-2xs); }
.prose li::marker { color: var(--c-accent); }

.prose blockquote {
  padding-inline-start: var(--space-m);
  border-inline-start: 3px solid var(--c-accent);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--c-text-strong);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}

/* --- 6.10 callout ------------------------------------------------------ */

.callout {
  padding: var(--space-m);
  background: var(--c-accent-soft);
  border-inline-start: 3px solid var(--c-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.callout > * + * { margin-block-start: var(--space-2xs); }
.callout__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-accent-text);
}

/* --- 6.11 footer ------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-2xl);
  background: var(--c-bg-subtle);
  border-block-start: 1px solid var(--c-border);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.site-footer__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-block-end: var(--space-2xs);
}

/* These links stack rather than sitting inline in prose, so they need a real
   target box. An inline element's hit area is its font box, not the line box —
   inline-block + padding is what actually grows it to >=24px. */
.site-footer p:has(a) { line-height: 2; }
.site-footer a,
.breadcrumb a {
  display: inline-block;
  padding-block: 0.25rem;
}

.site-footer__bottom {
  margin-block-start: var(--space-xl);
  padding-block-start: var(--space-m);
  border-block-start: 1px solid var(--c-border);
  font-size: var(--step--1);
  color: var(--c-text-muted);
}

/* --- 6.12 breadcrumb --------------------------------------------------- */

.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-block-end: var(--space-s);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: var(--space-2xs); color: var(--c-border-strong); }

/* ==========================================================================
   7. UTILITIES  (capped at six — this is not Tailwind)
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.measure { max-width: var(--measure); }
.text-muted { color: var(--c-text-muted); }
.mono { font-family: var(--font-mono); }
.flow-l { --flow: var(--space-l); }
.mt-xl { margin-block-start: var(--space-xl); }

/* ==========================================================================
   8. THE ONE MEDIA QUERY  (nav + two-column layouts)
   ========================================================================== */

@media (min-width: 48em) {
  .site-header__inner { gap: var(--space-l); }
  .nav ul { gap: var(--space-m); }
  .hero__grid { grid-template-columns: 1.4fr 1fr; }
}

/* ==========================================================================
   9. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .case-card:hover { transform: none; }
}

/* ==========================================================================
   10. PRINT  (recruiters do print portfolios)
   ========================================================================== */

@media print {
  :root {
    --c-bg: #fff;
    --c-bg-subtle: #fff;
    --c-bg-raised: #fff;
    --c-text: #000;
    --c-text-strong: #000;
    --c-text-muted: #444;
  }
  .site-header, .site-footer, .skip-link, .hero__portrait, .btn { display: none; }
  body { font-size: 11pt; }
  .section { padding-block: 1rem; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  h1, h2, h3 { break-after: avoid; }
  .case-card, .callout { break-inside: avoid; border: 1px solid #ccc; }
}
